@ -2317,11 +2317,11 @@ class Exercise {
$choice = Database::result($resq,0,'answer');
$choice = Database::result($resq,0,'answer');
$choice = str_replace('\r\n', '', $choice);
$choice = str_replace('\r\n', '', $choice);
$choice = stripslashes($choice);
$choice = stripslashes($choice);
$questionScore = Database::result($resq,0,"marks");
$questionScore = Database::result($resq, 0, "marks");
if ($questionScore==-1) {
if ($questionScore == -1) {
$totalScore+=0;
$totalScore+= 0;
} else {
} else {
$totalScore+=$questionScore;
$totalScore+= $questionScore;
}
}
$arrques = $questionName;
$arrques = $questionName;
$arrans = $choice;
$arrans = $choice;
@ -2357,8 +2357,7 @@ class Exercise {
$totalScore += 0;
$totalScore += 0;
}
}
}
}
break;
break;
// for matching
// for matching
case MATCHING :
case MATCHING :
if ($from_database) {
if ($from_database) {
@ -2520,7 +2519,7 @@ class Exercise {
}
}
} elseif($answerType == FREE_ANSWER) {
} elseif($answerType == FREE_ANSWER) {
if($origin != 'learnpath') {
if($origin != 'learnpath') {
ExerciseShowFunctions::display_free_answer($choice, $exeId, $questionId);
ExerciseShowFunctions::display_free_answer($choice, $exeId, $questionId, $questionScore );
}
}
} elseif($answerType == ORAL_EXPRESSION) {
} elseif($answerType == ORAL_EXPRESSION) {
// to store the details of open questions in an array to be used in mail
// to store the details of open questions in an array to be used in mail
@ -2730,7 +2729,7 @@ class Exercise {
ExerciseShowFunctions::display_fill_in_blanks_answer($answer,$exeId,$questionId);
ExerciseShowFunctions::display_fill_in_blanks_answer($answer,$exeId,$questionId);
break;
break;
case FREE_ANSWER:
case FREE_ANSWER:
echo ExerciseShowFunctions::display_free_answer($choice, $exeId, $questionId);
echo ExerciseShowFunctions::display_free_answer($choice, $exeId, $questionId, $questionScore );
break;
break;
case ORAL_EXPRESSION:
case ORAL_EXPRESSION:
echo '< tr >
echo '< tr >