Changes between Version 2 and Version 3 of UC3001
- Timestamp:
- 06/15/26 14:16:44 (4 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UC3001
v2 v3 3 3 **Initiating actor:** Student 4 4 5 **Other actors:** Professor5 **Other actors:** None 6 6 7 7 **Description:** 8 A student wants to enroll in a subject offered by their faculty. The system checks prerequisites, enrollment limits, and records the enrollment in the database.8 A student enrolls in a subject offered by their faculty and selects a specific professor who teaches that course instance. 9 9 10 10 **Scenario:** … … 12 12 1. Student logs into the system and selects “Enroll in Subject.” 13 13 14 2. System displays a list of subjects available for theirfaculty:14 2. System displays available subjects and the professors teaching them at the student's faculty: 15 15 {{{ 16 SELECT s.Id , s.Name, s.Semester, s.Credits17 FROM Subject s 18 JOIN Faculty f ON s.Faculty_Id = f.Id19 JOIN Student st ON st.Faculty_Id = f.Id16 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 17 FROM Subject s 18 JOIN Professor p ON p.Faculty_Id = s.Faculty_Id 19 JOIN Student st ON st.Faculty_Id = s.Faculty_Id 20 20 WHERE st.Id = :student_id; 21 21 }}} 22 22 23 3. Student chooses a subject and clicks “Enroll.”23 3. Student chooses a subject and the desired professor, then clicks “Enroll.” 24 24 25 4. System checks if the student is already enrolled :25 4. System checks if the student is already enrolled in this subject: 26 26 {{{ 27 27 SELECT * FROM Student_Subject … … 29 29 }}} 30 30 31 5. If not enrolled, system inserts enrollment record:31 5. If not enrolled, system inserts the enrollment record: 32 32 {{{ 33 INSERT INTO Student_Subject(Student_Id, Subject_Id, Status, Enrollment_Date, Absences_Count)34 VALUES (:student_id, :subject_id, 'ENROLLED', CURRENT_DATE, 0);33 INSERT INTO Student_Subject(Student_Id, Subject_Id, Professor_Id, Status, Enrollment_Date, Absences_Count) 34 VALUES (:student_id, :subject_id, :professor_id, 'PASSED', :enrollment_date, 0); 35 35 }}} 36 36
