Skip to content

Commit

Permalink
MDL-34050 Lesson Module: Fixed spacing and removed array_unique() for…
Browse files Browse the repository at this point in the history
… responses
  • Loading branch information
Rossiani Wijaya committed Jan 15, 2013
1 parent 2e48a42 commit b0ff0e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mod/lesson/locallib.php
Expand Up @@ -2311,9 +2311,9 @@ public function properties() {
$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;
}
Expand Down
1 change: 0 additions & 1 deletion mod/lesson/pagetypes/matching.php
Expand Up @@ -80,7 +80,6 @@ protected function make_answer_form($attempt=null) {
if (!empty($responses)) {
$shuffleresponses = $responses;
shuffle($shuffleresponses);
$shuffleresponses = array_unique($shuffleresponses);
foreach ($shuffleresponses as $response) {
$key = array_search($response, $responses);
$responseoptions[$key] = $response;
Expand Down

0 comments on commit b0ff0e9

Please sign in to comment.