diff --git a/admin/filters.php b/admin/filters.php index 0d7faa3c088..b21e1df057d 100644 --- a/admin/filters.php +++ b/admin/filters.php @@ -242,6 +242,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings) // Disable/off/on $select = new single_select(filters_action_url($filter, 'setstate'), 'newstate', $activechoices, $filterinfo->active, null, 'active' . basename($filter)); + $select->set_label(get_accesshide(get_string('isactive', 'filters'))); $row[] = $OUTPUT->render($select); // Re-order @@ -263,6 +264,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings) // Apply to strings. $select = new single_select(filters_action_url($filter, 'setapplyto'), 'stringstoo', $applytochoices, $applytostrings, null, 'applyto' . basename($filter)); + $select->set_label(get_accesshide(get_string('applyto', 'filters'))); $select->disabled = $filterinfo->active == TEXTFILTER_DISABLED; $row[] = $OUTPUT->render($select); diff --git a/admin/mnet/access_control.php b/admin/mnet/access_control.php index 5721d54648f..7072896e764 100644 --- a/admin/mnet/access_control.php +++ b/admin/mnet/access_control.php @@ -203,17 +203,18 @@ echo get_string('username') . ":\n"; if (!empty($formerror['username'])) { echo ' * '; } -echo ''; +echo html_writer::label(get_string('username'), 'menuusername', false, array('class' =>'accesshide')); +echo ''; // choose a remote host -echo " " . get_string('remotehost', 'mnet') . ":\n"; +echo html_writer::label(get_string('remotehost', 'mnet'), 'menumnet_host_id'); if (!empty($formerror['mnet_host_id'])) { echo ' * '; } echo html_writer::select($mnethosts, 'mnet_host_id'); // choose an access level -echo " " . get_string('accesslevel', 'mnet') . ":\n"; +echo html_writer::label(get_string('accesslevel', 'mnet'), 'menuaccessctrl'); if (!empty($formerror['accessctrl'])) { echo ' * '; } diff --git a/admin/portfolio.php b/admin/portfolio.php index 791c79f9489..2e0ca378943 100644 --- a/admin/portfolio.php +++ b/admin/portfolio.php @@ -197,6 +197,7 @@ if (($action == 'edit') || ($action == 'new')) { $currentaction = 'hide'; } $select = new single_select(portfolio_action_url($pluginid, 'pf'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . $pluginid); + $select->set_label(get_accesshide(get_string('portfolio', 'portfolio'))); $table->data[] = array($pluginname, $OUTPUT->render($select), $settings); } if (!in_array($plugin, $usedplugins)) { diff --git a/admin/repository.php b/admin/repository.php index c3409a5b5a0..3b625a68a36 100644 --- a/admin/repository.php +++ b/admin/repository.php @@ -305,7 +305,7 @@ if (($action == 'edit') || ($action == 'new')) { } $select = new single_select(repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename)); - + $select->set_label(get_accesshide(get_string('action'))); // Display up/down link $updown = ''; $spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead @@ -342,6 +342,7 @@ if (($action == 'edit') || ($action == 'new')) { // Check that it has not already been listed if (!in_array($plugin, $alreadyplugins)) { $select = new single_select(repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin)); + $select->set_label(get_accesshide(get_string('action'))); $table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', ''); } } diff --git a/admin/roles/lib.php b/admin/roles/lib.php index 7fc5782eb2d..3719eae970c 100644 --- a/admin/roles/lib.php +++ b/admin/roles/lib.php @@ -721,7 +721,10 @@ class define_role_table_advanced extends capability_table_with_risks { foreach(get_role_archetypes() as $type) { $options[$type] = get_string('archetype'.$type, 'role'); } - return html_writer::select($options, 'archetype', $this->role->archetype, false); + + $return = html_writer::label(get_string('archetype'.$type, 'role'), 'menuarchetype', false, array('class' => 'accesshide')); + $return .= html_writer::select($options, 'archetype', $this->role->archetype, false); + return $return; } protected function get_assignable_levels_control() { diff --git a/admin/timezone.php b/admin/timezone.php index 34e1fa40fda..b3fef54cd97 100644 --- a/admin/timezone.php +++ b/admin/timezone.php @@ -42,7 +42,7 @@ $timezones = get_list_of_timezones(); echo '
'; - echo "$strusers ($strall): "; + echo html_writer::label($strusers . ' (' . $strall . '): ', 'menuzone'); echo html_writer::select($timezones, "zone", $current, array('99'=>get_string("serverlocaltime"))); echo ""; echo ''; diff --git a/auth/cas/config.html b/auth/cas/config.html index 81894eab743..af8fc10f844 100644 --- a/auth/cas/config.html +++ b/auth/cas/config.html @@ -94,9 +94,9 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + - + error_text($err['hostname']); } ?> @@ -105,10 +105,10 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + - + error_text($err['baseuri']); } ?> @@ -117,10 +117,10 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + - + error_text($err['port']); } ?> @@ -129,7 +129,7 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + : - : + : language, false); ?> @@ -155,7 +155,7 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + : proxycas, false); ?> @@ -165,7 +165,7 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + : logoutcas, false); ?> @@ -174,7 +174,7 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + : multiauth, false); ?> @@ -183,7 +183,7 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + : certificate_check, false); ?> @@ -192,7 +192,7 @@ $yesno = array( get_string('no'), get_string('yes') ); - : + error_text($err['certificate_path']); ?> @@ -219,7 +219,7 @@ $yesno = array( get_string('no'), get_string('yes') ); - + - : + - + error_text($err["host"]); ?> @@ -38,9 +38,9 @@ - : + - + error_text($err["host"]); ?> @@ -70,9 +70,9 @@ - : + - + error_text($err["creators"]); ?> @@ -81,9 +81,9 @@ - : + - + changepasswordurl)) { - + - + - + - +
: - + changepasswordurl)) {
: : changepasswordurl)) {
: - + changepasswordurl)) {
: - +
- + mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict' - + +
: - + mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict' - : : changepasswordurl)) { - + - + - +
: - + changepasswordurl)) {
: - + changepasswordurl)) {
: - + changepasswordurl)) { - + - + - + - + - + '; } } else { - - echo get_string('search_course', 'feedback') . ': '; - echo ''; + echo html_writer::label(get_string('search_course', 'feedback') . ': ', 'searchcourse'); + echo ' '; + echo ''; echo ''; echo ''; echo ''; @@ -157,7 +157,7 @@ if ($courseitemfilter > 0) { if ($courses = $DB->get_records_sql_menu($sql, $params)) { echo ' ' . get_string('filter_by_course', 'feedback') . ': '; - + echo html_writer::label(get_string('filter_by_course', 'feedback'), 'coursefilterid'); echo html_writer::select($courses, 'coursefilter', $coursefilter, null, array('id'=>'coursefilterid')); $PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('analysis-form', 'coursefilterid', false)); } diff --git a/mod/feedback/item/multichoice/lib.php b/mod/feedback/item/multichoice/lib.php index cb5cb8f1e42..36dfb6744d7 100644 --- a/mod/feedback/item/multichoice/lib.php +++ b/mod/feedback/item/multichoice/lib.php @@ -660,7 +660,8 @@ class feedback_item_multichoice extends feedback_item_base { ?>
: - + changepasswordurl)) {
: : changepasswordurl)) {
: - + changepasswordurl)) {
: - + changepasswordurl)) {
: - + changepasswordurl)) { - + - + - + - + - + - + @@ -28,9 +28,9 @@ - + - + + + + '; diff --git a/course/scales.php b/course/scales.php index 07bf4fabb3c..8a6e14ab1f3 100644 --- a/course/scales.php +++ b/course/scales.php @@ -70,6 +70,7 @@ if ($scaleid) { echo $OUTPUT->box_start(); echo $OUTPUT->heading($scale->name); echo "
"; + echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide')); echo html_writer::select($scalemenu, 'unused'); echo "
"; echo text_to_html($scale->description); @@ -101,6 +102,7 @@ if ($scales = $DB->get_records("scale", array("courseid"=>$course->id), "name AS echo $OUTPUT->box_start(); echo $OUTPUT->heading($scale->name); echo "
"; + echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide')); echo html_writer::select($scalemenu, 'unused'); echo "
"; echo text_to_html($scale->description); @@ -127,6 +129,7 @@ if ($scales = $DB->get_records("scale", array("courseid"=>0), "name ASC")) { echo $OUTPUT->box_start(); echo $OUTPUT->heading($scale->name); echo "
"; + echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide')); echo html_writer::select($scalemenu, 'unused'); echo "
"; echo text_to_html($scale->description); diff --git a/enrol/authorize/locallib.php b/enrol/authorize/locallib.php index 058b1b08d15..aeee664d08e 100644 --- a/enrol/authorize/locallib.php +++ b/enrol/authorize/locallib.php @@ -58,7 +58,9 @@ function authorize_print_orders($courseid, $userid) { $searchmenu = array('orderid' => $authstrs->orderid, 'transid' => $authstrs->transid, 'cclastfour' => $authstrs->cclastfour); $buttons = "
"; + $buttons .= html_writer::label(get_string('orderdetails', 'enrol_authorize'), 'menusearchtype', false, array('class' => 'accesshide')); $buttons .= html_writer::select($searchmenu, 'searchtype', $searchtype, false); + $buttons .= html_writer::label(get_string('search'), 'menusearchtype', false, array('class' => 'accesshide')); $buttons .= ""; $buttons .= ""; $buttons .= "
"; @@ -81,7 +83,8 @@ function authorize_print_orders($courseid, $userid) { if (($popupcrs = $DB->get_records_sql_menu($sql, $params))) { $popupcrs = array($SITE->id => $SITE->fullname) + $popupcrs; } - $popupmenu = empty($popupcrs) ? '' : $OUTPUT->single_select(new moodle_url($baseurl.'&status='.$status), 'course', $popupcrs, $courseid, null, 'coursesmenu'); + $popmenulabel = array('' => get_accesshide(get_string('course'))); + $popupmenu = empty($popupcrs) ? '' : $OUTPUT->single_select(new moodle_url($baseurl.'&status='.$status), 'course', $popupcrs, $courseid, $popmenulabel, 'coursesmenu'); $popupmenu .= '
'; $statusmenu = array( AN_STATUS_NONE => $strs->all, @@ -97,6 +100,7 @@ function authorize_print_orders($courseid, $userid) { AN_STATUS_TEST => $authstrs->tested ); + $popmenulabel = array('' => get_accesshide(get_string('status'))); $popupmenu .= $OUTPUT->single_select(new moodle_url($baseurl.'&course='.$courseid), 'status', $statusmenu, $status, null, 'statusmenu'); if ($canmanagepayments) { $popupmenu .= '
'; diff --git a/enrol/manual/manage.php b/enrol/manual/manage.php index 94fdc632a9a..f7ea7e2c629 100644 --- a/enrol/manual/manage.php +++ b/enrol/manual/manage.php @@ -162,13 +162,13 @@ echo $OUTPUT->heading($instancename);
-


+


-


+


-


+


diff --git a/filter/algebra/algebradebug.php b/filter/algebra/algebradebug.php index 67b715cc9ab..d62ea6f5ca3 100644 --- a/filter/algebra/algebradebug.php +++ b/filter/algebra/algebradebug.php @@ -275,12 +275,12 @@ function slasharguments($texexp, $md5) { Algebra Filter Debugger -

Please enter an algebraic expression without any surrounding @@ into - the text box below. (Click here for help.) +

-
    diff --git a/filter/manage.php b/filter/manage.php index 943c7fcaea1..04893f1940f 100644 --- a/filter/manage.php +++ b/filter/manage.php @@ -181,7 +181,10 @@ if (empty($availablefilters)) { } else { $activechoices[TEXTFILTER_INHERIT] = $strdefaultoff; } - $row[] = html_writer::select($activechoices, str_replace('/', '_', $filter), $filterinfo->localstate, false); + $filtername = str_replace('/', '_', $filter); + $select = html_writer::label($filterinfo->localstate, 'menu'. $filtername, false, array('class' => 'accesshide')); + $select .= html_writer::select($activechoices, $filtername, $filterinfo->localstate, false); + $row[] = $select; // Settings link, if required if ($settingscol) { diff --git a/grade/edit/tree/calculation.php b/grade/edit/tree/calculation.php index 9993324d2cb..95c2eec0eeb 100644 --- a/grade/edit/tree/calculation.php +++ b/grade/edit/tree/calculation.php @@ -177,6 +177,7 @@ function get_grade_tree(&$gtree, $element, $current_itemid=null, $errors=null) { $name .= '
    ' . $errors[$grade_item->id].'
    '."\n"; $closingdiv = "
    \n"; } + $name .= ''; $name .= '' . "\n"; $name .= $closingdiv; } diff --git a/grade/edit/tree/index.php b/grade/edit/tree/index.php index 8d88615cf37..16ce5651516 100644 --- a/grade/edit/tree/index.php +++ b/grade/edit/tree/index.php @@ -343,8 +343,8 @@ if (!$moving) { if (!$moving && count($grade_edit_tree->categories) > 1) { echo '

    '; echo ''; - echo get_string('moveselectedto', 'grades') . ' '; $attributes = array('id'=>'menumoveafter'); + echo html_writer::label(get_string('moveselectedto', 'grades'), 'menumoveafter', false, array('class' => 'accesshide')); echo html_writer::select($grade_edit_tree->categories, 'moveafter', '', array(''=>'choosedots'), $attributes); $OUTPUT->add_action_handler(new component_action('change', 'submit_bulk_move'), 'menumoveafter'); echo '
    diff --git a/grade/edit/tree/lib.php b/grade/edit/tree/lib.php index 49af48745b2..1241afc5e50 100644 --- a/grade/edit/tree/lib.php +++ b/grade/edit/tree/lib.php @@ -666,7 +666,8 @@ class grade_edit_tree_column_aggregation extends grade_edit_tree_column_category } else { $attributes = array(); $attributes['id'] = 'aggregation_'.$category->id; - $aggregation = html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes); + $aggregation = html_writer::label(get_string('aggregation', 'grades'), 'aggregation_'.$category->id, false, array('class' => 'accesshide')); + $aggregation .= html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes); $action = new component_action('change', 'update_category_aggregation', array('courseid' => $params['id'], 'category' => $category->id, 'sesskey' => sesskey())); $OUTPUT->add_action_handler($action, 'aggregation_'.$category->id); } diff --git a/grade/lib.php b/grade/lib.php index 80b8ba125b4..6928e386359 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -380,7 +380,7 @@ function print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, // finally print/return the popup form if ($count > 1) { $select = new url_select($menu, $active, null, 'choosepluginreport'); - + $select->set_label(get_accesshide(get_string('gradereport', 'grades'))); if ($return) { return $OUTPUT->render($select); } else { diff --git a/grade/report/grader/lib.php b/grade/report/grader/lib.php index 309ec571059..aa8a4db125c 100644 --- a/grade/report/grader/lib.php +++ b/grade/report/grader/lib.php @@ -954,7 +954,8 @@ class grade_report_grader extends grade_report { } $itemcell->text .= ''; $attributes = array('tabindex' => $tabindices[$item->id]['grade'], 'id'=>'grade_'.$userid.'_'.$item->id); - $itemcell->text .= html_writer::select($scaleopt, 'grade_'.$userid.'_'.$item->id, $gradeval, array(-1=>$nogradestr), $attributes);; + $itemcell->text .= html_writer::label(get_string('typescale', 'grades'), 'grade_'.$userid.'_'.$item->id, false, array('class' => 'accesshide')); + $itemcell->text .= html_writer::select($scaleopt, 'grade_'.$userid.'_'.$item->id, $gradeval, array(-1=>$nogradestr), $attributes); } elseif(!empty($scale)) { $scales = explode(",", $scale->scale); diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 7a61b0a5a5f..fef4afb5618 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -1032,6 +1032,8 @@ $string['missingsummary'] = 'Missing summary'; $string['missingteacher'] = 'Must choose something'; $string['missingurl'] = 'Missing URL'; $string['missingusername'] = 'Missing username'; +$string['month'] = 'Month'; +$string['months'] = 'Months'; $string['modified'] = 'Modified'; $string['moduledeleteconfirm'] = 'You are about to completely delete the module \'{$a}\'. This will completely delete everything in the database associated with this activity module. Are you SURE you want to continue?'; $string['moduledeletefiles'] = 'All data associated with the module \'{$a->module}\' has been deleted from the database. To complete the deletion (and prevent the module re-installing itself), you should now delete this directory from your server: {$a->directory}'; diff --git a/lib/adminlib.php b/lib/adminlib.php index 9d182dc1723..e87368d79dc 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -1768,7 +1768,7 @@ class admin_setting_configtext extends admin_setting { return format_admin_setting($this, $this->visiblename, '
    ', - $this->description, true, '', $default, $query); + $this->description, true, '', $default, $query); } } @@ -1973,7 +1973,7 @@ class admin_setting_configfile extends admin_setting_configtext { return format_admin_setting($this, $this->visiblename, '
    '.$executable.'
    ', - $this->description, true, '', $default, $query); + $this->description, true, '', $default, $query); } } @@ -2007,7 +2007,7 @@ class admin_setting_configexecutable extends admin_setting_configfile { return format_admin_setting($this, $this->visiblename, '
    '.$executable.'
    ', - $this->description, true, '', $default, $query); + $this->description, true, '', $default, $query); } } @@ -2041,7 +2041,7 @@ class admin_setting_configdirectory extends admin_setting_configfile { return format_admin_setting($this, $this->visiblename, '
    '.$executable.'
    ', - $this->description, true, '', $default, $query); + $this->description, true, '', $default, $query); } } @@ -2732,11 +2732,14 @@ class admin_setting_configtime extends admin_setting { } $return = '
    '. + '' . '::'; + $return .= ''; + $return .= ''; foreach ($this->choices as $key => $value) { $return .= ''; @@ -3420,8 +3424,10 @@ class admin_setting_emoticons extends admin_setting { } $out .= html_writer::tag('td', + html_writer::label($value, $this->get_full_name() . $field, false, array('class' => 'accesshide')) . html_writer::empty_tag('input', array( + 'id' => $this->get_full_name() . $field, 'type' => 'text', 'class' => 'form-text', 'name' => $this->get_full_name().'['.$field.']', @@ -6515,7 +6521,7 @@ class admin_setting_managerepository extends admin_setting { } $select = new single_select($this->repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename)); - + $select->set_label(get_accesshide(get_string('select') . ' '. get_string('action'))); // Display up/down link $updown = ''; $spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead @@ -6552,6 +6558,7 @@ class admin_setting_managerepository extends admin_setting { // Check that it has not already been listed if (!in_array($plugin, $alreadyplugins)) { $select = new single_select($this->repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin)); + $select->set_label(get_accesshide(get_string('select') . ' '. get_string('action'))); $table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', ''); } } @@ -7665,6 +7672,7 @@ class admin_setting_configcolourpicker extends admin_setting { $PAGE->requires->js_init_call('M.util.init_colour_picker', array($this->get_id(), $this->previewconfig)); $content = html_writer::start_tag('div', array('class'=>'form-colourpicker defaultsnext')); $content .= html_writer::tag('div', $OUTPUT->pix_icon('i/loading', get_string('loading', 'admin'), 'moodle', array('class'=>'loadingicon')), array('class'=>'admin_colourpicker clearfix')); + $content .= html_writer::label($this->get_full_name(), $this->get_id(), false, array('class' => 'accesshide')); $content .= html_writer::empty_tag('input', array('type'=>'text','id'=>$this->get_id(), 'name'=>$this->get_full_name(), 'value'=>$this->get_setting(), 'size'=>'12')); if (!empty($this->previewconfig)) { $content .= html_writer::empty_tag('input', array('type'=>'button','id'=>$this->get_id().'_preview', 'value'=>get_string('preview'), 'class'=>'admin_colourpicker_preview')); @@ -7764,8 +7772,10 @@ class admin_setting_devicedetectregex extends admin_setting { } $out .= html_writer::tag('td', + html_writer::label($this->get_full_name(), $this->get_full_name() . 'expression' . $i, false, array('class' => 'accesshide')) . html_writer::empty_tag('input', array( + 'id' => $this->get_full_name() . 'expression' . $i, 'type' => 'text', 'class' => 'form-text', 'name' => $this->get_full_name().'[expression'.$i.']', @@ -7783,8 +7793,10 @@ class admin_setting_devicedetectregex extends admin_setting { } $out .= html_writer::tag('td', + html_writer::label($this->get_full_name(), $this->get_full_name() . 'value' . $i, false, array('class' => 'accesshide')) . html_writer::empty_tag('input', array( + 'id' => $this->get_full_name() . 'value' . $i, 'type' => 'text', 'class' => 'form-text', 'name' => $this->get_full_name().'[value'.$i.']', diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 95b7c543fbd..7d58fd482a5 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -3626,12 +3626,12 @@ function print_textfield($name, $value, $alt = '', $size=50, $maxlength=0, $retu } $style = "width: {$size}px;"; - $attributes = array('type'=>'text', 'name'=>$name, 'alt'=>$alt, 'style'=>$style, 'value'=>$value); + $attributes = array('type' => 'text', 'id' => $name, 'name' => $name, 'alt' => $alt, 'style' => $style, 'value' => $value); if ($maxlength) { $attributes['maxlength'] = $maxlength; } - - $output = html_writer::empty_tag('input', $attributes); + $output = html_writer::label($name, $name, false, array('class' => 'accesshide')); + $output .= html_writer::empty_tag('input', $attributes); if (empty($return)) { echo $output; diff --git a/lib/form/editor.php b/lib/form/editor.php index 1f475b37d34..6d65dd98ce4 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -238,9 +238,10 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element { $str .= '
    '; if (count($formats)>1) { - $str.= html_writer::select($formats, $elname.'[format]', $format, false); + $str .= html_writer::label(get_string('format'), 'menu'. $elname. '[format]', false, array('class' => 'accesshide')); + $str .= html_writer::select($formats, $elname.'[format]', $format, false); } else { - $str.= html_writer::empty_tag('input', + $str .= html_writer::empty_tag('input', array('name'=>$elname.'[format]', 'type'=> 'hidden', 'value' => array_pop(array_keys($formats)))); } $str .= '
    '; diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 79af3aaaea9..d8ebff55bc6 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1198,6 +1198,12 @@ class core_renderer extends renderer_base { if ($select->label) { $output .= html_writer::label($select->label, $select->attributes['id']); + } else { + if (isset($select->nothing)) { + $label = $select->nothing; + $label = array_pop($label); + $output .= html_writer::label($label, $select->attributes['id'], false, array('class' => 'accesshide')); + } } if ($select->helpicon instanceof help_icon) { @@ -1205,7 +1211,6 @@ class core_renderer extends renderer_base { } else if ($select->helpicon instanceof old_help_icon) { $output .= $this->render($select->helpicon); } - $output .= html_writer::select($select->options, $select->name, $select->selected, $select->nothing, $select->attributes); $go = html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('go'))); @@ -1274,6 +1279,12 @@ class core_renderer extends renderer_base { if ($select->label) { $output .= html_writer::label($select->label, $select->attributes['id']); + } else { + if (isset($select->nothing)) { + $label = $select->nothing; + $label = array_pop($label); + $output .= html_writer::label($label, $select->attributes['id'], false, array('class' => 'accesshide')); + } } if ($select->helpicon instanceof help_icon) { @@ -1484,6 +1495,7 @@ class core_renderer extends renderer_base { $scalearray = array(RATING_UNSET_RATING => $strrate.'...') + $rating->settings->scale->scaleitems; $scaleattrs = array('class'=>'postratingmenu ratinginput','id'=>'menurating'.$rating->itemid); + $ratinghtml .= html_writer::label($rating->rating, 'menurating'.$rating->itemid, false, array('class' => 'accesshide')); $ratinghtml .= html_writer::select($scalearray, 'rating', $rating->rating, false, $scaleattrs); //output submit button diff --git a/lib/portfoliolib.php b/lib/portfoliolib.php index 22f4544c4f4..e0ddefab6d3 100644 --- a/lib/portfoliolib.php +++ b/lib/portfoliolib.php @@ -443,7 +443,8 @@ function portfolio_instance_select($instances, $callerformats, $callbackclass, $ $pinsane = portfolio_plugin_sanity_check(); $count = 0; - $selectoutput = "\n" . '' . "\n"; $existingexports = portfolio_existing_exports_by_plugin($USER->id); foreach ($instances as $instance) { $formats = portfolio_supported_formats_intersect($callerformats, $instance->supported_formats()); diff --git a/lib/questionlib.php b/lib/questionlib.php index a8731a753a5..087f7a41b6b 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -1003,7 +1003,7 @@ function question_category_select_menu($contexts, $top = false, $currentcat = 0, foreach ($categoriesarray as $group => $opts) { $options[] = array($group => $opts); } - + echo html_writer::label($selected, 'menucategory', false, array('class' => 'accesshide')); echo html_writer::select($options, 'category', $selected, $choose); } diff --git a/lib/tablelib.php b/lib/tablelib.php index 9c22c9cd7d3..095b0b7e082 100644 --- a/lib/tablelib.php +++ b/lib/tablelib.php @@ -929,6 +929,7 @@ class flexible_table { $html = ''; $html .= '
    '; $html .= ''; + $html .= html_writer::label($this->defaultdownloadformat, 'menudownload', false, array('class' => 'accesshide')); $html .= html_writer::select($downloadoptions, 'download', $this->defaultdownloadformat, false); $html .= '
    '; diff --git a/lib/weblib.php b/lib/weblib.php index 35e09ebea12..98ed54c357a 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2304,6 +2304,7 @@ function print_grade_menu($courseid, $name, $current, $includenograde=true, $ret for ($i=100; $i>=1; $i--) { $grades[$i] = $i; } + $output .= html_writer::label(get_string('gradeitems', 'grades'), 'menu' . $name, false, array('class' => 'accesshide')); $output .= html_writer::select($grades, $name, $current, false); $linkobject = ''.$strscales.''; diff --git a/message/lib.php b/message/lib.php index c9768527719..53a21998a3f 100644 --- a/message/lib.php +++ b/message/lib.php @@ -507,9 +507,10 @@ function message_print_usergroup_selector($viewing, $courses, $coursecontexts, $ } echo html_writer::start_tag('form', array('id' => 'usergroupform','method' => 'get','action' => '')); - echo html_writer::start_tag('fieldset'); - echo html_writer::select($options, 'viewing', $viewing, false, array('id' => 'viewing','onchange' => 'this.form.submit()')); - echo html_writer::end_tag('fieldset'); + echo html_writer::start_tag('fieldset'); + echo html_writer::label(get_string('gotomessages', 'message'), 'viewing', false, array('class' => 'accesshide')); + echo html_writer::select($options, 'viewing', $viewing, false, array('id' => 'viewing','onchange' => 'this.form.submit()')); + echo html_writer::end_tag('fieldset'); echo html_writer::end_tag('form'); } diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 08144b601c4..712570bdbc5 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -1391,7 +1391,8 @@ class assignment_base { } else if ($quickgrade) { $attributes = array(); $attributes['tabindex'] = $tabindex++; - $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); + $menu = html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide')); + $menu .= html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); $grade = '
    '. $menu .'
    '; } else { $grade = '
    '.$this->display_grade($auser->grade).'
    '; @@ -1404,6 +1405,7 @@ class assignment_base { } else if ($quickgrade) { $attributes = array(); $attributes['tabindex'] = $tabindex++; + html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide')); $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); $grade = '
    '.$menu.'
    '; } else { @@ -1432,6 +1434,7 @@ class assignment_base { } else if ($quickgrade) { // allow editing $attributes = array(); $attributes['tabindex'] = $tabindex++; + html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide')); $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); $grade = '
    '.$menu.'
    '; $hassubmission = true; @@ -1476,7 +1479,7 @@ class assignment_base { if ($uses_outcomes) { foreach($grading_info->outcomes as $n=>$outcome) { - $outcomes .= '
    '; + $outcomes .= '
    '; $options = make_grades_menu(-$outcome->scaleid); if ($outcome->grades[$auser->id]->locked or !$quickgrade) { @@ -1486,6 +1489,7 @@ class assignment_base { $attributes = array(); $attributes['tabindex'] = $tabindex++; $attributes['id'] = 'outcome_'.$n.'_'.$auser->id; + html_writer::label(get_string('assignment:grade', 'assignment'), 'outcome_'.$n.'_'.$auser->id, false, array('class' => 'accesshide')); $outcomes .= ' '.html_writer::select($options, 'outcome_'.$n.'['.$auser->id.']', $outcome->grades[$auser->id]->grade, array(0=>get_string('nooutcome', 'grades')), $attributes); } $outcomes .= '
    '; diff --git a/mod/chat/gui_ajax/index.php b/mod/chat/gui_ajax/index.php index 99dc589fb0b..73291ebb8fc 100644 --- a/mod/chat/gui_ajax/index.php +++ b/mod/chat/gui_ajax/index.php @@ -76,7 +76,7 @@ echo $OUTPUT->box('', '', 'chat-options'); echo $OUTPUT->box('
      ', '', 'chat-messages'); $table = new html_table(); $table->data = array( - array(' » '.get_string('themes').' » ') + array(' » '.get_string('themes').' » ') ); echo $OUTPUT->box(html_writer::table($table), '', 'chat-input-area'); echo $OUTPUT->box('', '', 'chat-notify'); diff --git a/mod/chat/gui_header_js/chatinput.php b/mod/chat/gui_header_js/chatinput.php index a228a925923..73edbaa831f 100644 --- a/mod/chat/gui_header_js/chatinput.php +++ b/mod/chat/gui_header_js/chatinput.php @@ -46,6 +46,7 @@ $PAGE->set_cacheable(false); echo $OUTPUT->header(); echo html_writer::start_tag('form', array('action'=>'../empty.php', 'method'=>'post', 'target'=>'empty', 'id'=>'inputForm', 'style'=>'margin:0')); +echo html_writer::label(get_string('messages', 'chat'), 'input_chat_message', false, array('class' => 'accesshide')); echo html_writer::empty_tag('input', array('type'=>'text', 'id'=>'input_chat_message', 'name'=>'chat_message', 'size'=>'50', 'value'=>'')); echo html_writer::empty_tag('input', array('type'=>'checkbox', 'id'=>'auto', 'checked'=>'checked', 'value'=>'')); echo html_writer::tag('label', get_string('autoscroll', 'chat'), array('for'=>'auto')); diff --git a/mod/chat/gui_sockets/chatinput.php b/mod/chat/gui_sockets/chatinput.php index fe369b5cd67..2edea8b2a61 100644 --- a/mod/chat/gui_sockets/chatinput.php +++ b/mod/chat/gui_sockets/chatinput.php @@ -28,6 +28,7 @@ echo $OUTPUT->header();
      + help_icon('usingchat', 'chat'); ?> diff --git a/mod/data/field.php b/mod/data/field.php index 01ec6dfdc9f..45c0499d246 100644 --- a/mod/data/field.php +++ b/mod/data/field.php @@ -352,6 +352,7 @@ if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) { /// $options = array(0 => get_string('ascending', 'data'), 1 => get_string('descending', 'data')); + echo html_writer::label(get_string('sortby'), 'menudefaultsortdir', false, array('class' => 'accesshide')); echo html_writer::select($options, 'defaultsortdir', $data->defaultsortdir, false); echo ''; echo '
      '; diff --git a/mod/data/field/file/field.class.php b/mod/data/field/file/field.class.php index 9e9df3d0087..0ed8cb9c457 100644 --- a/mod/data/field/file/field.class.php +++ b/mod/data/field/file/field.class.php @@ -91,7 +91,8 @@ class data_field_file extends data_field_base { } function display_search_field($value = '') { - return ''; + return '' . + ''; } function generate_sql($tablealias, $value) { diff --git a/mod/data/field/file/mod.html b/mod/data/field/file/mod.html index 73815b5abbe..03584336ce8 100644 --- a/mod/data/field/file/mod.html +++ b/mod/data/field/file/mod.html @@ -14,6 +14,7 @@ maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course)); $choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes); + echo html_writer::label($this->field->param3, 'menuparam3', false, array('class' => 'accesshide')); echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id' => 'param3')); ?> diff --git a/mod/data/field/latlong/field.class.php b/mod/data/field/latlong/field.class.php index 794f3d07f49..a6f688961fb 100644 --- a/mod/data/field/latlong/field.class.php +++ b/mod/data/field/latlong/field.class.php @@ -82,7 +82,9 @@ class data_field_latlong extends data_field_base { } $latlongsrs->close(); - return html_writer::select($options, 'f_'.$this->field->id, $value); + $return = html_writer::label(get_string('latlong', 'data'), 'menuf_'.$this->field->id, false, array('class' => 'accesshide')); + $return .= html_writer::select($options, 'f_'.$this->field->id, $value); + return $return; } function parse_search_field() { @@ -150,7 +152,9 @@ class data_field_latlong extends data_field_base { . str_replace(array_keys($urlreplacements), array_values($urlreplacements), $this->linkoutservices[$servicesshown[0]]) ."' title='$servicesshown[0]'>$compasslat, $compasslong"; } elseif (sizeof($servicesshown)>1) { - $str .= "$compasslat, $compasslong\n"; foreach($servicesshown as $servicename){ // Add a link to a service $str .= "\n
      '; @@ -86,7 +86,9 @@ class data_field_menu extends data_field_base { return ''; } - return html_writer::select($options, 'f_'.$this->field->id, $content); + $return = html_writer::label(get_string('namemenu', 'data'), 'menuf_'. $this->field->id, false, array('class' => 'accesshide')); + $return .= html_writer::select($options, 'f_'.$this->field->id, $content); + return $return; } function parse_search_field() { diff --git a/mod/data/field/multimenu/field.class.php b/mod/data/field/multimenu/field.class.php index 170af176b0a..1ce4ed326fa 100644 --- a/mod/data/field/multimenu/field.class.php +++ b/mod/data/field/multimenu/field.class.php @@ -38,6 +38,7 @@ class data_field_multimenu extends data_field_base { $str = '
      '; $str .= ''; // hidden field - needed for empty selection + $str .= ''; $str .= ''; + $str = ''; + $str .= ''; + return '' . + ''; } function parse_search_field() { diff --git a/mod/data/field/picture/field.class.php b/mod/data/field/picture/field.class.php index 269e916815f..3f216971bbe 100644 --- a/mod/data/field/picture/field.class.php +++ b/mod/data/field/picture/field.class.php @@ -118,7 +118,8 @@ class data_field_picture extends data_field_base { } function display_search_field($value = '') { - return ''; + return '' . + ''; } function parse_search_field() { diff --git a/mod/data/field/picture/mod.html b/mod/data/field/picture/mod.html index 9dd1583f6b3..f48b4cbbda7 100644 --- a/mod/data/field/picture/mod.html +++ b/mod/data/field/picture/mod.html @@ -46,6 +46,7 @@ maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course)); $choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes); + echo html_writer::label($this->field->param3, 'menuparam3', false, array('class' => 'accesshide')); echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id'=>'param3')); ?> diff --git a/mod/data/field/radiobutton/field.class.php b/mod/data/field/radiobutton/field.class.php index 5396b2d0cad..f3115c12db8 100644 --- a/mod/data/field/radiobutton/field.class.php +++ b/mod/data/field/radiobutton/field.class.php @@ -78,7 +78,9 @@ class data_field_radiobutton extends data_field_base { $options[$rec->content] = $rec->content; //Build following indicies from the sql. } } - return html_writer::select($options, 'f_'.$this->field->id, $value); + $return = html_writer::label(get_string('nameradiobutton', 'data'), 'menuf_'. $this->field->id, false, array('class' => 'accesshide')); + $return .= html_writer::select($options, 'f_'.$this->field->id, $value); + return $return; } function parse_search_field() { diff --git a/mod/data/field/text/field.class.php b/mod/data/field/text/field.class.php index 36c391ae8e7..2bccff184a5 100644 --- a/mod/data/field/text/field.class.php +++ b/mod/data/field/text/field.class.php @@ -27,7 +27,7 @@ class data_field_text extends data_field_base { var $type = 'text'; function display_search_field($value = '') { - return ''; + return '' . ''; } function parse_search_field() { diff --git a/mod/data/field/textarea/field.class.php b/mod/data/field/textarea/field.class.php index a15dfb2e3ee..4c833f6f78b 100644 --- a/mod/data/field/textarea/field.class.php +++ b/mod/data/field/textarea/field.class.php @@ -126,7 +126,8 @@ class data_field_textarea extends data_field_base { $editor->use_editor($field, $options, $fpoptions); $str .= ''; $str .= '
      '; - $str .= '
      '; foreach ($formats as $key=>$desc) { $selected = ($format == $key) ? 'selected="selected"' : ''; $str .= ''; @@ -140,7 +141,8 @@ class data_field_textarea extends data_field_base { function display_search_field($value = '') { - return ''; + return '' . + ''; } function parse_search_field() { diff --git a/mod/data/field/url/field.class.php b/mod/data/field/url/field.class.php index 1c453739e49..89c8c7cee26 100644 --- a/mod/data/field/url/field.class.php +++ b/mod/data/field/url/field.class.php @@ -52,11 +52,14 @@ class data_field_url extends data_field_base { $str = '
      '; if (!empty($this->field->param1) and empty($this->field->param2)) { $str .= '
    : - + changepasswordurl)) {
    : - + changepasswordurl)) {
    : : changepasswordurl)) {
    : - + changepasswordurl)) {
    : - +
    :
    : - + convert_data and $config->convert_data != '' and !is_readable($config->convert_data)) { @@ -82,9 +82,9 @@ urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/
    : - - : - - : - - : - +
    -

    +

    - backup_detail_pair($label, html_writer::empty_tag('input', $attributes+array('name'=>$name, 'type'=>$type, 'value'=>$value)).$description); + + if ($type == 'text') { + if (empty($attributes['id'])) { + $attributes['id'] = $name; + } + $label = html_writer::label($name, $attibutes['id'], false, array('class' => 'accesshide')); + } else { + $label = ''; + } + return $this->backup_detail_pair($label, $label . html_writer::empty_tag('input', $attributes+array('name'=>$name, 'type'=>$type, 'value'=>$value)).$description); } /** diff --git a/blocks/section_links/config_instance.html b/blocks/section_links/config_instance.html index efc2fbc4238..a2765dafd25 100644 --- a/blocks/section_links/config_instance.html +++ b/blocks/section_links/config_instance.html @@ -66,7 +66,7 @@ for($i = 1; $i < 3; $i++){ ?>
    - : + @@ -77,7 +77,7 @@ for($i = 1; $i < 3; $i++){
    - : + diff --git a/blocks/tags/block_tags.php b/blocks/tags/block_tags.php index b7a35fd9bab..7ce4a4a9ae7 100644 --- a/blocks/tags/block_tags.php +++ b/blocks/tags/block_tags.php @@ -225,7 +225,6 @@ class block_tags extends block_base { if ($officialtags) { $this->content->text .= $officialtagscontent; } if ($coursetags) { $this->content->text .= $coursetagscontent; } if ($commtags) { $this->content->text .= $commtagscontent; } - // add the input form section (allowing a user to tag the current course) and navigation, or loggin message if ($loggedin) { // only show the input form on course pages for those allowed (or not barred) @@ -250,7 +249,8 @@ class block_tags extends block_base {
    - + +
    'accesshide')); echo html_writer::select($months, $name, $selected, false); } diff --git a/calendar/renderer.php b/calendar/renderer.php index 4fe8301b8bf..b8a7b9910ec 100644 --- a/calendar/renderer.php +++ b/calendar/renderer.php @@ -708,7 +708,9 @@ class core_calendar_renderer extends plugin_renderer_base { $select = new single_select(new moodle_url(CALENDAR_URL.'set.php', array('return' => base64_encode($returnurl->out(false)), 'var' => 'setcourse', 'sesskey'=>sesskey())), 'id', $courseoptions, $selected, null); $select->class = 'cal_courses_flt'; if ($label !== null) { - $select->label = $label; + $select->set_label($label); + } else { + $select->set_label(get_accesshide(get_string('course'))); } return $this->output->render($select); } diff --git a/course/index.php b/course/index.php index ce1466a494f..bf126ef6a35 100644 --- a/course/index.php +++ b/course/index.php @@ -369,6 +369,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $ } $popupurl = new moodle_url("index.php?move=$category->id&sesskey=".sesskey()); $select = new single_select($popupurl, 'moveto', $tempdisplaylist, $category->parent, null, "moveform$category->id"); + $select->set_label(get_accesshide(get_string('frontpagecategorynames'))); echo $OUTPUT->render($select); } echo '
    '; + $str .= get_string('url','data').':'; $str .= ''; $str .= '
    '; - $str .= get_string('url','data').':
    '; + $str .= ''; + $str .= '
    '.get_string('text','data').':
    '; } else { // Just the URL field + $str .= ''; $str .= ''; } @@ -74,7 +77,8 @@ class data_field_url extends data_field_base { } function display_search_field($value = '') { - return ''; + return '' . + ''; } function parse_search_field() { diff --git a/mod/feedback/analysis_course.php b/mod/feedback/analysis_course.php index 548d4c8964b..be7ec80f0c7 100644 --- a/mod/feedback/analysis_course.php +++ b/mod/feedback/analysis_course.php @@ -136,9 +136,9 @@ if ($courseitemfilter > 0) { echo '
    '.get_string('noresults').'
    - + - + - + - + - + - + - + - +
    : - +
    : -
    ';
    - ';
    - ';
    - ';
    - ';
    : - alias)) { if ($return == '') { - $return = ''; } $return .= ""; } @@ -1205,7 +1205,8 @@ function glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $m echo ''; if ( $aliases ) { echo ''; + '' . + $aliases . ''; } if ($icons) { echo ''; @@ -1763,6 +1764,7 @@ function glossary_print_categories_menu($cm, $glossary, $hook, $category) { echo ''; diff --git a/mod/lesson/pagetypes/matching.php b/mod/lesson/pagetypes/matching.php index 2ba1aa57add..0af8e13997d 100644 --- a/mod/lesson/pagetypes/matching.php +++ b/mod/lesson/pagetypes/matching.php @@ -400,16 +400,19 @@ class lesson_page_type_matching extends lesson_page { $answerdata->score = get_string("didnotreceivecredit", "lesson"); } } elseif ($n > 1) { - $data = ""; + $data = ''; + $data .= ""; if ($useranswer != NULL) { $userresponse = explode(",", $useranswer->useranswer); - $data .= ""; } else { - $data .= ""; + $data .= ''; + $data .= ""; } if ($n == 2) { diff --git a/mod/lesson/report.php b/mod/lesson/report.php index f2d1e059f53..37d6cba7151 100644 --- a/mod/lesson/report.php +++ b/mod/lesson/report.php @@ -314,6 +314,7 @@ if ($action === 'delete') { if (has_capability('mod/lesson:edit', $context)) { $checklinks = ''.get_string('selectall').' / '; $checklinks .= ''.get_string('deselectall').''; + $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'); diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index 10e234f53b4..122029dbc8f 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -427,9 +427,11 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool, get_string('areyousureremoveselected', 'quiz') . '\');" value="' . get_string('removeselected', 'quiz') . '" ' . $disabled . ' />'; - $a = ''; + $a .= ''; - $b = ''; + $b .=''; $reordercontrols2top = '
    ' . @@ -626,6 +628,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool, id .'">' . get_string('question', 'quiz') . ''; echo ' id . '">' . get_string('reorderquestions', 'quiz') . ''; echo ''; ?> diff --git a/mod/quiz/report/statistics/report.php b/mod/quiz/report/statistics/report.php index c48e4e74f69..55b56a8bd4a 100644 --- a/mod/quiz/report/statistics/report.php +++ b/mod/quiz/report/statistics/report.php @@ -973,7 +973,8 @@ class quiz_statistics_report extends quiz_default_report { $output .= ''; $output .= ''; - $output .= html_writer::select($downloadoptions, 'download', + $output .= html_writer('action', 'menudownload', false, array('class' => 'accesshide')); + $output .= html_writer::select($this->table->defaultdownloadformat, 'download', $this->table->defaultdownloadformat, false); $output .= '
    '; diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php index 1550add8dbd..3283975c528 100644 --- a/mod/scorm/locallib.php +++ b/mod/scorm/locallib.php @@ -1483,7 +1483,8 @@ function scorm_get_toc($user,$scorm,$cmid,$toclink=TOCJSLINK,$currentorg='',$sco } $url = new moodle_url('/mod/scorm/player.php?a='.$scorm->id.'¤torg='.$currentorg.$modestr); - $result->tocmenu = $OUTPUT->single_select($url, 'scoid', $tocmenus, $sco->id, null, "tocmenu"); + $toclabel = array('' => get_accesshide(get_string('organization', 'scorm'))); + $result->tocmenu = $OUTPUT->single_select($url, 'scoid', $tocmenus, $sco->id, $toclabel, "tocmenu"); return $result; } diff --git a/mod/wiki/editors/wikieditor.php b/mod/wiki/editors/wikieditor.php index e8804936079..a93fd2545c1 100644 --- a/mod/wiki/editors/wikieditor.php +++ b/mod/wiki/editors/wikieditor.php @@ -120,7 +120,8 @@ class MoodleQuickForm_wikieditor extends MoodleQuickForm_textarea { $html .= html_writer::empty_tag('img', array('alt' => $button[1], 'src' => $CFG->wwwroot . '/mod/wiki/editors/wiki/images/' . $button[0])); $html .= ""; } - $html .= ""; $html .= "'; foreach ($this->files as $filename) { $html .= "\n"; } diff --git a/question/type/calculated/questiontype.php b/question/type/calculated/questiontype.php index c9db47772f5..443608d725f 100644 --- a/question/type/calculated/questiontype.php +++ b/question/type/calculated/questiontype.php @@ -753,11 +753,13 @@ class qtype_calculated extends question_type { ? 'decimals' : 'significantfigures'), 'qtype_calculated', $i); } - $menu1 = html_writer::select($lengthoptions, 'calclength[]', $regs[4], null); + $menu1 = html_writer::label($regs[4], 'menucalclength', false, array('class' => 'accesshide')); + $menu1 .= html_writer::select($lengthoptions, 'calclength[]', $regs[4], null); $options = array('uniform' => get_string('uniformbit', 'qtype_calculated'), 'loguniform' => get_string('loguniformbit', 'qtype_calculated')); - $menu2 = html_writer::select($options, 'calcdistribution[]', $regs[1], null); + $menu2 = html_writer::label($regs[1], 'menucalcdistribution', false, array('class' => 'accesshide')); + $menu2 .= html_writer::select($options, 'calcdistribution[]', $regs[1], null); return '
    ' @@ -1197,7 +1199,8 @@ class qtype_calculated extends question_type { list($options, $selected) = $this->dataset_options($form, $datasetname); unset($options['0']); // Mandatory... - $datasetmenus[$datasetname] = html_writer::select( + $datasetmenus[$datasetname] = html_writer::label($selected, 'menudataset', false , array('class' => 'accesshide')); + $datasetmenus[$datasetname] .= html_writer::select( $options, 'dataset[]', $selected, null); } } @@ -1205,7 +1208,8 @@ class qtype_calculated extends question_type { if (!isset($datasetmenus[$datasetname])) { list($options, $selected) = $this->dataset_options($form, $datasetname); - $datasetmenus[$datasetname] = html_writer::select( + $datasetmenus[$datasetname] = html_writer::label($selected, 'menudataset', false , array('class' => 'accesshide')); + $datasetmenus[$datasetname] .= html_writer::select( $options, 'dataset[]', $selected, null); } } diff --git a/question/type/essay/renderer.php b/question/type/essay/renderer.php index 061d4492de1..cdb1d7026ef 100644 --- a/question/type/essay/renderer.php +++ b/question/type/essay/renderer.php @@ -223,6 +223,7 @@ class qtype_essay_format_editor_renderer extends plugin_renderer_base { 'name' => $inputname . 'format', 'value' => key($formats))); } else { + $output .= html_writer::label($responseformat, 'menu' . $inputname . 'format'); $output .= html_writer::select($formats, $inputname . 'format', $responseformat, ''); } $output .= html_writer::end_tag('div'); diff --git a/question/type/match/renderer.php b/question/type/match/renderer.php index 8a3372c8433..a899b04f1ab 100644 --- a/question/type/match/renderer.php +++ b/question/type/match/renderer.php @@ -80,6 +80,7 @@ class qtype_match_renderer extends qtype_with_combined_feedback_renderer { } $result .= html_writer::tag('td', + html_writer::label($selected, 'menu' . $qa->get_qt_field_name('sub' . $key), false, array('class' => 'accesshide')) . html_writer::select($choices, $qa->get_qt_field_name('sub' . $key), $selected, array('0' => 'choose'), array('disabled' => $options->readonly)) . ' ' . $feedbackimage, array('class' => $classes)); diff --git a/question/type/multianswer/renderer.php b/question/type/multianswer/renderer.php index 29c23d68560..b0a8c91c1a5 100644 --- a/question/type/multianswer/renderer.php +++ b/question/type/multianswer/renderer.php @@ -223,7 +223,7 @@ class qtype_multianswer_textfield_renderer extends qtype_multianswer_subq_render s($correctanswer->answer), $options); $output = ''; - $output .= html_writer::start_tag('label', array('class' => 'subq')); + $output .= html_writer::start_tag('label', array('class' => 'subq', 'for' => $inputattributes['id'])); $output .= html_writer::empty_tag('input', $inputattributes); $output .= $feedbackimg; $output .= $feedbackpopup; @@ -274,8 +274,8 @@ class qtype_multianswer_multichoice_inline_renderer $inputattributes['class'] = $this->feedback_class($matchinganswer->fraction); $feedbackimg = $this->feedback_image($matchinganswer->fraction); } - - $select = html_writer::select($choices, $qa->get_qt_field_name($fieldname), + $selecg = html_writer::label($response, $inputattributes['id']); + $select .= html_writer::select($choices, $qa->get_qt_field_name($fieldname), $response, array('' => ''), $inputattributes); $order = $subq->get_order($qa); diff --git a/question/type/numerical/renderer.php b/question/type/numerical/renderer.php index cc334c4273b..d2a120fa49a 100644 --- a/question/type/numerical/renderer.php +++ b/question/type/numerical/renderer.php @@ -76,7 +76,8 @@ class qtype_numerical_renderer extends qtype_renderer { $inputattributes['size'] = round(strlen($placeholder) * 1.1); } - $input = html_writer::empty_tag('input', $inputattributes) . $feedbackimg; + $input = html_writer::label($inputattributes['name'], $inputattributes['id']); + $input .= html_writer::empty_tag('input', $inputattributes) . $feedbackimg; if ($question->has_separate_unit_field()) { if ($question->unitdisplay == qtype_numerical::UNITRADIO) { @@ -98,7 +99,8 @@ class qtype_numerical_renderer extends qtype_renderer { array('class' => 'unitchoices')); } else if ($question->unitdisplay == qtype_numerical::UNITSELECT) { - $unitchoice = html_writer::select($question->ap->get_unit_options(), + $unitchoice = html_writer::label($selectedunit, 'menu' . $qa->get_qt_field_name('unit')); + $unitchoice .= html_writer::select($question->ap->get_unit_options(), $qa->get_qt_field_name('unit'), $selectedunit, array(''=>'choosedots'), array('disabled' => $options->readonly)); } diff --git a/question/type/shortanswer/renderer.php b/question/type/shortanswer/renderer.php index e7879bfb680..5c779f27a84 100644 --- a/question/type/shortanswer/renderer.php +++ b/question/type/shortanswer/renderer.php @@ -71,8 +71,8 @@ class qtype_shortanswer_renderer extends qtype_renderer { $placeholder = $matches[0]; $inputattributes['size'] = round(strlen($placeholder) * 1.1); } - - $input = html_writer::empty_tag('input', $inputattributes) . $feedbackimg; + $input = html_writer::label($inputattributes['name'], $inputattributes['id']); + $input .= html_writer::empty_tag('input', $inputattributes) . $feedbackimg; if ($placeholder) { $questiontext = substr_replace($questiontext, $input, diff --git a/repository/alfresco/lib.php b/repository/alfresco/lib.php index 02ac7174a9e..8fc9d9f6591 100644 --- a/repository/alfresco/lib.php +++ b/repository/alfresco/lib.php @@ -217,7 +217,7 @@ class repository_alfresco extends repository { public function print_search() { $str = parent::print_search(); - $str .= '
    '; foreach ($this->user_session->stores as $v) { $str .= '
    ' . - get_string('aliases','glossary').': '.$aliases . '
    '.$icons.'
    '; $select = new single_select(new moodle_url("/mod/glossary/view.php", array('id'=>$cm->id, 'mode'=>'cat')), 'hook', $menu, $selected, null, "catmenu"); + $select->set_label(get_accesshide(get_string('categories', 'glossary'))); echo $OUTPUT->render($select); echo '
    '; echo ' '; - echo ' '; - echo ' '; + echo ' '; + echo ' '; echo ' '; echo ' '; echo ' '; diff --git a/tag/coursetags_edit.php b/tag/coursetags_edit.php index be710fe1e56..8da3a1f9c77 100644 --- a/tag/coursetags_edit.php +++ b/tag/coursetags_edit.php @@ -141,11 +141,12 @@ echo $OUTPUT->header();
    - $edittagthisunit +
    - + +
    - $editdeletemytag +
    - $selectoptions
    diff --git a/tag/manage.php b/tag/manage.php index c4fae4c13e0..fab184988dd 100644 --- a/tag/manage.php +++ b/tag/manage.php @@ -260,8 +260,10 @@ if ($tagrecords = $DB->get_records_sql($query, $params, $table->get_page_start() $flag = $tag->flag; $timemodified = format_time(time() - $tag->timemodified); $checkbox = ''; - $text = ''; - $tagtype = html_writer::select($existing_tagtypes, 'tagtypes['.$tag->id.']', $tag->tagtype, false); + $text = html_writer::label(get_string('newname', 'tag'), 'newname_' . $tag->id, false, array('class' => 'accesshide')); + $text .= ''; + $tagtype = html_writer::label(get_string('tagtype', 'tag'), 'menutagtypes'. $tag->id, false, array('class' => 'accesshide')); + $tagtype .= html_writer::select($existing_tagtypes, 'tagtypes['.$tag->id.']', $tag->tagtype, false); //if the tag if flagged, highlight it if ($tag->flag > 0) { @@ -283,6 +285,7 @@ if ($tagrecords = $DB->get_records_sql($query, $params, $table->get_page_start() echo ' '; echo ' '; echo '

    '; + echo html_writer::label(get_string('withselectedtags', 'tag'), 'menuformaction', false, array('class' => 'accesshide')); echo ''. fullname($user, true), '', diff --git a/user/groupaddnote.php b/user/groupaddnote.php index 9cbcbf731f5..da06692b586 100644 --- a/user/groupaddnote.php +++ b/user/groupaddnote.php @@ -119,6 +119,7 @@ echo '