Fix question GLOBAL_MULTIPLE_ANSWER when importin from excel

BT#12698
pull/2487/head
jmontoyaa 8 years ago
parent b0880bab36
commit 28667137d7
  1. 15
      main/exercise/upload_exercise.php

@ -405,15 +405,18 @@ function lp_upload_quiz_action_handling()
// Fixing scores:
switch ($detectQuestionType) {
case GLOBAL_MULTIPLE_ANSWER:
if (isset($noNegativeScoreList[$i][3])) {
if (!(strtolower($noNegativeScoreList[$i]) == 'x') &&
!$correct
) {
$score = $scoreList[$i] * -1;
if (!$correct) {
if (isset($noNegativeScoreList[$i])) {
if (strtolower($noNegativeScoreList[$i]) == 'x') {
$score = 0;
} else {
$score = $scoreList[$i] * -1;
}
}
} else {
$score = $scoreList[$i] * -1;
$score = $scoreList[$i];
}
$score /= $numberRightAnswers;
break;
case UNIQUE_ANSWER:

Loading…
Cancel
Save