diff --git a/lang/en/moodle.php b/lang/en/moodle.php index af23c90f27a..79cca1a8c57 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -937,6 +937,7 @@ $string['liketologin'] = 'Would you like to log in now with a full user account? $string['list'] = 'List'; $string['listfiles'] = 'List of files in {$a}'; $string['listofallpeople'] = 'List of all people'; +$string['listofcourses'] = 'List of courses'; $string['local'] = 'Local'; $string['localplugindeleteconfirm'] = 'You are about to completely delete the local plugin \'{$a}\'. This will completely delete everything in the database associated with this plugin. Are you SURE you want to continue?'; $string['localplugins'] = 'Local plugins'; @@ -1032,6 +1033,7 @@ $string['messageselectadd'] = 'Send a message'; $string['migratinggrades'] = 'Migrating grades'; $string['min'] = 'min'; $string['mins'] = 'mins'; +$string['minute'] = 'minute'; $string['minutes'] = 'minutes'; $string['miscellaneous'] = 'Miscellaneous'; $string['missingcategory'] = 'You need to choose a category'; @@ -1059,6 +1061,8 @@ $string['missingteacher'] = 'Must choose something'; $string['missingurl'] = 'Missing URL'; $string['missingusername'] = 'Missing username'; $string['moddoesnotsupporttype'] = 'Module {$a->modname} does not support uploads of type {$a->type}'; +$string['month'] = 'Month'; +$string['months'] = 'Months'; $string['modified'] = 'Modified'; $string['modchooserenable'] = 'Activity chooser on'; $string['modchooserdisable'] = 'Activity chooser off'; @@ -1247,6 +1251,7 @@ $string['oldpassword'] = 'Current password'; $string['olduserdirectory'] = 'This is the OLD users directory, and is no longer needed. You may safely delete it. The files it contains have been copied to the NEW user directory.'; $string['opentoguests'] = 'Guest access'; $string['optional'] = 'optional'; +$string['options'] = 'options'; $string['order'] = 'Order'; $string['originalpath'] = 'Original path'; $string['orphanedactivities'] = 'Orphaned activities'; @@ -1493,9 +1498,15 @@ $string['sectionusedefaultname'] = 'Use default section name'; $string['seealsostats'] = 'See also: stats'; $string['select'] = 'Select'; $string['selectacountry'] = 'Select a country'; +$string['selectacourse'] = 'Select a course'; +$string['selectacoursesite'] = 'Select a course or site'; +$string['selectanaction'] = 'Select an action'; +$string['selectagroup'] = 'Select a group'; $string['selectaregion'] = 'Select a region'; +$string['selctauser'] = 'Select a user'; $string['selectall'] = 'Select all'; $string['selectamodule'] = 'Please select an activity module'; +$string['selectanoptions'] = 'Select an options'; $string['selectdefault'] = 'Select default'; $string['selectedfile'] = 'Selected file'; $string['selectednowmove'] = '{$a} files selected for moving. Now go into the destination folder and press \'Move files to here\''; diff --git a/lang/en/table.php b/lang/en/table.php index a4e9abd507c..c2bf4637612 100644 --- a/lang/en/table.php +++ b/lang/en/table.php @@ -27,5 +27,6 @@ $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['downloadoptions'] = 'Select download options'; $string['downloadtsv'] = 'a tab separated values text file'; $string['downloadxhtml'] = 'an unpaged XHTML document'; diff --git a/lib/form/editor.php b/lib/form/editor.php index 3d6db559fc8..32663e83e3b 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -361,10 +361,11 @@ 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, array('id' => 'menu'. $elname. 'format')); } else { $keys = array_keys($formats); - $str.= html_writer::empty_tag('input', + $str .= html_writer::empty_tag('input', array('name'=>$elname.'[format]', 'type'=> 'hidden', 'value' => array_pop($keys))); } $str .= '
'; diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 1486d523c0d..a2ecd5acfbc 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -714,6 +714,11 @@ class single_select implements renderable { */ var $label = ''; + /** + * @var array Button label's + */ + var $labelattributes = array(); + /** * @var string Form submit method post or get */ @@ -806,9 +811,12 @@ class single_select implements renderable { * Sets select's label * * @param string $label + * @param array $attributes (optional) */ - public function set_label($label) { + public function set_label($label, $attributes = array()) { $this->label = $label; + $this->labelattributes = $attributes; + } } @@ -850,6 +858,11 @@ class url_select implements renderable { */ var $label = ''; + /** + * @var array Button label's attributes + */ + var $labelattributes = array(); + /** * @var string Wrapping div class */ @@ -922,9 +935,11 @@ class url_select implements renderable { * Sets select's label * * @param string $label + * @param array $attributes (optional) */ - public function set_label($label) { + public function set_label($label, $attributes = array()) { $this->label = $label; + $this->labelattributes = $attributes; } } diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 09a0fa578f1..17cd590268a 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1332,7 +1332,7 @@ class core_renderer extends renderer_base { } if ($select->label) { - $output .= html_writer::label($select->label, $select->attributes['id']); + $output .= html_writer::label($select->label, $select->attributes['id'], false, $select->labelattributes); } if ($select->helpicon instanceof help_icon) { @@ -1340,7 +1340,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'))); @@ -1410,7 +1409,7 @@ class core_renderer extends renderer_base { $output = ''; if ($select->label) { - $output .= html_writer::label($select->label, $select->attributes['id']); + $output .= html_writer::label($select->label, $select->attributes['id'], false, $select->labelattributes); } if ($select->helpicon instanceof help_icon) { @@ -1627,6 +1626,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 6b01669dead..0cac1453db5 100644 --- a/lib/portfoliolib.php +++ b/lib/portfoliolib.php @@ -462,7 +462,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 36b6a3a707b..149f3514468 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -992,7 +992,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 b8105642cfd..04daa06e6bd 100644 --- a/lib/tablelib.php +++ b/lib/tablelib.php @@ -918,6 +918,7 @@ class flexible_table { $html = '
'; $html .= '
'; $html .= ''; + $html .= html_writer::label(get_string('downloadoptions', 'table'), 'menudownload', false, array('class' => 'accesshide')); $html .= html_writer::select($downloadoptions, 'download', $this->defaultdownloadformat, false); $html .= '
';