Kaynağa Gözat

Fix fatal error

Julio Montoya 9 yıl önce
ebeveyn
işleme
3e5c04b442

+ 3 - 2
main/gradebook/lib/be/evallink.class.php

@@ -31,14 +31,15 @@ abstract class EvalLink extends AbstractLink
 
     /**
      * @param int $userId
+     * @param string $type
      *
      * @return array
      */
-    public function calc_score($userId = null)
+    public function calc_score($userId = null, $type = null)
     {
         $eval = $this->get_evaluation();
 
-        return $eval->calc_score($userId);
+        return $eval->calc_score($userId, $type);
     }
 
     public function get_link()

+ 1 - 0
main/gradebook/lib/be/evaluation.class.php

@@ -516,6 +516,7 @@ class Evaluation implements GradebookItem
 	/**
 	 * Calculate the score of this evaluation
 	 * @param int $stud_id (default: all students who have results for this eval - then the average is returned)
+	 * @param string $type (best, average, ranking)
 	 * @return	array (score, max) if student is given
 	 * 			array (sum of scores, number of scores) otherwise
 	 * 			or null if no scores available