Browse Source

Add necessary comments - refs BT#8659

Imanol Losada 10 years ago
parent
commit
6065c5b6b0
2 changed files with 3 additions and 1 deletions
  1. 1 0
      main/exercice/exercise.lib.php
  2. 2 1
      main/exercice/upload_exercise.php

+ 1 - 0
main/exercice/exercise.lib.php

@@ -2324,6 +2324,7 @@ function display_question_list_by_attempt($objExercise, $exe_id, $save_user_resu
                 continue;
             }
             
+            // In case of global score, make sure the calculated total score is integer
             if (!is_int($result['score'])) {
                 $result['score'] = round($result['score']);
             }

+ 2 - 1
main/exercice/upload_exercise.php

@@ -324,7 +324,8 @@ function lp_upload_quiz_action_handling() {
                     $globalScore = null;
                     $objAnswer = new Answer($question_id, $courseId);
                     $globalScore = $score_list[$i][3];
-                    //var_dump('global -> '.$globalScore);
+                    
+                    // Calculate the number of correct answers to divide the score between them when importing from CSV
                     $numberRightAnswers = 0;
                     foreach ($answers_data as $answer_data) {
                         if (strtolower($answer_data[3]) == 'x') {