瀏覽代碼

Fixing commit d29856f9c to still check that the user validated the gradebook - refs BT#12404

Nicolas Ducoulombier 7 年之前
父節點
當前提交
cccb9fe443
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      plugin/grading_electronic/generate.php

+ 8 - 0
plugin/grading_electronic/generate.php

@@ -118,6 +118,14 @@ try {
 
     /** @var User $student */
     foreach ($students as $student) {
+        $userFinishedCourse = Category::userFinishedCourse(
+            $student->getId(),
+            $gradebook,
+            true
+        );
+        if (!$userFinishedCourse) {
+             continue;
+        }
         $exerciseResult = Event::get_best_exercise_results_by_user(
             $exerciseId,
             $course->getId(),