Permalink
Browse files

MDL-34568: Accessibility: Added missing lables in quiz section

AMOS BEGIN
 CPY [pluginname,grade_export_xls],[downloadexcel,table]
 CPY [pluginname,grade_export_ods],[downloadods,table]
AMOS END
  • Loading branch information...
1 parent 935c3d5 commit 0465ef6e319aa1801cccfb2d5bec72a94c3d87ac Rajesh Taneja committed Aug 23, 2012
View
@@ -23,10 +23,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['downloadas'] = 'Download table data as';
-$string['downloadcsv'] = 'a comma separated values text file';
-$string['downloadexcel'] = 'a Microsoft Excel spreadsheet';
-$string['downloadods'] = 'an OpenDocument Spreadsheet (ODS)';
+$string['downloadas'] = 'Download table data as {$a->formatsmenu} {$a->downloadbutton}';
+$string['downloadcsv'] = 'Comma separated values text file';
+$string['downloadexcel'] = 'Excel spreadsheet';
+$string['downloadods'] = 'OpenDocument spreadsheet';
$string['downloadoptions'] = 'Select download options';
-$string['downloadtsv'] = 'a tab separated values text file';
-$string['downloadxhtml'] = 'an unpaged XHTML document';
+$string['downloadtsv'] = 'Tab separated values text file';
+$string['downloadxhtml'] = 'Unpaged XHTML document';
View
@@ -915,11 +915,15 @@ function get_download_menu() {
function download_buttons() {
if ($this->is_downloadable() && !$this->is_downloading()) {
$downloadoptions = $this->get_download_menu();
+
+ $downloadelements = new stdClass();
+ $downloadelements->formatsmenu = html_writer::select($downloadoptions,
+ 'download', $this->defaultdownloadformat, false);
+ $downloadelements->downloadbutton = '<input type="submit" value="'.
+ get_string('download').'"/>';
$html = '<form action="'. $this->baseurl .'" method="post">';
$html .= '<div class="mdl-align">';
- $html .= '<input type="submit" value="'.get_string('downloadas', 'table').'"/>';
- $html .= html_writer::label(get_string('downloadoptions', 'table'), 'menudownload', false, array('class' => 'accesshide'));
- $html .= html_writer::select($downloadoptions, 'download', $this->defaultdownloadformat, false);
+ $html .= html_writer::tag('label', get_string('downloadas', 'table', $downloadelements));
$html .= '</div></form>';
return $html;
View
@@ -433,15 +433,15 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
$pagingdisabled . ' />';
$reordercontrols2top = '<div class="moveselectedonpage">' .
- get_string('moveselectedonpage', 'quiz', $a) .
+ '<label>' . get_string('moveselectedonpage', 'quiz', $a) . '</label>' .
'<input type="submit" name="savechanges" value="' .
$strmove . '" ' . $pagingdisabled . ' />' . '
<br /><input type="submit" name="savechanges" value="' .
$strreorderquestions . '" /></div>';
$reordercontrols2bottom = '<div class="moveselectedonpage">' .
'<input type="submit" name="savechanges" value="' .
$strreorderquestions . '" /><br />' .
- get_string('moveselectedonpage', 'quiz', $b) .
+ '<label>' . get_string('moveselectedonpage', 'quiz', $b) . '</label>' .
'<input type="submit" name="savechanges" value="' .
$strmove . '" ' . $pagingdisabled . ' /> ' . '</div>';
@@ -650,7 +650,10 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
?>
<div class="qorder">
<?php
+ echo '<label class="accesshide" for="o' . $question->id . '">' .
+ get_string('questionposition', 'quiz', $qnodisplay) . '</label>';
echo '<input type="text" name="o' . $question->id .
+ '" id="o' . $question->id . '"' .
'" size="2" value="' . (10*$count + 10) .
'" tabindex="' . ($lastindex + $qno) . '" />';
?>
@@ -582,6 +582,7 @@
$string['questionnonavinfo'] = '<span class="accesshide">Information </span>{$a->number}<span class="accesshide"> {$a->attributes}</span>';
$string['questionnotloaded'] = 'Question {$a} has not been loaded from the database';
$string['questionorder'] = 'Question order';
+$string['questionposition'] = 'New position in order for question {$a}';
$string['questions'] = 'Questions';
$string['questionsinclhidden'] = 'Questions (including hidden)';
$string['questionsinthisquiz'] = 'Questions in this quiz';
@@ -40,7 +40,7 @@
$string['detailedanalysis'] = 'More detailed analysis of the responses to this question';
$string['discrimination_index'] = 'Discrimination index';
$string['discriminative_efficiency'] = 'Discriminative efficiency';
-$string['downloadeverything'] = 'Download full report as';
+$string['downloadeverything'] = 'Download full report as {$a->formatsmenu} {$a->downloadbutton}';
$string['duration'] = 'Open for';
$string['effective_weight'] = 'Effective weight';
$string['errordeleting'] = 'Error deleting old {$a} records.';
@@ -966,13 +966,16 @@ protected function analyse_responses($quizstatisticsid, $quizid, $currentgroup,
protected function everything_download_options() {
$downloadoptions = $this->table->get_download_menu();
+ $downloadelements = new stdClass();
+ $downloadelements->formatsmenu = html_writer::select($downloadoptions, 'download',
+ $this->table->defaultdownloadformat, false);
+ $downloadelements->downloadbutton = '<input type="submit" value="' .
+ get_string('download') . '"/>';
+
$output = '<form action="'. $this->table->baseurl .'" method="post">';
$output .= '<div class="mdl-align">';
$output .= '<input type="hidden" name="everything" value="1"/>';
- $output .= '<input type="submit" value="' .
- get_string('downloadeverything', 'quiz_statistics') . '"/>';
- $output .= html_writer::select($downloadoptions, 'download',
- $this->table->defaultdownloadformat, false);
+ $output .= html_writer::tag('label', get_string('downloadeverything', 'quiz_statistics', $downloadelements));
$output .= '</div></form>';
return $output;

0 comments on commit 0465ef6

Please sign in to comment.