MDL-34050 Lesson Module: Fixed spacing and removed array_unique() for responses

This commit is contained in:
Rossiani Wijaya
2013-01-15 11:19:55 +08:00
parent 324e0aa540
commit 96d6ab3a12
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -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;
}
-1
View File
@@ -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;