소스 검색

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

Yannick Warnier 13 년 전
부모
커밋
f4559401bf
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  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'])) {