Class StudentInfoController
java.lang.Object
edu.ucsb.cs156.frontiers.controllers.ApiController
edu.ucsb.cs156.frontiers.controllers.StudentInfoController
@RestController
@RequestMapping("/api/courses/studentInfo")
public class StudentInfoController
extends ApiController
Looks up one roster student by email and returns what an autograder needs to check their
submission: their GitHub login, their team, and the names of their teammates. The endpoint
accepts a course-scoped API key (see docs/api-keys.md), so that a Gradescope autograder or a
GitHub Action can call it without a logged-in user.
-
Constructor Summary
ConstructorsConstructorDescriptionStudentInfoController(RosterStudentRepository rosterStudentRepository, TeamCsvService teamCsvService) -
Method Summary
Modifier and TypeMethodDescriptiongetStudentInfo(Long courseId, String email) static StringnormalizeEmail(String email) Puts an email into the form used for comparison: surrounding whitespace removed, lower case, and the legacy@umail.ucsb.edudomain replaced by@ucsb.edu(both reach the same mailbox, and Gradescope may report either one).
-
Constructor Details
-
StudentInfoController
public StudentInfoController(RosterStudentRepository rosterStudentRepository, TeamCsvService teamCsvService)
-
-
Method Details
-
normalizeEmail
Puts an email into the form used for comparison: surrounding whitespace removed, lower case, and the legacy@umail.ucsb.edudomain replaced by@ucsb.edu(both reach the same mailbox, and Gradescope may report either one).- Parameters:
email- the email as supplied- Returns:
- the normalized email
-
getStudentInfo
@PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @GetMapping("") public StudentInfo getStudentInfo(@RequestParam Long courseId, @RequestParam String email)
-