|
|
|
@ -433,14 +433,6 @@ if ($formSent) { |
|
|
|
$final_answer = false; |
|
|
|
$final_answer = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($final_answer) { |
|
|
|
|
|
|
|
//getting only the first score where we save the weight of all the question |
|
|
|
|
|
|
|
$answerWeighting=$objAnswerTmp->selectWeighting(1); |
|
|
|
|
|
|
|
$questionScore+=$answerWeighting; |
|
|
|
|
|
|
|
$totalScore+=$answerWeighting; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
// for fill in the blanks |
|
|
|
// for fill in the blanks |
|
|
|
case FILL_IN_BLANKS : |
|
|
|
case FILL_IN_BLANKS : |
|
|
|
@ -626,6 +618,17 @@ if ($formSent) { |
|
|
|
} // end switch Answertype |
|
|
|
} // end switch Answertype |
|
|
|
} // end for that loops over all answers of the current question |
|
|
|
} // end for that loops over all answers of the current question |
|
|
|
// destruction of Answer |
|
|
|
// destruction of Answer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//we add the total score after dealing with the answers |
|
|
|
|
|
|
|
if ($answerType == MULTIPLE_ANSWER_COMBINATION) { |
|
|
|
|
|
|
|
if ($final_answer) { |
|
|
|
|
|
|
|
//getting only the first score where we save the weight of all the question |
|
|
|
|
|
|
|
$answerWeighting=$objAnswerTmp->selectWeighting(1); |
|
|
|
|
|
|
|
$questionScore+=$answerWeighting; |
|
|
|
|
|
|
|
$totalScore+=$answerWeighting; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
unset ($objAnswerTmp); |
|
|
|
unset ($objAnswerTmp); |
|
|
|
|
|
|
|
|
|
|
|
$i++; |
|
|
|
$i++; |
|
|
|
@ -654,6 +657,8 @@ if ($formSent) { |
|
|
|
$reply = array_keys($choice); |
|
|
|
$reply = array_keys($choice); |
|
|
|
for ($i = 0; $i < sizeof($reply); $i++) { |
|
|
|
for ($i = 0; $i < sizeof($reply); $i++) { |
|
|
|
$ans = $reply[$i]; |
|
|
|
$ans = $reply[$i]; |
|
|
|
|
|
|
|
echo ($questionScore.' - '.$ans.' - '. $quesId.' - '. $exeId.' - '. $i); |
|
|
|
|
|
|
|
echo '<br />'; |
|
|
|
exercise_attempt($questionScore, $ans, $quesId, $exeId, $i); |
|
|
|
exercise_attempt($questionScore, $ans, $quesId, $exeId, $i); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|