Pārlūkot izejas kodu

Added information about the exercise on the right side of the action bar in teacher view

Yannick Warnier 13 gadi atpakaļ
vecāks
revīzija
f4559401bf
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 7 0
      main/exercice/admin.php

+ 7 - 0
main/exercice/admin.php

@@ -465,6 +465,13 @@ if ($show_quiz_edition) {
     echo '<a href="">'.Display::return_icon('settings_na.png', get_lang('ModifyExercise'),'','32').'</a>';
 }
 
+$maxScoreAllQuestions = 0;
+foreach ($objExercise->questionList as $q) {
+  $oQ = Question::read($q);
+  $maxScoreAllQuestions += $oQ->selectWeighting();
+}
+echo '<span style="float:right">'.sprintf(get_lang('XQuestionsWithTotalScoreY'),$objExercise->selectNbrQuestions(),$maxScoreAllQuestions).'</span>';
+
 echo '</div>';
 
 if (isset($_GET['message'])) {