Skip to content

Commit

Permalink
Merge branch 'MDL-34567_accessibility' of git://github.com/rwijaya/mo…
Browse files Browse the repository at this point in the history
…odle
  • Loading branch information
danpoltawski committed Aug 7, 2012
2 parents 99f868c + 68ca508 commit f7cae82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mod/lesson/pagetypes/matching.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,19 @@ public function report_answers($answerpage, $answerdata, $useranswer, $pagestats
$answerdata->score = get_string("didnotreceivecredit", "lesson");
}
} elseif ($n > 1) {
$data = "<select disabled=\"disabled\"><option selected=\"selected\">".strip_tags(format_string($answer->answer))."</option></select>";
$data = '<label class="accesshide" for="answer_' . $n . '">' . get_string('answer', 'lesson') . '</label>';
$data .= "<select id=\"answer_". $n ."\" disabled=\"disabled\"><option selected=\"selected\">".strip_tags(format_string($answer->answer))."</option></select>";
if ($useranswer != NULL) {
$userresponse = explode(",", $useranswer->useranswer);
$data .= "<select disabled=\"disabled\"><option selected=\"selected\">";
$data .= '<label class="accesshide" for="stu_answer_response_' . $n . '">' . get_string('matchesanswer', 'lesson') . '</label>';
$data .= "<select id=\"stu_answer_response_" . $n . "\" disabled=\"disabled\"><option selected=\"selected\">";
if (array_key_exists($i, $userresponse)) {
$data .= strip_tags(format_string($answers[$userresponse[$i]]->response));
}
$data .= "</option></select>";
} else {
$data .= "<select disabled=\"disabled\"><option selected=\"selected\">".strip_tags(format_string($answer->response))."</option></select>";
$data .= '<label class="accesshide" for="answer_response_' . $n . '">' . get_string('matchesanswer', 'lesson') . '</label>';
$data .= "<select id=\"answer_response_" . $n . "\" disabled=\"disabled\"><option selected=\"selected\">".strip_tags(format_string($answer->response))."</option></select>";
}

if ($n == 2) {
Expand Down
1 change: 1 addition & 0 deletions mod/lesson/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
if (has_capability('mod/lesson:edit', $context)) {
$checklinks = '<a href="javascript: checkall();">'.get_string('selectall').'</a> / ';
$checklinks .= '<a href="javascript: checknone();">'.get_string('deselectall').'</a>';
$checklinks .= html_writer::label('action', 'menuaction', false, array('class' => 'accesshide'));
$checklinks .= html_writer::select(array('delete' => get_string('deleteselected')), 'action', 0, array(''=>'choosedots'), array('id'=>'actionid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('theform', 'actionid', ''));
echo $OUTPUT->box($checklinks, 'center');
Expand Down

0 comments on commit f7cae82

Please sign in to comment.