UseCase3001 – Enroll in Subject
Initiating actor: Student
Other actors: None
Description: A student enrolls in a subject offered by their faculty and selects a specific professor who teaches that course instance.
Scenario:
- Student logs into the system and selects “Enroll in Subject.”
- System displays available subjects and the professors teaching them at the student's faculty:
SELECT s.Id AS Subject_Id, s.Name AS Subject_Name, p.Id AS Professor_Id, p.Name AS Professor_Name, p.Surname AS Professor_Surname FROM Subject s JOIN Professor p ON p.Faculty_Id = s.Faculty_Id JOIN Student st ON st.Faculty_Id = s.Faculty_Id WHERE st.Id = :student_id;
- Student chooses a subject and the desired professor, then clicks “Enroll.”
- System checks if the student is already enrolled in this subject:
SELECT * FROM Student_Subject WHERE Student_Id = :student_id AND Subject_Id = :subject_id;
- If not enrolled, system inserts the enrollment record:
INSERT INTO Student_Subject(Student_Id, Subject_Id, Professor_Id, Status, Enrollment_Date, Absences_Count) VALUES (:student_id, :subject_id, :professor_id, 'PASSED', :enrollment_date, 0);
- System confirms enrollment and updates student's schedule.
Last modified
5 days ago
Last modified on 06/15/26 14:16:44
Note:
See TracWiki
for help on using the wiki.
