Closed nelson-escalona closed 1 week ago
Added "The GET function will get the courses that the student is currently taking based on the status of the course being "Currently taking", pulled from the student_courses table." to the issue description in order to better define this issue
This function, fetch_enrolled_courses
, retrieves all courses that a student is currently enrolled in from the database.
It accepts two parameters: a database connection and a student's ID. The function first queries the student_courses
table to find entries for the specified student where the course status is marked as 'CURRENTLY TAKING'. For each course entry, it fetches the associated course details from the courses
table using the course code. If the course is found, it is added to the list of enrolled courses. Finally, the function returns this list of enrolled courses. This is the output from the tests:
LGTM👍🏼
Objective: Create the functions necessary to get the courses that the student is currently taking.
Description: This task involves creating the necessary functions to get the courses that the student is currently taking from the database. The GET function will get the courses that the student is currently taking based on the status of the course being "Currently taking", pulled from the student_courses table. These functions must return a list of 'course' objects given the students data.
Research must me conducted on the database design to check the necessary queries.
Requirements: For this task, the courses class must be completed.
Time Constraints: No time constraint yet. But will be updated.
Completion Criteria: We have fully functional functions that given student data, they return the classes that the student is currently taking.
Difficulty: 2
Priority: 4
Assignees: No assignees yet
NOTE: Task created to avoid further point decay. More information on the task coming later.