function prereqs_get_prereq_array_for_course
Search API
7.x prereqs.module | prereqs_get_prereq_array_for_course($course_id) |
6.x prereqs.module | prereqs_get_prereq_array_for_course($course_id) |
Return back a friendly array of prereq courses that are required for THIS course_id.
1 call to prereqs_get_prereq_array_for_course()
- prereqs_get_prereq_warnings_for_course in modules/
prereqs/ prereqs.module - This is meant to be a general function to find all relavent prereq warnings for the supplied course.
File
- modules/
prereqs/ prereqs.module, line 373 - This is the module file for the prereqs module.
Code
function prereqs_get_prereq_array_for_course($course_id) {
$rtn = array();
$prereq_data = prereqs_get_prereq_string_for_course($course_id);
$db = get_global_database_handler();
$school_id = $db->get_school_id_for_course_id($course_id, TRUE);
$rtn = prereqs_get_prereq_array_from_string($prereq_data, $school_id);
return $rtn;
}