fixed obsoleted use of course->category to find site course - now used SITEID instead MDL-1899

This commit is contained in:
skodak
2006-11-12 08:55:13 +00:00
parent da1320dab6
commit 1936c10e54
36 changed files with 46 additions and 46 deletions
+1 -1
View File
@@ -2527,7 +2527,7 @@ function get_parent_contexts($context) {
if (!$course = get_record('course','id',$context->instanceid)) {
return array();
}
if (!empty($course->category)) {
if ($course->id != SITEID) {
$parent = get_context_instance(CONTEXT_COURSECAT, $course->category);
return array_merge(array($parent->id), get_parent_contexts($parent));
} else {