Skip to content

Commit 7658e41

Browse files
author
Hattinger04
committed
changing group to course
1 parent 713b2d6 commit 7658e41

File tree

3 files changed

+37
-37
lines changed

3 files changed

+37
-37
lines changed

src/main/java/io/github/Hattinger04/group/Group.java renamed to src/main/java/io/github/Hattinger04/course/Course.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package io.github.Hattinger04.group;
1+
package io.github.Hattinger04.course;
22

33
import java.util.List;
44

55
import io.github.Hattinger04.user.model.User;
66
import lombok.Getter;
77
import lombok.Setter;
88

9-
public class Group {
9+
public class Course {
1010

1111
@Getter @Setter
1212
private int id; // TODO: unique
@@ -20,7 +20,7 @@ public class Group {
2020
@Getter @Setter
2121
private List<User> students;
2222

23-
public Group(String name) {
23+
public Course(String name) {
2424
this.name = name;
2525
}
2626

src/main/java/io/github/Hattinger04/group/Exercise.java renamed to src/main/java/io/github/Hattinger04/course/Exercise.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.Hattinger04.group;
1+
package io.github.Hattinger04.course;
22

33
import lombok.Getter;
44
import lombok.Setter;
@@ -19,5 +19,5 @@ public void setText(String text) {
1919
// TODO: if already published: publish changes to all students
2020
}
2121

22-
// does exercise refer to student or group?
22+
// does exercise refer to student or course?
2323
}

src/main/java/io/github/Hattinger04/group/TeacherController.java renamed to src/main/java/io/github/Hattinger04/course/TeacherController.java

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.Hattinger04.group;
1+
package io.github.Hattinger04.course;
22

33
import org.springframework.beans.factory.annotation.Autowired;
44
import org.springframework.http.HttpStatus;
@@ -27,8 +27,8 @@ public class TeacherController {
2727

2828

2929
/**
30-
* Get all students in group from database
31-
* Needs group name
30+
* Get all students in Course from database
31+
* Needs Course name
3232
*
3333
* @param json
3434
* @return
@@ -37,74 +37,74 @@ public class TeacherController {
3737
@PostMapping("/getAllStudents")
3838
@ResponseBody
3939
public ResponseEntity<?> getAllStudents(@RequestBody String json) {
40-
// TODO: adding to database Group table or smth like that
41-
// and return here all students of Group
40+
// TODO: adding to database Course table or smth like that
41+
// and return here all students of Course
4242
return new ResponseEntity<>(HttpStatus.OK);
4343
}
4444

4545
/**
46-
* Create a new group
47-
* Needs group name
46+
* Create a new Course
47+
* Needs Course name
4848
*
4949
* @param json
5050
* @return
5151
*/
5252
@PreAuthorize("hasAuthority('TEACHER')")
53-
@PutMapping("/createGroup")
53+
@PutMapping("/createCourse")
5454
@ResponseBody
55-
public ResponseEntity<?> createGroup(@RequestBody String json) {
56-
// TODO: Create new Group with teacher and students
55+
public ResponseEntity<?> createCourse(@RequestBody String json) {
56+
// TODO: Create new Course with teacher and students
5757
return new ResponseEntity<>(HttpStatus.OK);
5858
}
5959

6060
/**
61-
* Deletes a existing group
62-
* Needs group name
61+
* Deletes a existing Course
62+
* Needs Course name
6363
*
6464
* @param json
6565
* @return
6666
*/
6767
@PreAuthorize("hasAuthority('TEACHER')")
68-
@DeleteMapping("/deleteGroup")
68+
@DeleteMapping("/deleteCourse")
6969
@ResponseBody
70-
public ResponseEntity<?> deleteGroup(@RequestBody String json) {
71-
// TODO: deleting existing Group and remove all database entries
70+
public ResponseEntity<?> deleteCourse(@RequestBody String json) {
71+
// TODO: deleting existing Course and remove all database entries
7272
return new ResponseEntity<>(HttpStatus.OK);
7373
}
7474

7575
/**
76-
* Adds student to existing group
77-
* Needs group name + student name
76+
* Adds student to existing Course
77+
* Needs Course name + student name
7878
*
7979
* @param json
8080
* @return
8181
*/
8282
@PreAuthorize("hasAuthority('TEACHER')")
83-
@PostMapping("/addStudentGroup")
83+
@PostMapping("/addStudentCourse")
8484
@ResponseBody
85-
public ResponseEntity<?> addStudentGroup(@RequestBody String json) {
86-
// TODO: adding students to Group
85+
public ResponseEntity<?> addStudentCourse(@RequestBody String json) {
86+
// TODO: adding students to Course
8787
return new ResponseEntity<>(HttpStatus.OK);
8888
}
8989

9090
/**
91-
* Removes student from group
92-
* Needs group name + student name
91+
* Removes student from Course
92+
* Needs Course name + student name
9393
*
9494
* @param json
9595
* @return
9696
*/
9797
@PreAuthorize("hasAuthority('TEACHER')")
98-
@DeleteMapping("/removeStudentGroup")
98+
@DeleteMapping("/removeStudentCourse")
9999
@ResponseBody
100-
public ResponseEntity<?> removeStudentGroup(@RequestBody String json) {
101-
// TODO: removing students from Group
100+
public ResponseEntity<?> removeStudentCourse(@RequestBody String json) {
101+
// TODO: removing students from Course
102102
return new ResponseEntity<>(HttpStatus.OK);
103103
}
104104

105105
/**
106-
* Creates a new exercise in a existing group
107-
* Needs group name + exercise object
106+
* Creates a new exercise in a existing Course
107+
* Needs Course name + exercise object
108108
*
109109
* @param json
110110
* @return
@@ -113,13 +113,13 @@ public ResponseEntity<?> removeStudentGroup(@RequestBody String json) {
113113
@PutMapping("/createExercise")
114114
@ResponseBody
115115
public ResponseEntity<?> createExercise(@RequestBody String json) {
116-
// TODO: create new exercise for Group
116+
// TODO: create new exercise for Course
117117
return new ResponseEntity<>(HttpStatus.OK);
118118
}
119119

120120
/**
121121
* Changes already existing (and published) exercises
122-
* Needs group name + exercise object
122+
* Needs Course name + exercise object
123123
*
124124
* @param json
125125
* @return
@@ -128,13 +128,13 @@ public ResponseEntity<?> createExercise(@RequestBody String json) {
128128
@PostMapping("/patchExercise")
129129
@ResponseBody
130130
public ResponseEntity<?> patchExercise(@RequestBody String json) {
131-
// TODO: change exercise for Group
131+
// TODO: change exercise for Course
132132
return new ResponseEntity<>(HttpStatus.OK);
133133
}
134134

135135
/**
136136
* Deletes existing exercise
137-
* Needs group name + exercise name
137+
* Needs Course name + exercise name
138138
*
139139
* @param json
140140
* @return
@@ -149,7 +149,7 @@ public ResponseEntity<?> deleteExercise(@RequestBody String json) {
149149

150150
/**
151151
* Gives a rating to an exercise for one student
152-
* Needs group name + exercise name + student name
152+
* Needs Course name + exercise name + student name
153153
*
154154
* @param json
155155
* @return

0 commit comments

Comments
 (0)