|
@@ -2029,6 +2029,10 @@ class Category implements GradebookItem
|
|
|
false
|
|
|
);
|
|
|
|
|
|
+ if (empty($cats_course)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
$category = $cats_course[0];
|
|
|
}
|
|
|
|
|
@@ -2093,6 +2097,10 @@ class Category implements GradebookItem
|
|
|
false
|
|
|
);
|
|
|
|
|
|
+ if (empty($cats_course)) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
$category = $cats_course[0];
|
|
|
|
|
|
$courseEvaluations = $category->get_evaluations($userId, true);
|