| 29 | | == UC2002 – Advise Student == |
| 30 | | |
| 31 | | '''Initiating actor:''' Professor |
| 32 | | '''Other actors:''' None |
| 33 | | |
| 34 | | '''Description:''' |
| 35 | | A professor records an academic advising relationship with a student for a specific time period. |
| 36 | | |
| 37 | | '''Scenario:''' |
| 38 | | 1. Professor selects “Start Advising Student”. |
| 39 | | 2. System shows a list of students belonging to the same faculty as the professor: |
| 40 | | {{{ |
| 41 | | SELECT st.Id, st.Name, st.Surname |
| 42 | | FROM Student st |
| 43 | | JOIN Professor p ON p.Faculty_Id = st.Faculty_Id |
| 44 | | WHERE p.Id = :professor_id; |
| 45 | | }}} |
| 46 | | 3. Professor selects a student and enters the advising start and end dates. |
| 47 | | 4. System inserts the advising record into the database: |
| 48 | | {{{ |
| 49 | | INSERT INTO Advice (Student_Id, Professor_Id, Start_Date, End_Date) |
| 50 | | VALUES (:student_id, :professor_id, :start_date, :end_date); |
| 51 | | }}} |
| 52 | | 5. System confirms the advisor assignment. |