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 Details

  • Method Details

    • normalizeEmail

      public static String normalizeEmail(String email)
      Puts an email into the form used for comparison: surrounding whitespace removed, lower case, and the legacy @umail.ucsb.edu domain 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)