';
echo Security::remove_XSS($answerHTML, COURSEMANAGERLOWSECURITY);
echo ' | ';
} else {
?>
|
|
'.Security::remove_XSS($answer).' | ';
} else {
?>
|
|
';
echo Security::remove_XSS($answer);
echo ' | ';
}
if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
if ($questionScore > 0 || !empty($comments)) {
} else {
echo '';
echo Display::tag('td', ExerciseLib::getNotCorrectedYetText(), []);
echo '
';
}
}
}
/**
* @param $feedback_type
* @param $answer
* @param $id
* @param $questionId
* @param null $fileUrl
* @param int $results_disabled
* @param int $questionScore
*/
public static function display_oral_expression_answer(
$feedback_type,
$answer,
$id,
$questionId,
$fileUrl = null,
$results_disabled = 0,
$questionScore = 0
)
{
if (isset($fileUrl)) {
echo '
|
';
}
if (empty($id)) {
echo '';
echo Display::tag('td', Security::remove_XSS($answer), array('width'=>'55%'));
echo '
';
if (!$questionScore && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
echo '';
echo Display::tag('td', ExerciseLib::getNotCorrectedYetText(), array('width'=>'45%'));
echo '
';
} else {
echo ' |
';
}
} else {
echo '';
echo '';
if (!empty($answer)) {
echo Security::remove_XSS($answer);
}
echo ' | ';
if (!api_is_allowed_to_edit(null, true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
echo '';
$comm = Event::get_comments($id, $questionId);
echo ' | ';
}
echo '
';
}
}
/**
* Displays the answer to a hotspot question
* @param int $feedback_type
* @param int $answerId
* @param string $answer
* @param string $studentChoice
* @param string $answerComment
* @param int $resultsDisabled
* @param int $orderColor
* @param bool $showTotalScoreAndUserChoices
*/
public static function display_hotspot_answer(
$feedback_type,
$answerId,
$answer,
$studentChoice,
$answerComment,
$resultsDisabled,
$orderColor,
$showTotalScoreAndUserChoices
) {
$hide_expected_answer = false;
if ($feedback_type == 0 && $resultsDisabled == 2) {
$hide_expected_answer = true;
}
if ($resultsDisabled == RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT) {
if ($showTotalScoreAndUserChoices) {
$hide_expected_answer = false;
} else {
$hide_expected_answer = true;
}
}
$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($answerComment).'';
}
?>
|
|
|
|
|
'.nl2br($answerComment).'';
} else {
$color = 'black';
//echo ''.nl2br($answerComment).'';
}
if ($hide_expected_answer) {
$color = '';
}
echo ''.nl2br($answerComment).'';
}
?>
|
|
|
|
|
'.nl2br($answerComment).'';
}
?>
|
|
options[$studentChoice])) {
echo $question->options[$studentChoice];
} else {
echo $question->options[2];
}
?>
|
options[$answerCorrect])) {
echo $question->options[$answerCorrect];
} else {
echo $question->options[2];
}
} else {
echo '-';
}
?>
|
|
'.nl2br($answerComment).'';
}
?>
|
';
}
echo '
';
}
/**
* @param $feedback_type
* @param $exe_id
* @param $questionId
* @param null $questionScore
* @param int $results_disabled
*/
public static function displayAnnotationAnswer(
$feedback_type,
$exe_id,
$questionId,
$questionScore = null,
$results_disabled = 0
) {
$comments = Event::get_comments($exe_id, $questionId);
if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
if ($questionScore <= 0 && empty($comments)) {
echo '
'.ExerciseLib::getNotCorrectedYetText();
}
}
}
}