'. nl2br(Security::remove_XSS($answer,COURSEMANAGERLOWSECURITY)).' | ';
} else {
?>
|
|
';
echo Display::tag('td',nl2br(Security::remove_XSS($answer,COURSEMANAGERLOWSECURITY)), array('width'=>'55%'));
echo '';
}
if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
echo '';
echo Display::tag('td',get_lang('notCorrectedYet'), array('width'=>'45%'));
echo '
';
} else {
echo ' |
';
}
} else {
echo '';
if (!empty($answer)) {
echo '';
echo nl2br(Security::remove_XSS($answer,COURSEMANAGERLOWSECURITY));
echo ' | ';
}
if (!api_is_allowed_to_edit(null,true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
echo '';
$comm = get_comments($id,$questionId);
echo ' | ';
}
echo '
';
}
}
function display_oral_expression_answer($answer,$id,$questionId, $nano = null) {
global $feedback_type;
if (isset($nano)) {
echo $nano->show_audio_file();
}
if (empty($id)) {
echo '';
echo Display::tag('td',nl2br(Security::remove_XSS($answer,COURSEMANAGERLOWSECURITY)), array('width'=>'55%'));
echo '
';
if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
echo '';
echo Display::tag('td',get_lang('notCorrectedYet'), array('width'=>'45%'));
echo '
';
} else {
echo ' |
';
}
} else {
echo '';
echo '';
if (!empty($answer)) {
echo nl2br(Security::remove_XSS($answer,COURSEMANAGERLOWSECURITY));
}
echo ' | ';
if (!api_is_allowed_to_edit(null,true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
echo '';
$comm = get_comments($id,$questionId);
echo ' | ';
}
echo '
';
}
}
/**
* Displays the answer to a hotspot question
*
* @param int $answerId
* @param string $answer
* @param string $studentChoice
* @param string $answerComment
*/
function display_hotspot_answer($answerId, $answer, $studentChoice, $answerComment) {
global $feedback_type;
$hotspot_colors = array("", // $i starts from 1 on next loop (ugly fix)
"#4271B5",
"#FE8E16",
"#45C7F0",
"#BCD631",
"#D63173",
"#D7D7D7",
"#90AFDD",
"#AF8640",
"#4F9242",
"#F4EB24",
"#ED2024",
"#3B3B3B",
"#F7BDE2");
?>
|
|
'.nl2br(make_clickable($answerComment)).'';
} else {
//echo ''.nl2br(make_clickable($answerComment)).'';
}
?>
|
|
|
|
|
'.nl2br(make_clickable($answerComment)).'';
} else {
$color = 'black';
//echo ''.nl2br(make_clickable($answerComment)).'';
}
echo ''.nl2br(make_clickable($answerComment)).'';
} else {
if ($answerCorrect) {
//echo ''.nl2br(make_clickable($answerComment)).'';
} else {
//echo ''.nl2br(make_clickable($answerComment)).'';
}
}
?>
|
|
|
|
|
'.nl2br(make_clickable($answerComment)).'';
if ($studentChoice == $answerCorrect) {
$color = "green";
// echo ''.nl2br(make_clickable($answerComment)).'';
}
}
if ($studentChoice == 3 || $studentChoice == '') {
//echo ''.nl2br(make_clickable($answerComment)).'';
} else {
if ($studentChoice == $answerCorrect) {
//echo ''.nl2br(make_clickable($answerComment)).'';
} else {
//echo ''.nl2br(make_clickable($answerComment)).'';
}
}
?>
|
|
options[$studentChoice])) {
echo $question->options[$studentChoice];
} else {
echo $question->options[2];
}
?>
|
options[$answerCorrect])) {
echo $question->options[$answerCorrect];
} else {
echo $question->options[2];
}
?>
|
|
'.nl2br(make_clickable($answerComment)).'';
}
if ($studentChoice == 2 || $studentChoice == '') {
//echo ''.nl2br(make_clickable($answerComment)).'';
} else {
if ($studentChoice == $answerCorrect) {
//echo ''.nl2br(make_clickable($answerComment)).'';
} else {
//echo ''.nl2br(make_clickable($answerComment)).'';
}
}
?>
|
|