Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-30843_b_m21' of git://github.com/rwijaya/moodle int…

…o MOODLE_21_STABLE
  • Loading branch information...
commit ea7170945cdafbc732c3beefb45f613ab7b8c7c3 2 parents 56e270e + 0add004
Sam Hemelryk samhemelryk authored
Showing with 339 additions and 193 deletions.
  1. +2 −0  admin/filters.php
  2. +4 −3 admin/mnet/access_control.php
  3. +1 −0  admin/portfolio.php
  4. +2 −1  admin/repository.php
  5. +4 −1 admin/roles/lib.php
  6. +1 −1  admin/timezone.php
  7. +14 −14 auth/cas/config.html
  8. +8 −8 auth/fc/config.html
  9. +7 −7 auth/imap/config.html
  10. +1 −1  auth/ldap/config.html
  11. +3 −3 auth/mnet/config.html
  12. +6 −6 auth/nntp/config.html
  13. +9 −9 auth/pop3/config.html
  14. +9 −9 auth/radius/config.html
  15. +11 −11 auth/shibboleth/config.html
  16. +2 −2 auth/shibboleth/index_form.html
  17. +10 −1 backup/util/ui/renderer.php
  18. +2 −2 blocks/section_links/config_instance.html
  19. +2 −2 blocks/tags/block_tags.php
  20. +1 −0  calendar/lib.php
  21. +3 −1 calendar/renderer.php
  22. +1 −0  course/index.php
  23. +3 −0  course/scales.php
  24. +5 −1 enrol/authorize/locallib.php
  25. +3 −3 enrol/manual/manage.php
  26. +3 −3 filter/algebra/algebradebug.php
  27. +4 −1 filter/manage.php
  28. +1 −0  grade/edit/tree/calculation.php
  29. +1 −1  grade/edit/tree/index.php
  30. +2 −1  grade/edit/tree/lib.php
  31. +1 −1  grade/lib.php
  32. +2 −1  grade/report/grader/lib.php
  33. +2 −0  lang/en/moodle.php
  34. +18 −6 lib/adminlib.php
  35. +3 −3 lib/deprecatedlib.php
  36. +3 −2 lib/form/editor.php
  37. +13 −1 lib/outputrenderers.php
  38. +2 −1  lib/portfoliolib.php
  39. +1 −1  lib/questionlib.php
  40. +1 −0  lib/tablelib.php
  41. +1 −0  lib/weblib.php
  42. +4 −3 message/lib.php
  43. +6 −2 mod/assignment/lib.php
  44. +1 −1  mod/chat/gui_ajax/index.php
  45. +1 −0  mod/chat/gui_header_js/chatinput.php
  46. +1 −0  mod/chat/gui_sockets/chatinput.php
  47. +1 −0  mod/data/field.php
  48. +2 −1  mod/data/field/file/field.class.php
  49. +1 −0  mod/data/field/file/mod.html
  50. +6 −2 mod/data/field/latlong/field.class.php
  51. +4 −2 mod/data/field/menu/field.class.php
  52. +3 −1 mod/data/field/multimenu/field.class.php
  53. +2 −1  mod/data/field/number/field.class.php
  54. +2 −1  mod/data/field/picture/field.class.php
  55. +1 −0  mod/data/field/picture/mod.html
  56. +3 −1 mod/data/field/radiobutton/field.class.php
  57. +1 −1  mod/data/field/text/field.class.php
  58. +4 −2 mod/data/field/textarea/field.class.php
  59. +6 −2 mod/data/field/url/field.class.php
  60. +4 −4 mod/feedback/analysis_course.php
  61. +2 −1  mod/feedback/item/multichoice/lib.php
  62. +2 −1  mod/feedback/item/multichoicerated/lib.php
  63. +1 −1  mod/feedback/mapcourse.php
  64. +1 −0  mod/feedback/show_nonrespondents.php
  65. +2 −0  mod/forum/lib.php
  66. +12 −2 mod/forum/search.php
  67. +4 −4 mod/glossary/editcategories.html
  68. +11 −11 mod/glossary/formats.php
  69. +4 −2 mod/glossary/lib.php
  70. +6 −3 mod/lesson/pagetypes/matching.php
  71. +1 −0  mod/lesson/report.php
  72. +7 −2 mod/quiz/editlib.php
  73. +2 −1  mod/quiz/report/statistics/report.php
  74. +2 −1  mod/scorm/locallib.php
  75. +2 −1  mod/wiki/editors/wikieditor.php
  76. +6 −3 mod/wiki/renderer.php
  77. +1 −0  question/behaviour/rendererbase.php
  78. +2 −1  question/format/xhtml/format.php
  79. +8 −4 question/type/calculated/questiontype.php
  80. +1 −0  question/type/essay/renderer.php
  81. +1 −0  question/type/match/renderer.php
  82. +3 −3 question/type/multianswer/renderer.php
  83. +4 −2 question/type/numerical/renderer.php
  84. +2 −2 question/type/shortanswer/renderer.php
  85. +1 −1  repository/alfresco/lib.php
  86. +3 −1 repository/draftfiles_manager.php
  87. +2 −2 repository/filepicker.php
  88. +7 −4 tag/coursetags_edit.php
  89. +5 −2 tag/manage.php
  90. +5 −4 user/addnote.php
  91. +1 −0  user/groupaddnote.php
  92. +2 −1  user/index.php
  93. +1 −1  user/message.html
2  admin/filters.php
View
@@ -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);
7 admin/mnet/access_control.php
View
@@ -203,17 +203,18 @@
if (!empty($formerror['username'])) {
echo '<span class="error"> * </span>';
}
-echo '<input type="text" name="username" size="20" maxlength="100" />';
+echo html_writer::label(get_string('username'), 'menuusername', false, array('class' =>'accesshide'));
+echo '<input id="menuusername" type="text" name="username" size="20" maxlength="100" />';
// 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 '<span class="error"> * </span>';
}
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 '<span class="error"> * </span>';
}
1  admin/portfolio.php
View
@@ -197,6 +197,7 @@ function portfolio_action_url($portfolio) {
$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)) {
3  admin/repository.php
View
@@ -305,7 +305,7 @@ function repository_action_url($repository) {
}
$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 @@ function repository_action_url($repository) {
// 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), '', '');
}
}
5 admin/roles/lib.php
View
@@ -721,7 +721,10 @@ protected function get_archetype_field($id) {
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() {
2  admin/timezone.php
View
@@ -42,7 +42,7 @@
$timezones = get_list_of_timezones();
echo '<center><form action="timezone.php" method="post">';
- echo "$strusers ($strall): ";
+ echo html_writer::label($strusers . ' (' . $strall . '): ', 'menuzone');
echo html_writer::select($timezones, "zone", $current, array('99'=>get_string("serverlocaltime")));
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />";
echo '<input type="submit" value="'.s($strsavechanges).'" />';
28 auth/cas/config.html
View
@@ -94,9 +94,9 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_hostname_key', 'auth_cas') ?>:</td>
+ <td align="right"><label for="hostname"><?php print_string('auth_cas_hostname_key', 'auth_cas') ?>: </label></td>
<td>
- <input name="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
+ <input name="hostname" id="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
<?php if (isset($err['hostname'])) { echo $OUTPUT->error_text($err['hostname']); } ?>
</td>
<td>
@@ -105,10 +105,10 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <?php print_string('auth_cas_baseuri_key', 'auth_cas') ?>:
+ <label for="baseuri"><?php print_string('auth_cas_baseuri_key', 'auth_cas') ?>: </label>
</td>
<td>
- <input name="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
+ <input name="baseuri" id="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
<?php if (isset($err['baseuri'])) { echo $OUTPUT->error_text($err['baseuri']); } ?>
</td>
<td>
@@ -117,10 +117,10 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <?php print_string('auth_cas_port_key', 'auth_cas') ?>:
+ <label for="port"><?php print_string('auth_cas_port_key', 'auth_cas') ?>: </label>
</td>
<td>
- <input name="port" type="text" size="30" value="<?php echo $config->port ?>" />
+ <input name="port" id="port" type="text" size="30" value="<?php echo $config->port ?>" />
<?php if (isset($err['port'])) { echo $OUTPUT->error_text($err['port']); } ?>
</td>
<td>
@@ -129,7 +129,7 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <?php print_string('auth_cas_casversion', 'auth_cas') ?>:
+ <?php echo html_writer::label(get_string('auth_cas_casversion', 'auth_cas'), 'menucasversion'); ?>:
</td>
<td>
<?php
@@ -145,7 +145,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_language_key', 'auth_cas') ?>:</td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_cas_language_key', 'auth_cas'), 'menulanguage'); ?>:</td>
<td>
<?php echo html_writer::select($CASLANGUAGES, 'language', $config->language, false); ?>
</td>
@@ -155,7 +155,7 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <?php print_string('auth_cas_proxycas_key', 'auth_cas') ?>:
+ <?php echo html_writer::label(get_string('auth_cas_proxycas_key', 'auth_cas'), 'menuproxycas'); ?>:
</td>
<td>
<?php echo html_writer::select($yesno, 'proxycas', $config->proxycas, false); ?>
@@ -165,7 +165,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_logoutcas_key', 'auth_cas') ?>:</td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_cas_logoutcas_key', 'auth_cas'), 'menulogoutcas'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'logoutcas', $config->logoutcas, false); ?>
</td>
@@ -174,7 +174,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_multiauth_key', 'auth_cas') ?>:</td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_cas_multiauth_key', 'auth_cas'), 'menumultiauth'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'multiauth', $config->multiauth, false); ?>
</td>
@@ -183,7 +183,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_certificate_check_key', 'auth_cas') ?>:</td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_cas_certificate_check_key', 'auth_cas'), 'menucertificate_check'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'certificate_check', $config->certificate_check, false); ?>
</td>
@@ -192,7 +192,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>:</td>
+ <td align="right"><label for="certificate_path"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>: </label></td>
<td>
<input name="certificate_path" id="certificate_path" type="text" size="30" value="<?php echo $config->certificate_path ?>" />
<?php if (isset($err['certificate_path'])) echo $OUTPUT->error_text($err['certificate_path']); ?>
@@ -219,7 +219,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><label for="menuversion"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label></td>
+ <td align="right"><label for="menuldap_version"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label></td>
<td>
<?php
$versions = array();
16 auth/fc/config.html
View
@@ -27,9 +27,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string("auth_fchost_key", "auth_fc") ?>:</td>
+ <td align="right"><label for="host"><?php print_string("auth_fchost_key", "auth_fc") ?>:</label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host?>" />
<?php if (isset($err["host"])) echo $OUTPUT->error_text($err["host"]); ?>
</td>
<td>
@@ -38,9 +38,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string("auth_fcfppport_key", "auth_fc") ?>:</td>
+ <td align="right"><label for="fppport"><?php print_string("auth_fcfppport_key", "auth_fc") ?>: </label></td>
<td>
- <input name="fppport" type="text" size="30" value="<?php echo $config->fppport?>" />
+ <input name="fppport" id="fppport" type="text" size="30" value="<?php echo $config->fppport?>" />
<?php if (isset($err["fppport"])) echo $OUTPUT->error_text($err["host"]); ?>
</td>
<td>
@@ -70,9 +70,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string("auth_fccreators_key", "auth_fc") ?>:</td>
+ <td align="right"><label for="creators"><?php print_string("auth_fccreators_key", "auth_fc") ?>: </label></td>
<td>
- <input name="creators" type="text" size="30" value="<?php echo $config->creators?>" />
+ <input name="creators" id="creators" type="text" size="30" value="<?php echo $config->creators?>" />
<?php if (isset($err["creators"])) echo $OUTPUT->error_text($err["creators"]); ?>
</td>
<td>
@@ -81,9 +81,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_fcchangepasswordurl', 'auth_fc') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_fcchangepasswordurl', 'auth_fc') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
14 auth/imap/config.html
View
@@ -18,9 +18,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </td>
+ <td align="right"><label for="host"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -40,7 +40,7 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_imaptype_key', 'auth_imap') ?>: </td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_imaptype_key', 'auth_imap'), 'menutype'); ?>: </td>
<td>
<?php
@@ -56,9 +56,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </td>
+ <td align="right"><label for="port"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </label></td>
<td>
- <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
+ <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
@@ -71,9 +71,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
2  auth/ldap/config.html
View
@@ -118,7 +118,7 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <label for="menuversion"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label>
+ <label for="menuldap_version"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label>
</td>
<td>
<?php
6 auth/mnet/config.html
View
@@ -22,9 +22,9 @@
<table cellspacing="0" cellpadding="5">
<tr valign="top" class="required">
- <td align="right"><?php print_string('rpc_negotiation_timeout', 'auth_mnet'); ?>: </td>
+ <td align="right"><label for="rpc_negotiation_timeout"><?php print_string('rpc_negotiation_timeout', 'auth_mnet'); ?>: </label></td>
<td>
- <input name="rpc_negotiation_timeout" type="text" size="5" value="<?php echo $config->rpc_negotiation_timeout ?>" />
+ <input name="rpc_negotiation_timeout" id="rpc_negotiation_timeout" type="text" size="5" value="<?php echo $config->rpc_negotiation_timeout ?>" />
<?php
if (isset($err['rpc_negotiation_timeout'])) {
@@ -45,7 +45,7 @@
<?php /*
See MDL-21327 for why this is commented out
<tr valign="top" class="required">
- <td align="right"><?php print_string('auto_add_remote_users', 'auth_mnet'); ?>: </td>
+ <td align="right"><?php echo html_writer::label(get_string('auto_add_remote_users', 'auth_mnet'), 'menuauto_add_remote_users'); ?>: </td>
<td>
<?php
12 auth/nntp/config.html
View
@@ -15,9 +15,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_nntphost_key', 'auth_nntp') ?>: </td>
+ <td align="right"><label for="host"><?php print_string('auth_nntphost_key', 'auth_nntp') ?>: </label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err["host"])) {
@@ -37,9 +37,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_nntpport_key', 'auth_nntp') ?>: </td>
+ <td align="right"><label for="port"><?php print_string('auth_nntpport_key', 'auth_nntp') ?>: </label></td>
<td>
- <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
+ <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err["port"])) {
@@ -52,9 +52,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_nntpchangepasswordurl_key', 'auth_nntp') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_nntpchangepasswordurl_key', 'auth_nntp') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
18 auth/pop3/config.html
View
@@ -21,9 +21,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </td>
+ <td align="right"><label for="host"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -43,7 +43,7 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_pop3type_key', 'auth_pop3') ?>: </td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_pop3type_key', 'auth_pop3'), 'menutype'); ?>: </td>
<td>
<?php
@@ -59,9 +59,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </td>
+ <td align="right"><label for="port"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </label></td>
<td>
- <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
+ <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
@@ -74,9 +74,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </td>
+ <td align="right"><label for="mailbox"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </label></td>
<td>
- <input name="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
+ <input name="mailbox" id="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
<?php
if (isset($err['mailbox'])) {
@@ -89,9 +89,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
18 auth/radius/config.html
View
@@ -30,9 +30,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top">
- <td align="right"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </td>
+ <td align="right"><label for="host"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -45,9 +45,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </td>
+ <td align="right"><label for="nasport"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </label></td>
<td>
- <input name="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
+ <input name="nasport" id="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
<?php
if (isset($err['nasport'])) {
@@ -60,7 +60,7 @@
</tr>
<tr valign="top" >
- <td align="right"><?php print_string('auth_radiustype_key', 'auth_radius') ?>: </td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_radiustype_key', 'auth_radius'), 'menuradiustype'); ?>: </td>
<td>
<?php
@@ -82,9 +82,9 @@
<tr valign="top" >
- <td align="right"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </td>
+ <td align="right"><label for="secret"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </label></td>
<td>
- <input name="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
+ <input name="secret" id="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
<?php
if (isset($err['secret'])) {
@@ -97,9 +97,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
22 auth/shibboleth/config.html
View
@@ -20,7 +20,7 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string("username") ?>:</td>
+ <td align="right"><label for="user_attribute"><?php print_string("username") ?>: </label></td>
<td>
<input name="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute ?>" />
</td>
@@ -28,9 +28,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>:</td>
+ <td align="right"><label for="convert_data"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>: </label></td>
<td>
- <input name="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
+ <input name="convert_data" id="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
<?php
if ($config->convert_data and $config->convert_data != '' and !is_readable($config->convert_data)) {
@@ -82,9 +82,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>:</td>
+ <td align="right"><label for="logout_handler"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>: </label></td>
<td>
- <input name="logout_handler" type="text" size="30" value="<?php
+ <input name="logout_handler" id="logout_handler" type="text" size="30" value="<?php
if ( isset($config->logout_handler) and !empty($config->logout_handler)){
echo $config->logout_handler;
}
@@ -94,9 +94,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>:</td>
+ <td align="right"><label for="logout_return_url"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>: </label></td>
<td>
- <input name="logout_return_url" type="text" size="30" value="<?php
+ <input name="logout_return_url" id="logout_return_url" type="text" size="30" value="<?php
if ( isset($config->logout_return_url) and !empty($config->logout_return_url)){
echo $config->logout_return_url;
}
@@ -106,9 +106,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>:</td>
+ <td align="right"><label for="login_name"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>: </label></td>
<td>
- <input name="login_name" type="text" size="30" value="<?php
+ <input name="login_name" id="login_name" type="text" size="30" value="<?php
if ( isset($config->login_name) and !empty($config->login_name)){
echo htmlentities($config->login_name);
} else {
@@ -120,9 +120,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
4 auth/shibboleth/index_form.html
View
@@ -29,9 +29,9 @@
?>
<div class="guestsub">
- <p><?php print_string("auth_shibboleth_select_organization", "auth_shibboleth"); ?></p>
+ <p><label for="idp"><?php print_string("auth_shibboleth_select_organization", "auth_shibboleth"); ?></label></p>
<form action="login.php" method="post" id="guestlogin">
- <select name="idp">
+ <select id="idp" name="idp">
<option value="-" ><?php print_string("auth_shibboleth_select_member", "auth_shibboleth"); ?></option>
<?php
print_idp_list();
11 backup/util/ui/renderer.php
View
@@ -343,7 +343,16 @@ protected function backup_detail_input($label, $type, $name, $value, array $attr
} else {
$description = '';
}
- return $this->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);
}
/**
4 blocks/section_links/config_instance.html
View
@@ -66,7 +66,7 @@
?>
<tr valign="top">
<td align="right">
- <?php print_string('numsections'.$i, 'block_section_links'); ?>:
+ <label for="menunumsections<?php echo $i; ?>"><?php print_string('numsections'.$i, 'block_section_links'); ?>:</label>
</td>
<td>
<?php choose_from_menu($numberofsections, 'numsections'.$i, $selected[$i][0]); ?>
@@ -77,7 +77,7 @@
</tr>
<tr valign="top">
<td align="right">
- <?php print_string('incby'.$i, 'block_section_links'); ?>:
+ <label for="menuincby<?php echo $i;?>"><?php print_string('incby'.$i, 'block_section_links'); ?>:</label>
</td>
<td>
<?php choose_from_menu($increments, 'incby'.$i, $selected[$i][1]); ?>
4 blocks/tags/block_tags.php
View
@@ -225,7 +225,6 @@ function get_content() {
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 @@ function get_content() {
<div class="coursetag_form_wrapper">
<div class="coursetag_form_positioner">
<div class="coursetag_form_input1">
- <input type="text" name="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
+ <label class="accesshide" for="coursetag_sug_keyword">$tagthisunit</label>
+ <input type="text" name="coursetag_sug_keyword" id="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
</div>
<div class="coursetag_form_input2">
<input type="text" name="coursetag_new_tag" id="coursetag_new_tag" class="coursetag_form_input2a"
1  calendar/lib.php
View
@@ -1472,6 +1472,7 @@ function calendar_print_month_selector($name, $selected) {
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), '%B');
}
+ echo html_writer::label(get_string('months'), 'menu'. $name, false, array('class' => 'accesshide'));
echo html_writer::select($months, $name, $selected, false);
}
4 calendar/renderer.php
View
@@ -708,7 +708,9 @@ protected function course_filter_selector(moodle_url $returnurl, $label=null) {
$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);
}
1  course/index.php
View
@@ -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 '</td>';
3  course/scales.php
View
@@ -70,6 +70,7 @@
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
+ echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
@@ -101,6 +102,7 @@
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
+ echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
@@ -127,6 +129,7 @@
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
+ echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
6 enrol/authorize/locallib.php
View
@@ -58,7 +58,9 @@ function authorize_print_orders($courseid, $userid) {
$searchmenu = array('orderid' => $authstrs->orderid, 'transid' => $authstrs->transid, 'cclastfour' => $authstrs->cclastfour);
$buttons = "<form method='post' action='index.php' autocomplete='off'><div>";
+ $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 .= "<input type='text' size='16' name='searchquery' value='' />";
$buttons .= "<input type='submit' value='$strs->search' />";
$buttons .= "</div></form>";
@@ -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 .= '<br />';
$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 .= '<br />';
6 enrol/manual/manage.php
View
@@ -162,13 +162,13 @@
<div class="enroloptions">
- <p><label for="roleid"><?php print_string('assignrole', 'enrol_manual') ?></label><br />
+ <p><label for="menuroleid"><?php print_string('assignrole', 'enrol_manual') ?></label><br />
<?php echo html_writer::select($roles, 'roleid', $roleid, false); ?></p>
- <p><label for="extendperiod"><?php print_string('enrolperiod', 'enrol') ?></label><br />
+ <p><label for="menuextendperiod"><?php print_string('enrolperiod', 'enrol') ?></label><br />
<?php echo html_writer::select($periodmenu, 'extendperiod', $defaultperiod, $unlimitedperiod); ?></p>
- <p><label for="extendbase"><?php print_string('startingfrom') ?></label><br />
+ <p><label for="menuextendbase"><?php print_string('startingfrom') ?></label><br />
<?php echo html_writer::select($basemenu, 'extendbase', $extendbase, false); ?></p>
</div>
6 filter/algebra/algebradebug.php
View
@@ -275,12 +275,12 @@ function slasharguments($texexp, $md5) {
<html>
<head><title>Algebra Filter Debugger</title></head>
<body>
- <p>Please enter an algebraic expression <b>without</b> any surrounding @@ into
- the text box below. (Click <a href="#help">here for help.</a>)
+ <p><label for="algebra">Please enter an algebraic expression <b>without</b> any surrounding @@ into
+ the text box below. (Click <a href="#help">here for help.</a>)</label>
<form action="algebradebug.php" method="get"
target="inlineframe">
<center>
- <input type="text" name="algebra" size="50"
+ <input type="text" id="algebra" name="algebra" size="50"
value="sin(z)/(x^2+y^2)" />
</center>
<ol>
5 filter/manage.php
View
@@ -181,7 +181,10 @@
} 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) {
1  grade/edit/tree/calculation.php
View
@@ -177,6 +177,7 @@ function get_grade_tree(&$gtree, $element, $current_itemid=null, $errors=null) {
$name .= '<div class="error"><span class="error">' . $errors[$grade_item->id].'</span><br />'."\n";
$closingdiv = "</div>\n";
}
+ $name .= '<label class="accesshide" for="id_idnumber_' . $grade_item->id . '">' . get_string('gradeitems', 'grades') .'</label>';
$name .= '<input class="idnumber" id="id_idnumber_'.$grade_item->id.'" type="text" name="idnumbers['.$grade_item->id.']" />' . "\n";
$name .= $closingdiv;
}
2  grade/edit/tree/index.php
View
@@ -343,8 +343,8 @@
if (!$moving && count($grade_edit_tree->categories) > 1) {
echo '<br /><br />';
echo '<input type="hidden" name="bulkmove" value="0" id="bulkmoveinput" />';
- 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 '<div id="noscriptgradetreeform" class="hiddenifjs">
3  grade/edit/tree/lib.php
View
@@ -666,7 +666,8 @@ public function get_category_cell($category, $levelclass, $params) {
} 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);
}
2  grade/lib.php
View
@@ -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 {
3  grade/report/grader/lib.php
View
@@ -954,7 +954,8 @@ public function get_right_rows() {
}
$itemcell->text .= '<input type="hidden" id="oldgrade_'.$userid.'_'.$item->id.'" name="oldgrade_'.$userid.'_'.$item->id.'" value="'.$oldval.'"/>';
$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);
2  lang/en/moodle.php
View
@@ -1032,6 +1032,8 @@
$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}';
24 lib/adminlib.php
View
@@ -1768,7 +1768,7 @@ public function output_html($data, $query='') {
return format_admin_setting($this, $this->visiblename,
'<div class="form-text defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" /></div>',
- $this->description, true, '', $default, $query);
+ $this->description, true, '', $default, $query);
}
}
@@ -1973,7 +1973,7 @@ public function output_html($data, $query='') {
return format_admin_setting($this, $this->visiblename,
'<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
- $this->description, true, '', $default, $query);
+ $this->description, true, '', $default, $query);
}
}
@@ -2007,7 +2007,7 @@ public function output_html($data, $query='') {
return format_admin_setting($this, $this->visiblename,
'<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
- $this->description, true, '', $default, $query);
+ $this->description, true, '', $default, $query);
}
}
@@ -2041,7 +2041,7 @@ public function output_html($data, $query='') {
return format_admin_setting($this, $this->visiblename,
'<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
- $this->description, true, '', $default, $query);
+ $this->description, true, '', $default, $query);
}
}
@@ -2732,11 +2732,14 @@ public function output_html($data, $query='') {
}
$return = '<div class="form-time defaultsnext">'.
+ '<label class="accesshide" for="' . $this->get_id() . '">' . get_string('hour') . '</label>' .
'<select id="'.$this->get_id().'h" name="'.$this->get_full_name().'[h]">';
for ($i = 0; $i < 24; $i++) {
$return .= '<option value="'.$i.'"'.($i == $data['h'] ? ' selected="selected"' : '').'>'.$i.'</option>';
}
- $return .= '</select>:<select id="'.$this->get_id().'m" name="'.$this->get_full_name().'[m]">';
+ $return .= '</select>:';
+ $return .= '<label class="accesshide" for="' . $this->get_id() . '">' . get_string('minutes') . '</label>';
+ $return .= '<select id="'.$this->get_id().'m" name="'.$this->get_full_name().'[m]">';
for ($i = 0; $i < 60; $i += 5) {
$return .= '<option value="'.$i.'"'.($i == $data['m'] ? ' selected="selected"' : '').'>'.$i.'</option>';
}
@@ -3149,6 +3152,7 @@ public function output_html($data, $query='') {
if (!array_key_exists($i, $currentsetting)) {
$currentsetting[$i] = 'none'; //none
}
+ $return .= '<label class="accesshide" for="' . $this->get_id().$i . '">' . get_string($this->name, 'admin') . '</label>';
$return .='<select class="form-select" id="'.$this->get_id().$i.'" name="'.$this->get_full_name().'[]">';
foreach ($this->choices as $key => $value) {
$return .= '<option value="'.$key.'"'.("$key" == $currentsetting[$i] ? ' selected="selected"' : '').'>'.$value.'</option>';
@@ -3420,8 +3424,10 @@ public function output_html($data, $query='') {
}
$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 @@ public function output_html($data, $query='') {
}
$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 @@ public function output_html($data, $query='') {
// 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 @@ public function output_html($data, $query = '') {
$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 @@ public function output_html($data, $query='') {
}
$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 @@ public function output_html($data, $query='') {
}
$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.']',
6 lib/deprecatedlib.php
View
@@ -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;
5 lib/form/editor.php
View
@@ -238,9 +238,10 @@ function toHtml() {
$str .= '<div>';
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 .= '</div>';
14 lib/outputrenderers.php
View
@@ -1198,6 +1198,12 @@ protected function render_single_select(single_select $select) {
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 @@ protected function render_single_select(single_select $select) {
} 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 @@ protected function render_url_select(url_select $select) {
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 @@ function render_rating(rating $rating) {
$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
3  lib/portfoliolib.php
View
@@ -443,7 +443,8 @@ function portfolio_instance_select($instances, $callerformats, $callbackclass, $
$pinsane = portfolio_plugin_sanity_check();
$count = 0;
- $selectoutput = "\n" . '<select name="' . $selectname . '">' . "\n";
+ $selectoutput = "\n" . '<label class="accesshide" for="' . $selectname . '">' . get_string('plugin', 'portfolio') . '</label>';
+ $selectoutput .= "\n" . '<select id="' . $selectname . '" name="' . $selectname . '">' . "\n";
$existingexports = portfolio_existing_exports_by_plugin($USER->id);
foreach ($instances as $instance) {
$formats = portfolio_supported_formats_intersect($callerformats, $instance->supported_formats());
2  lib/questionlib.php
View
@@ -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);
}
1  lib/tablelib.php
View
@@ -929,6 +929,7 @@ function download_buttons() {
$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($this->defaultdownloadformat, 'menudownload', false, array('class' => 'accesshide'));
$html .= html_writer::select($downloadoptions, 'download', $this->defaultdownloadformat, false);
$html .= '</div></form>';
1  lib/weblib.php
View
@@ -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 = '<span class="helplink"><img class="iconhelp" alt="'.$strscales.'" src="'.$OUTPUT->pix_url('help') . '" /></span>';
7 message/lib.php
View
@@ -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');
}
8 mod/assignment/lib.php
View
@@ -1391,7 +1391,8 @@ function display_submissions($message='') {
} 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 = '<div id="g'.$auser->id.'">'. $menu .'</div>';
} else {
$grade = '<div id="g'.$auser->id.'">'.$this->display_grade($auser->grade).'</div>';
@@ -1404,6 +1405,7 @@ function display_submissions($message='') {
} 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 = '<div id="g'.$auser->id.'">'.$menu.'</div>';
} else {
@@ -1432,6 +1434,7 @@ function display_submissions($message='') {
} 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 = '<div id="g'.$auser->id.'">'.$menu.'</div>';
$hassubmission = true;
@@ -1476,7 +1479,7 @@ function display_submissions($message='') {
if ($uses_outcomes) {
foreach($grading_info->outcomes as $n=>$outcome) {
- $outcomes .= '<div class="outcome"><label>'.$outcome->name.'</label>';
+ $outcomes .= '<div class="outcome"><label for="'. 'outcome_'.$n.'_'.$auser->id .'">'.$outcome->name.'</label>';
$options = make_grades_menu(-$outcome->scaleid);
if ($outcome->grades[$auser->id]->locked or !$quickgrade) {
@@ -1486,6 +1489,7 @@ function display_submissions($message='') {
$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 .= '</div>';
2  mod/chat/gui_ajax/index.php
View
@@ -76,7 +76,7 @@
echo $OUTPUT->box('<ul id="messages-list"></ul>', '', 'chat-messages');
$table = new html_table();
$table->data = array(
- array(' &raquo; <input type="text" disabled="true" id="input-message" value="Loading..." size="50" /> <input type="button" id="button-send" value="'.get_string('send', 'chat').'" /> <a id="choosetheme" href="###">'.get_string('themes').' &raquo; </a>')
+ array(' &raquo; <label class="accesshide" for="input-message">' . get_string('messages', 'chat') . ' </label><input type="text" disabled="true" id="input-message" value="Loading..." size="50" /> <input type="button" id="button-send" value="'.get_string('send', 'chat').'" /> <a id="choosetheme" href="###">'.get_string('themes').' &raquo; </a>')
);
echo $OUTPUT->box(html_writer::table($table), '', 'chat-input-area');
echo $OUTPUT->box('', '', 'chat-notify');
1  mod/chat/gui_header_js/chatinput.php
View
@@ -46,6 +46,7 @@
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'));
1  mod/chat/gui_sockets/chatinput.php
View
@@ -28,6 +28,7 @@
<form action="../empty.php" method="get" target="empty" id="inputform"
onsubmit="return empty_field_and_submit();">
+ <label class="accesshide" for="chat_message"><?php get_string('modulename', 'chat'); ?> . ' ' .<?php strtolower(get_string('messages', 'chat')); ?> </label>
<input type="text" name="chat_message" id="chat_message" size="60" value="" />
<?php echo $OUTPUT->help_icon('usingchat', 'chat'); ?>
</form>
1  mod/data/field.php
View
@@ -352,6 +352,7 @@
$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 '<input type="submit" value="'.get_string('save', 'data').'" />';
echo '</div>';
3  mod/data/field/file/field.class.php
View
@@ -91,7 +91,8 @@ function display_add_field($recordid=0) {
}
function display_search_field($value = '') {
- return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
+ return '<label class="accesshide" for=f_"' . $this->field->id . '">' . $this->field->name . '</label>' .
+ '<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function generate_sql($tablealias, $value) {
1  mod/data/field/file/mod.html
View
@@ -14,6 +14,7 @@
<?php
$course->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'));
?>
</td>
8 mod/data/field/latlong/field.class.php
View
@@ -82,7 +82,9 @@ function display_search_field($value = '') {
}
$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 @@ function display_browse_field($recordid, $template) {
. str_replace(array_keys($urlreplacements), array_values($urlreplacements), $this->linkoutservices[$servicesshown[0]])
."' title='$servicesshown[0]'>$compasslat, $compasslong</a>";
} elseif (sizeof($servicesshown)>1) {
- $str .= "$compasslat, $compasslong\n<select name='jumpto'>";
+ $str .= "$compasslat, $compasslong\n";
+ $str .= "<label class='accesshide' for='jumpto'>". get_string('jumpto') ."</label>";
+ $str .= "<select id='jumpto' name='jumpto'>";
foreach($servicesshown as $servicename){
// Add a link to a service
$str .= "\n <option value='"
6 mod/data/field/menu/field.class.php
View
@@ -46,7 +46,7 @@ function display_add_field($recordid=0) {
}
}
-
+ $str .= html_writer::label(get_string('menuchoose', 'data'), 'field_'.$this->field->id, false, array('class' => 'accesshide'));
$str .= html_writer::select($options, 'field_'.$this->field->id, $content, array(''=>get_string('menuchoose', 'data')), array('id'=>'field_'.$this->field->id));
$str .= '</div>';
@@ -86,7 +86,9 @@ function display_search_field($content = '') {
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() {
4 mod/data/field/multimenu/field.class.php
View
@@ -38,6 +38,7 @@ function display_add_field($recordid=0) {
$str = '<div title="'.s($this->field->description).'">';
$str .= '<input name="field_' . $this->field->id . '[xxx]" type="hidden" value="xxx"/>'; // hidden field - needed for empty selection
+ $str .= '<label class="cell" for=field_"' . $this->field->id . '">' . $this->field->name. ': </label>';
$str .= '<select name="field_' . $this->field->id . '[]" id="field_' . $this->field->id . '" multiple="multiple">';
foreach (explode("\n",$this->field->param1) as $option) {
@@ -71,7 +72,8 @@ function display_search_field($value = '') {
static $c = 0;
- $str = '<select name="f_'.$this->field->id.'[]" multiple="multiple">';
+ $str = '<label class="accesshide" for=f_"' . $this->field->id . '">' . $this->field->name . '</label>';
+ $str .= '<select id="f_'.$this->field->id.'" name="f_'.$this->field->id.'[]" multiple="multiple">';
// display only used options
$varcharcontent = $DB->sql_compare_text('content', 255);
3  mod/data/field/number/field.class.php
View
@@ -70,7 +70,8 @@ function display_browse_field($recordid, $template) {
}
function display_search_field($value = '') {
- return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
+ return '<label class="accesshide" for="f_'.$this->field->id.'">' . get_string('fieldname', 'data') . '</label>' .
+ '<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
3  mod/data/field/picture/field.class.php
View
@@ -118,7 +118,8 @@ function get_file($recordid, $content=null) {
}
function display_search_field($value = '') {
- return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
+ return '<label class="accesshide" for="f_'.$this->field->id.'">' . get_string('fieldname', 'data') . '</label>' .
+ '<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
1  mod/data/field/picture/mod.html
View
@@ -46,6 +46,7 @@
<?php
$course->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'));
?>
</td>
4 mod/data/field/radiobutton/field.class.php
View
@@ -78,7 +78,9 @@ function display_search_field($value = '') {
$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() {
2  mod/data/field/text/field.class.php
View
@@ -27,7 +27,7 @@ class data_field_text extends data_field_base {
var $type = 'text';
function display_search_field($value = '') {
- return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
+ return '<label class="accesshide" for=f_"' . $this->field->id . '">'. $this->field->name.'</label>' . '<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
6 mod/data/field/textarea/field.class.php
View
@@ -126,7 +126,8 @@ function display_add_field($recordid=0) {
$editor->use_editor($field, $options, $fpoptions);
$str .= '<input type="hidden" name="'.$field.'_itemid" value="'.$draftitemid.'" />';
$str .= '<div><textarea id="'.$field.'" name="'.$field.'" rows="'.$this->field->param3.'" cols="'.$this->field->param2.'">'.s($text).'</textarea></div>';
- $str .= '<div><select name="'.$field.'_content1">';
+ $str .= '<div><label class="accesshide" for="' . $field . '_content1">' . get_string('format') . '</label>';
+ $str .= '<select id="' . $field . '_content1" name="'.$field.'_content1">';
foreach ($formats as $key=>$desc) {
$selected = ($format == $key) ? 'selected="selected"' : '';
$str .= '<option value="'.s($key).'" '.$selected.'>'.$desc.'</option>';
@@ -140,7 +141,8 @@ function display_add_field($recordid=0) {
function display_search_field($value = '') {
- return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
+ return '<label class="accesshide" for=f_"' . $this->field->id . '">' . $this->field->name . '</label>' .
+ '<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
8 mod/data/field/url/field.class.php
View
@@ -52,11 +52,14 @@ function display_add_field($recordid=0) {
$str = '<div title="'.s($this->field->description).'">';
if (!empty($this->field->param1) and empty($this->field->param2)) {
$str .= '<table><tr><td align="right">';
- $str .= get_string('url','data').':</td><td><input type="text" name="field_'.$this->field->id.'_0" id="'.$fieldid.'" value="'.$url.'" size="60" /></td></tr>';
+ $str .= get_string('url','data').':</td><td>';
+ $str .= '<label class="accesshide" for="' . $fieldid . '">'. $this->field->name .'</label>';
+ $str .= '<input type="text" name="field_'.$this->field->id.'_0" id="'.$fieldid.'" value="'.$url.'" size="60" /></td></tr>';
$str .= '<tr><td align="right">'.get_string('text','data').':</td><td><input type="text" name="field_'.$this->field->id.'_1" id="field_'.$this->field->id.'_1" value="'.s($text).'" size="60" /></td></tr>';
$str .= '</table>';
} else {
// Just the URL field
+ $str .= '<label class="accesshide" for="' . $fieldid . '">'. $this->field->name .'</label>';
$str .= '<input type="text" name="field_'.$this->field->id.'_0" id="'.$fieldid.'" value="'.s($url).'" size="60" />';
}
@@ -74,7 +77,8 @@ function display_add_field($recordid=0) {
}
function display_search_field($value = '') {
- return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
+ return '<label class="accesshide" for="f_'.$this->field->id.'">' . get_string('fieldname', 'data') . '</label>' .
+ '<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
8 mod/feedback/analysis_course.php
View
@@ -136,9 +136,9 @@
echo '<tr><td>'.get_string('noresults').'</td></tr>';
}
} else {
-
- echo get_string('search_course', 'feedback') . ': ';
- echo '<input type="text" name="searchcourse" value="'.s($searchcourse).'"/> <input type="submit" value="'.get_string('search').'"/>';
+ echo html_writer::label(get_string('search_course', 'feedback') . ': ', 'searchcourse');
+ echo '<input id="searchcourse" type="text" name="searchcourse" value="'.s($searchcourse).'"/> ';
+ echo '<input type="submit" value="'.get_string('search').'"/>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="id" value="'.$id.'" />';
echo '<input type="hidden" name="courseitemfilter" value="'.$courseitemfilter.'" />';
@@ -157,7 +157,7 @@
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));
}
3  mod/feedback/item/multichoice/lib.php
View
@@ -660,7 +660,8 @@ function print_item_dropdown($presentation, $item, $value, $info, $align) {
?>
<li class="feedback_item_select_<?php echo $hv.'_'.$align;?>">
- <select name="<?php echo $item->typ .'_' . $item->id;?>" size="1">
+ <label class="accesshide" for="<?php echo $item->typ .'_' . $item->id;?>"><?php echo $item->name; ?></label>
+ <select id="<?php echo $item->typ .'_' . $item->id;?>" name="<?php echo $item->typ .'_' . $item->id;?>[]" size="1">
<option value="0">&nbsp;</option>
<?php
$index = 1;
3  mod/feedback/item/multichoicerated/lib.php
View
@@ -503,7 +503,8 @@ function print_item_dropdown($item, $value, $info, $align, $showrating, $lines)
echo '<ul>';
?>
<li class="feedback_item_select_<?php echo $hv.'_'.$align;?>">
- <select name="<?php echo $item->typ.'_'.$item->id;?>">
+ <label for="<?php echo $item->typ.'_'.$item->id;?>"><?php echo $item->name; ?></label>
+ <select id="<?php echo $item->typ.'_'.$item->id;?>" name="<?php echo $item->typ.'_'.$item->id;?>">