|
|
|
@ -1968,9 +1968,6 @@ class Exercise { |
|
|
|
|
$totalWeighting = 0; |
|
|
|
|
$totalScore = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Destruction of the Question object |
|
|
|
|
unset ($objQuestionTmp); |
|
|
|
|
|
|
|
|
@ -2576,36 +2573,36 @@ class Exercise { |
|
|
|
|
if ($answerType != MATCHING || $answerCorrect) { |
|
|
|
|
if (in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION, MULTIPLE_ANSWER, MULTIPLE_ANSWER_COMBINATION, GLOBAL_MULTIPLE_ANSWER))) { |
|
|
|
|
if ($origin != 'learnpath') { |
|
|
|
|
ExerciseShowFunctions::display_unique_or_multiple_answer($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,0,0,0); |
|
|
|
|
ExerciseShowFunctions::display_unique_or_multiple_answer($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect, 0, 0, 0); |
|
|
|
|
} |
|
|
|
|
} elseif($answerType == MULTIPLE_ANSWER_TRUE_FALSE) { |
|
|
|
|
if ($origin!='learnpath') { |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_true_false($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,0,$questionId,0); |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_true_false($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect,0,$questionId,0); |
|
|
|
|
} |
|
|
|
|
} elseif($answerType == MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE ) { |
|
|
|
|
if ($origin!='learnpath') { |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_combination_true_false($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,0,0,0); |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_combination_true_false($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect,0,0,0); |
|
|
|
|
} |
|
|
|
|
} elseif($answerType == FILL_IN_BLANKS) { |
|
|
|
|
if ($origin!='learnpath') { |
|
|
|
|
ExerciseShowFunctions::display_fill_in_blanks_answer($answer,0,0); |
|
|
|
|
ExerciseShowFunctions::display_fill_in_blanks_answer($feedback_type, $answer,0,0); |
|
|
|
|
} |
|
|
|
|
} elseif($answerType == FREE_ANSWER) { |
|
|
|
|
if($origin != 'learnpath') { |
|
|
|
|
ExerciseShowFunctions::display_free_answer($choice, $exeId, $questionId, $questionScore); |
|
|
|
|
ExerciseShowFunctions::display_free_answer($feedback_type, $choice, $exeId, $questionId, $questionScore); |
|
|
|
|
} |
|
|
|
|
} elseif($answerType == ORAL_EXPRESSION) { |
|
|
|
|
// to store the details of open questions in an array to be used in mail |
|
|
|
|
if ($origin != 'learnpath') { |
|
|
|
|
ExerciseShowFunctions::display_oral_expression_answer($choice, 0, 0, $nano); |
|
|
|
|
ExerciseShowFunctions::display_oral_expression_answer($feedback_type, $choice, 0, 0, $nano); |
|
|
|
|
} |
|
|
|
|
} elseif($answerType == HOT_SPOT) { |
|
|
|
|
if ($origin != 'learnpath') { |
|
|
|
|
ExerciseShowFunctions::display_hotspot_answer($answerId, $answer, $studentChoice, $answerComment); |
|
|
|
|
ExerciseShowFunctions::display_hotspot_answer($feedback_type, $answerId, $answer, $studentChoice, $answerComment); |
|
|
|
|
} |
|
|
|
|
} elseif($answerType == HOT_SPOT_ORDER) { |
|
|
|
|
if ($origin != 'learnpath') { |
|
|
|
|
ExerciseShowFunctions::display_hotspot_order_answer($answerId, $answer, $studentChoice, $answerComment); |
|
|
|
|
ExerciseShowFunctions::display_hotspot_order_answer($feedback_type, $answerId, $answer, $studentChoice, $answerComment); |
|
|
|
|
} |
|
|
|
|
} elseif ($answerType == HOT_SPOT_DELINEATION) { |
|
|
|
|
$user_answer = $_SESSION['exerciseResultCoordinates'][$questionId]; |
|
|
|
@ -2775,39 +2772,39 @@ class Exercise { |
|
|
|
|
case GLOBAL_MULTIPLE_ANSWER : |
|
|
|
|
case MULTIPLE_ANSWER_COMBINATION : |
|
|
|
|
if ($answerId==1) { |
|
|
|
|
ExerciseShowFunctions::display_unique_or_multiple_answer($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,$answerId); |
|
|
|
|
ExerciseShowFunctions::display_unique_or_multiple_answer($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,$answerId); |
|
|
|
|
} else { |
|
|
|
|
ExerciseShowFunctions::display_unique_or_multiple_answer($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,""); |
|
|
|
|
ExerciseShowFunctions::display_unique_or_multiple_answer($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,""); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE: |
|
|
|
|
if ($answerId==1) { |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_combination_true_false($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,$answerId); |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_combination_true_false($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,$answerId); |
|
|
|
|
} else { |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_combination_true_false($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,""); |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_combination_true_false($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,""); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case MULTIPLE_ANSWER_TRUE_FALSE : |
|
|
|
|
if ($answerId==1) { |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_true_false($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,$answerId); |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_true_false($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId,$answerId); |
|
|
|
|
} else { |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_true_false($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId, ""); |
|
|
|
|
ExerciseShowFunctions::display_multiple_answer_true_false($feedback_type, $answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$exeId,$questionId, ""); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case FILL_IN_BLANKS: |
|
|
|
|
ExerciseShowFunctions::display_fill_in_blanks_answer($answer,$exeId,$questionId); |
|
|
|
|
ExerciseShowFunctions::display_fill_in_blanks_answer($feedback_type, $answer,$exeId,$questionId); |
|
|
|
|
break; |
|
|
|
|
case FREE_ANSWER: |
|
|
|
|
echo ExerciseShowFunctions::display_free_answer($choice, $exeId, $questionId, $questionScore); |
|
|
|
|
echo ExerciseShowFunctions::display_free_answer($feedback_type, $choice, $exeId, $questionId, $questionScore); |
|
|
|
|
break; |
|
|
|
|
case ORAL_EXPRESSION: |
|
|
|
|
echo '<tr> |
|
|
|
|
<td valign="top">'.ExerciseShowFunctions::display_oral_expression_answer($choice, $exeId, $questionId, $nano).'</td> |
|
|
|
|
<td valign="top">'.ExerciseShowFunctions::display_oral_expression_answer($feedback_type, $choice, $exeId, $questionId, $nano).'</td> |
|
|
|
|
</tr> |
|
|
|
|
</table>'; |
|
|
|
|
break; |
|
|
|
|
case HOT_SPOT: |
|
|
|
|
ExerciseShowFunctions::display_hotspot_answer($answerId, $answer, $studentChoice, $answerComment); |
|
|
|
|
ExerciseShowFunctions::display_hotspot_answer($feedback_type, $answerId, $answer, $studentChoice, $answerComment); |
|
|
|
|
break; |
|
|
|
|
case HOT_SPOT_DELINEATION: |
|
|
|
|
$user_answer = $user_array; |
|
|
|
@ -2955,7 +2952,7 @@ class Exercise { |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case HOT_SPOT_ORDER: |
|
|
|
|
ExerciseShowFunctions::display_hotspot_order_answer($answerId, $answer, $studentChoice, $answerComment); |
|
|
|
|
ExerciseShowFunctions::display_hotspot_order_answer($feedback_type, $answerId, $answer, $studentChoice, $answerComment); |
|
|
|
|
break; |
|
|
|
|
case MATCHING: |
|
|
|
|
if ($origin != 'learnpath') { |
|
|
|
|