MDL-34050 Lesson Module: Fixed spacing and removed array_unique() for responses
This commit is contained in:
@@ -2311,9 +2311,9 @@ abstract class lesson_page extends lesson_base {
|
||||
$count = 0;
|
||||
$qtype = $properties->qtype;
|
||||
foreach ($this->answers as $answer) {
|
||||
$properties->{'answer_editor['.$count.']'} = array('text'=>$answer->answer, 'format'=>$answer->answerformat);
|
||||
$properties->{'answer_editor['.$count.']'} = array('text' => $answer->answer, 'format' => $answer->answerformat);
|
||||
if ($qtype != LESSON_PAGE_MATCHING) {
|
||||
$properties->{'response_editor['.$count.']'} = array('text'=>$answer->response, 'format'=>$answer->responseformat);
|
||||
$properties->{'response_editor['.$count.']'} = array('text' => $answer->response, 'format' => $answer->responseformat);
|
||||
} else {
|
||||
$properties->{'response_editor['.$count.']'} = $answer->response;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,6 @@ class lesson_page_type_matching extends lesson_page {
|
||||
if (!empty($responses)) {
|
||||
$shuffleresponses = $responses;
|
||||
shuffle($shuffleresponses);
|
||||
$shuffleresponses = array_unique($shuffleresponses);
|
||||
foreach ($shuffleresponses as $response) {
|
||||
$key = array_search($response, $responses);
|
||||
$responseoptions[$key] = $response;
|
||||
|
||||
Reference in New Issue
Block a user