fixed validation of course category for site course MDL-6715

This commit is contained in:
skodak
2006-09-27 20:43:04 +00:00
parent 49c5368707
commit 1cd3eba948
+3
View File
@@ -1182,6 +1182,9 @@ function validate_context($contextlevel, $instanceid) {
return (boolean)count_records('user', 'id', $instanceid);
case CONTEXT_COURSECAT:
if ($instanceid == 0) {
return true; // site course category
}
return (boolean)count_records('course_categories', 'id', $instanceid);
case CONTEXT_COURSE: