|
|
|
@ -542,11 +542,18 @@ class ExerciseShowFunctions |
|
|
|
|
if (false === $hideStudentChoice) { |
|
|
|
|
$content .= '<td width="5%">'; |
|
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
|
$new_options = Question::readQuestionOption($questionId); |
|
|
|
|
$new_options = []; |
|
|
|
|
$originOptions = Question::readQuestionOption($questionId); |
|
|
|
|
|
|
|
|
|
if (!empty($originOptions)) { |
|
|
|
|
foreach ($originOptions as $item) { |
|
|
|
|
$new_options[$item['iid']] = $item; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Your choice |
|
|
|
|
if (isset($new_options[$studentChoice - 1])) { |
|
|
|
|
$content .= get_lang($new_options[$studentChoice - 1]['name']); |
|
|
|
|
if (isset($new_options[$studentChoice])) { |
|
|
|
|
$content .= get_lang($new_options[$studentChoice]['name']); |
|
|
|
|
} else { |
|
|
|
|
$content .= '-'; |
|
|
|
|
} |
|
|
|
@ -557,8 +564,8 @@ class ExerciseShowFunctions |
|
|
|
|
if ($exercise->showExpectedChoiceColumn()) { |
|
|
|
|
if (!$hide_expected_answer) { |
|
|
|
|
$content .= '<td width="5%">'; |
|
|
|
|
if (isset($new_options[$answerCorrect - 1])) { |
|
|
|
|
$content .= get_lang($new_options[$answerCorrect - 1]['name']); |
|
|
|
|
if (isset($new_options[$answerCorrect])) { |
|
|
|
|
$content .= get_lang($new_options[$answerCorrect]['name']); |
|
|
|
|
} else { |
|
|
|
|
$content .= '-'; |
|
|
|
|
} |
|
|
|
|