Fix disable_gradebook_stats in gradebook results - refs BT#14687 #2609

pull/2606/head
Angel Fernando Quiroz Campos 7 years ago
parent a3fadca534
commit 8073dfb0c8
  1. 22
      main/gradebook/lib/fe/gradebooktable.class.php

@ -20,7 +20,7 @@ class GradebookTable extends SortableTable
public $exportToPdf; public $exportToPdf;
public $teacherView; public $teacherView;
public $userId; public $userId;
public $studentList; public $studentList = [];
private $currentcat; private $currentcat;
private $datagen; private $datagen;
private $evals_links; private $evals_links;
@ -705,16 +705,18 @@ class GradebookTable extends SortableTable
true true
); );
// Overwrite main weight if ($this->exportToPdf || $this->loadStats) {
$totalAverage[0] = $average / count($this->studentList); // Overwrite main weight
$totalAverage[1] = $main_weight; $totalAverage[0] = $average / count($this->studentList);
$totalAverage[1] = $main_weight;
$totalAverage = $scoredisplay->display_score( $totalAverage = $scoredisplay->display_score(
$totalAverage, $totalAverage,
SCORE_DIV, SCORE_DIV,
SCORE_BOTH, SCORE_BOTH,
true true
); );
}
if ($this->exportToPdf) { if ($this->exportToPdf) {
$row = [ $row = [

Loading…
Cancel
Save