1- package io .github .Hattinger04 .group ;
1+ package io .github .Hattinger04 .course ;
22
33import org .springframework .beans .factory .annotation .Autowired ;
44import 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