Minor - fix php notices, clean php code, flint fixes

pull/2591/head
Julio Montoya 7 years ago
parent 7c765b0e63
commit 46064cb582
  1. 21
      main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
  2. 1
      main/inc/lib/exercise_show_functions.lib.php

@ -771,9 +771,24 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
.'</th><tr>'
;
$nbResponsesInc = (isset($scoreList[4]) || isset($scoreList[5])) ? $scoreList[4] + $scoreList[5] : 0;
$nbResponsesIng = (isset($scoreList[3])) ? $scoreList[3] : 0;
$nbResponsesCor = (isset($scoreList[1]) || isset($scoreList[2])) ? $scoreList[1] + $scoreList[2] : 0;
$nbResponsesInc = 0;
if (isset($scoreList[4])) {
$nbResponsesInc += (int) $scoreList[4];
}
if (isset($scoreList[5])) {
$nbResponsesInc += (int) $scoreList[5];
}
$nbResponsesIng = isset($scoreList[3]) ? $scoreList[3] : 0;
$nbResponsesCor = 0;
if (isset($scoreList[1])) {
$nbResponsesCor += (int) $scoreList[1];
}
if (isset($scoreList[2])) {
$nbResponsesCor += (int) $scoreList[2];
}
$colWidth = $widthTable / 5;
$html .= '<tr>

@ -585,7 +585,6 @@ class ExerciseShowFunctions
echo '<span style="font-weight: bold; color: '.$color.';">'.nl2br($answerComment).'</span>';
}
echo '</td>';
} else {
echo '<td>&nbsp;</td>';
}

Loading…
Cancel
Save