Search in sources :

Example 1 with StudentNotFoundException

use of amu.zhcet.data.user.student.StudentNotFoundException in project zhcet-web by zhcet-amu.

the class StudentAttendanceController method attendance.

@GetMapping
public String attendance(Model model) {
    Student student = studentService.getLoggedInStudent().orElseThrow(StudentNotFoundException::new);
    model.addAttribute("page_title", "Attendance");
    model.addAttribute("page_subtitle", "Attendance Panel for " + student.getEnrolmentNumber() + " | " + student.getUser().getName());
    model.addAttribute("page_description", "View attendance of floated courses this session");
    model.addAttribute("attendances", attendanceService.getAttendanceByStudent(student));
    return "student/attendance";
}
Also used : StudentNotFoundException(amu.zhcet.data.user.student.StudentNotFoundException) Student(amu.zhcet.data.user.student.Student) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Aggregations

Student (amu.zhcet.data.user.student.Student)1 StudentNotFoundException (amu.zhcet.data.user.student.StudentNotFoundException)1 GetMapping (org.springframework.web.bind.annotation.GetMapping)1