add debug code for missing course id when getting course grading category; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-03-08 15:10:35 +00:00
parent 0c94e43d01
commit a450311936

View File

@ -1098,6 +1098,10 @@ class grade_category extends grade_object {
* @return object grade_category instance for course grade
*/
function fetch_course_category($courseid) {
if (empty($courseid)) {
debugging('Missing course id!');
return false;
}
// course category has no parent
if ($course_category = grade_category::fetch(array('courseid'=>$courseid, 'parent'=>null))) {