function Student::load_unassignments
Search API
7.x Student.php | Student::load_unassignments() |
6.x Student.php | Student::load_unassignments() |
File
- classes/
Student.php, line 229
Class
Code
function load_unassignments()
{
// Load courses which have been unassigned from groups
// or the bare degree plan.
$res = db_query("SELECT * FROM student_unassign_group
WHERE
student_id = ?
AND delete_flag='0' ", $this->student_id);
while ($cur = db_fetch_array($res))
{
extract($cur, 3, "db");
if ($taken_course = $this->list_courses_taken->find_specific_course($db_course_id, $db_term_id, (bool) $db_transfer_flag, TRUE, NULL, $db_degree_id))
{
// Add the group_id to this courses' list of unassigned groups.
$new_group = new Group();
$new_group->group_id = $db_group_id;
$new_group->db_unassign_group_id = $db_id;
$new_group->req_by_degree_id = $db_degree_id;
$taken_course->group_list_unassigned->add($new_group);
}
}
}