function course_search_get_course_syllabus_details
Search API
7.x course_search.module | course_search_get_course_syllabus_details($course_id) |
6.x course_search.module | course_search_get_course_syllabus_details($course_id) |
4.x course_search.module | course_search_get_course_syllabus_details($subject_id = "", $course_num = "", $course_id = -1) |
5.x course_search.module | course_search_get_course_syllabus_details($subject_id = "", $course_num = "", $course_id = -1) |
5 calls to course_search_get_course_syllabus_details()
- course_search_display_courses in modules/
course_search/ course_search.module - Show the user their select of courses.
- course_search_display_edit_courses in modules/
course_search/ course_search.edit.inc - Display a plain list of courses, making it easier for admins to edit schedules and details in one spot.
- course_search_edit_course_details_form in modules/
course_search/ course_search.edit.inc - This form lets the user edit the course's syllabus or rotation schedule
- course_search_edit_course_details_form_submit in modules/
course_search/ course_search.edit.inc - course_search_upload_attachment in modules/
course_search/ course_search.edit.inc
File
- modules/
course_search/ course_search.module, line 912 - This module allows users to search for courses, descriptions, and, if supported, rotation schedules and sample syllabi.
Code
function course_search_get_course_syllabus_details($course_id)
{
// This will return an array containing information
// about a course's syllabus, if it exists.
$rtn_array = FALSE;
// Does this course have a syllabus?
$query = "SELECT * FROM course_syllabi
WHERE course_id = ? ";
$res = db_query($query, $course_id);
$cur = db_fetch_array($res);
if (isset($cur ["filename"]) && $cur ['filename'] != "") {
$rtn_array = array();
$rtn_array ["url"] = $GLOBALS ["fp_system_settings"]["base_url"] . "/" . fp_url("course-search/get-syllabus", "id=" . $course_id, FALSE);
$rtn_array ["filename"] = $cur ["filename"];
$rtn_array ["posted"] = $cur ["posted"];
}
return $rtn_array;
}