Browse Source

Merge pull request #1662 from hi-rafa/Fix-issue-1659

Fixes #1659
Julio 8 years ago
parent
commit
d3ab54eae5
1 changed files with 10 additions and 0 deletions
  1. 10 0
      main/gradebook/lib/be/category.class.php

+ 10 - 0
main/gradebook/lib/be/category.class.php

@@ -947,6 +947,11 @@ class Category implements GradebookItem
                 /** @var EvalLink|ExerciseLink $link */
                 foreach ($links as $link) {
                     $link->setStudentList($this->getStudentList());
+
+                    if ($session_id) {
+                        $link->set_session_id($session_id);
+                    }
+
                     $linkres = $link->calc_score($stud_id, null);
                     if (!empty($linkres) && $link->get_weight() != 0) {
                         $students[$stud_id] = $linkres[0];
@@ -1043,6 +1048,11 @@ class Category implements GradebookItem
                 /** @var EvalLink|ExerciseLink $link */
                 foreach ($links as $link) {
                     $link->setStudentList($this->getStudentList());
+
+                    if ($session_id) {
+                        $link->set_session_id($session_id);
+                    }
+	                
                     $linkres = $link->calc_score($stud_id, $type);
                     if (!empty($linkres) && $link->get_weight() != 0) {
                         $students[$stud_id] = $linkres[0];