MDL-21235 more conversion to new select
authorPetr Skoda <skodak@moodle.org>
Sat, 16 Jan 2010 18:25:51 +0000 (18:25 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 16 Jan 2010 18:25:51 +0000 (18:25 +0000)
61 files changed:
admin/auth_config.php
admin/enrol.php
admin/mnet/access_control.php
admin/register.php
admin/report/courseoverview/index.php
admin/report/questioninstances/index.php
admin/roles/assign.php
admin/roles/lib.php
admin/timezone.php
admin/xmldb/actions/edit_field/edit_field.class.php
admin/xmldb/actions/edit_index/edit_index.class.php
admin/xmldb/actions/edit_key/edit_key.class.php
admin/xmldb/actions/new_statement/new_statement.class.php
admin/xmldb/actions/new_table_from_mysql/new_table_from_mysql.class.php
admin/xmldb/actions/view_structure_php/view_structure_php.class.php
admin/xmldb/actions/view_table_php/view_table_php.class.php
auth/cas/config.html
auth/db/config.html
auth/email/config.html
auth/imap/config.html
auth/ldap/config.html
auth/mnet/config.html
auth/pop3/config.html
auth/radius/config.html
backup/backup_form.html
backup/restore_form.html
blocks/loancalc/block_loancalc.php
calendar/lib.php
calendar/preferences.html
course/lib.php
course/report/log/lib.php
course/report/participation/index.php
course/report/stats/report.php
enrol/authorize/config_form.php
enrol/authorize/locallib.php
enrol/database/config.html
enrol/imsenterprise/config.html
enrol/ldap/config.html
enrol/manual/config.html
enrol/paypal/config.html
filter/manage.php
lib/outputcomponents.php
lib/tablelib.php
lib/weblib.php
message/lib.php
mod/data/field.php
mod/data/field/file/mod.html
mod/data/field/latlong/field.class.php
mod/data/field/menu/field.class.php
mod/data/field/picture/mod.html
mod/data/field/radiobutton/field.class.php
mod/data/lib.php
mod/forum/lib.php
mod/forum/search.php
mod/glossary/lib.php
mod/hotpot/report.php
mod/quiz/report/statistics/report.php
mod/wiki/checklinks.html
mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php
mod/wiki/revertpages.html
question/type/calculated/questiontype.php

index fe37991..9e99e04 100644 (file)
@@ -147,23 +147,23 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
             echo "<input id=\"lockconfig_{$varname}\" name=\"lockconfig_{$varname}\" type=\"text\" size=\"30\" value=\"{$pluginconfig->$varname}\" />";
             echo '<div style="text-align: right">';
             echo '<label for="menulockconfig_field_updatelocal_'.$field.'">'.get_string('auth_updatelocal', 'auth') . '</label>&nbsp;';
-            echo $OUTPUT->select(html_select::make($updatelocaloptions, "lockconfig_field_updatelocal_{$field}", $pluginconfig->{"field_updatelocal_$field"}, false));
+            echo html_writer::input_select($updatelocaloptions, "lockconfig_field_updatelocal_{$field}", $pluginconfig->{"field_updatelocal_$field"}, false);
             echo '<br />';
             if ($updateopts) {
                 echo '<label for="menulockconfig_field_updateremote_'.$field.'">'.get_string('auth_updateremote', 'auth') . '</label>&nbsp;';
-                echo $OUTPUT->select(html_select::make($updateextoptions, "lockconfig_field_updateremote_{$field}", $pluginconfig->{"field_updateremote_$field"}, false));
+                echo html_writer::input_select($updateextoptions, "lockconfig_field_updateremote_{$field}", $pluginconfig->{"field_updateremote_$field"}, false);
                 echo '<br />';
 
 
             }
             echo '<label for="menulockconfig_field_lock_'.$field.'">'.get_string('auth_fieldlock', 'auth') . '</label>&nbsp;';
-            echo $OUTPUT->select(html_select::make($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false));
+            echo html_writer::input_select($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false);
             echo '</div>';
         } else {
             echo '<tr valign="top"><td align="right">';
             echo '<label for="menulockconfig_field_lock_'.$field.'">'.$fieldname.'</label>';
             echo '</td><td>';
-            echo $OUTPUT->select(html_select::make($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false));
+            echo html_writer::input_select($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false);
         }
         echo '</td>';
         if (!empty($helptext)) {
index 00562e1..62f705a 100644 (file)
     echo '<span class="form-shortname">sendcoursewelcomemessage</span>';
     echo '</label></div>';
     echo '<div class="form-setting"><div class="form-checkbox defaultsnext">';
-    echo $OUTPUT->select(html_select::make($yesnooptions, 'sendcoursewelcomemessage', $CFG->sendcoursewelcomemessage, false));
+    echo html_writer::input_select($yesnooptions, 'sendcoursewelcomemessage', $CFG->sendcoursewelcomemessage, false);
     echo '</div><div class="form-defaultinfo">'.get_string('defaultsettinginfo', 'admin', get_string('yes')).'</div></div>';
     echo '<div class="form-description">' . get_string('configsendcoursewelcomemessage', 'admin') . '</div>';
     echo '</div>';
index 17a769f..2386bf3 100644 (file)
@@ -214,7 +214,7 @@ echo " " . get_string('remotehost', 'mnet') . ":\n";
 if (!empty($formerror['mnet_host_id'])) {
     echo '<span class="error"> * </span>';
 }
-echo $OUTPUT->select(html_select::make($mnethosts, 'mnet_host_id'));
+echo html_writer::input_select($mnethosts, 'mnet_host_id');
 
 // choose an access level
 echo " " . get_string('accesslevel', 'mnet') . ":\n";
@@ -223,7 +223,7 @@ if (!empty($formerror['accessctrl'])) {
 }
 $accessmenu['allow'] = get_string('allow', 'mnet');
 $accessmenu['deny'] = get_string('deny', 'mnet');
-echo $OUTPUT->select(html_select::make($accessmenu, 'accessctrl'));
+echo html_writer::input_select($accessmenu, 'accessctrl');
 
 // submit button
 echo '<input type="submit" value="' . get_string('addtoacl', 'mnet') . '" />';
index 9f1b293..d6fa8fa 100644 (file)
     echo '<div class="fitem">';
     echo '<div class="fitemtitle"><label for="menucountry">'.get_string("country").'</label></div>';
     echo '<div class="felement ftext">';
-    $select = html_select::make(get_list_of_countries(), "country", $admin->country, get_string("selectacountry")."...");
-    $select->nothingvalue = '';
-    echo $OUTPUT->select($select);
+    echo html_writer::input_select(get_list_of_countries(), "country", $admin->country, array(''=>get_string("selectacountry")."..."));
     echo '</div>';
     echo '</div>';
 
     echo '<div class="fitem">';
     echo '<div class="fitemtitle"><label for="menupublic">'."<a href=\"http://moodle.org/sites/?country=$admin->country\" title=\"".get_string("publicdirectorytitle")."\">".get_string("publicdirectory")."</a>".'</label></div>';
     echo '<div class="felement ftext">';
+    $options = array();
     $options[0] = get_string("publicdirectory0");
     $options[1] = get_string("publicdirectory1");
     $options[2] = get_string("publicdirectory2");
-    $select = html_select::make($options, "public", "2", false);
-    $select->nothingvalue = '';
-    echo $OUTPUT->select($select);
-    unset($options);
+    echo html_writer::input_select($options, "public", "2", false);
     echo '</div>';
     echo '</div>';
 
     echo '<div class="fitem">';
     echo '<div class="fitemtitle"><label for="menucontact">'.get_string("registrationcontact").'</label></div>';
     echo '<div class="felement ftext">';
+    $options = array();
     $options[0] = get_string("registrationcontactno");
     $options[1] = get_string("registrationcontactyes");
-    $select = html_select::make($options, "contact", "1", false);
-    $select->nothingvalue = '';
-    echo $OUTPUT->select($select);
-    unset($options);
+    echo html_writer::input_select($options, "contact", "1", false);
     echo '</div>';
     echo '</div>';
 
     echo '<div class="fitem">';
     echo '<div class="fitemtitle"><label for="menumailme">'.get_string("registrationemail").'</label></div>';
     echo '<div class="felement ftext">';
+    $options = array();
     $options[0] = get_string("registrationno");
     $options[1] = get_string("registrationyes");
-    $select = html_select::make($options, "mailme", "1", false);
-    $select->nothingvalue = '';
-    echo $OUTPUT->select($select);
-    unset($options);
+    echo html_writer::input_select($options, "mailme", "1", false);
     echo '</div>';
     echo '</div>';
 
index af60b50..01b41c3 100644 (file)
     $table->width = '*';
     $table->align = array('left','left','left','left','left','left');
 
-    $select = html_select::make($reportoptions,'report',$report, false);
-    $select->nothingvalue = '';
-    $reporttypemenu = $OUTPUT->select($select);
-
-    $select = html_select::make($timeoptions,'time',$time, false);
-    $select->nothingvalue = '';
-    $timeoptionsmenu = $OUTPUT->select($select);
+    $reporttypemenu = html_writer::input_select($reportoptions,'report',$report, false);
+    $timeoptionsmenu = html_writer::input_select($timeoptions,'time',$time, false);
 
     $table->data[] = array(get_string('statsreporttype'),$reporttypemenu,
                            get_string('statstimeperiod'),$timeoptionsmenu,
index 3408fd3..ef7134b 100644 (file)
@@ -33,9 +33,7 @@ echo '<form method="get" action="." id="settingsform"><div>';
 echo $OUTPUT->heading(get_string('reportsettings', 'report_questioninstances'));
 echo '<p id="intro">', get_string('intro', 'report_questioninstances') , '</p>';
 echo '<p><label for="menuqtype"> ' . get_string('questiontype', 'admin') . '</label> ';
-$select = html_select::make($qtypechoices, 'qtype', $requestedqtype, get_string('all'));
-$select->nothingvalue = '_all_';
-echo $OUTPUT->select($select);
+echo html_writer::input_select($qtypechoices, 'qtype', $requestedqtype, array('_all_'=>get_string('all')));
 echo '</p>';
 echo '<p><input type="submit" id="settingssubmit" value="' .
         get_string('getreport', 'report_questioninstances') . '" /></p>';
index b3e11a9..c603f0f 100755 (executable)
               </label></p>
 
               <p><label for="extendperiod"><?php print_string('enrolperiod') ?></label><br />
-              <?php echo $OUTPUT->select(html_select::make($periodmenu, 'extendperiod', $defaultperiod, $unlimitedperiod)); ?></p>
+              <?php echo html_writer::input_select($periodmenu, 'extendperiod', $defaultperiod, $unlimitedperiod); ?></p>
 
               <p><label for="extendbase"><?php print_string('startingfrom') ?></label><br />
-              <?php echo $OUTPUT->select(html_select::make($basemenu, 'extendbase', $extendbase, false)); ?></p>
+              <?php echo html_writer::input_select($basemenu, 'extendbase', $extendbase, false); ?></p>
               <?php print_collapsible_region_end(); ?>
           </div>
 
index 1716407..bcba278 100644 (file)
@@ -645,7 +645,7 @@ class define_role_table_advanced extends capability_table_with_risks {
         foreach($this->legacyroles as $type => $cap) {
             $options[$type] = get_string('legacy:'.$type, 'role');
         }
-        return $OUTPUT->select(html_select::make($options, 'legacytype', $this->role->legacytype, false));
+        return html_writer::input_select($options, 'legacytype', $this->role->legacytype, false);
     }
 
     protected function get_assignable_levels_control() {
index bff4d6b..89baaf0 100644 (file)
@@ -43,9 +43,7 @@
 
     echo '<center><form action="timezone.php" method="post">';
     echo "$strusers ($strall): ";
-    $select = html_select::make($timezones, "zone", $current, get_string("serverlocaltime"));
-    $select->nothingvalue ="99";
-    echo $OUTPUT->select($select);
+    echo html_writer::input_select($timezones, "zone", $current, array('99'=>get_string("serverlocaltime")));
     echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />";
     echo '<input type="submit" value="'.s($strsavechanges).'" />';
     echo "</form></center>";
index 68effcf..86276c8 100644 (file)
@@ -147,10 +147,9 @@ class edit_field extends XMLDBAction {
         if ($field->getType() != XMLDB_TYPE_DATETIME) {
             unset ($typeoptions[XMLDB_TYPE_DATETIME]);
         }
-        $select = html_select::make($typeoptions, 'type', $field->getType(), false);
-        $select->nothingvalue = '';
+        $select = html_writer::input_select($typeoptions, 'type', $field->getType(), false);
         $o.= '      <tr valign="top"><td><label for="menutype" accesskey="t">Type:</label></td>';
-        $o.= '        <td colspan="2">' . $OUTPUT->select($select) . '</td></tr>';
+        $o.= '        <td colspan="2">' . $select . '</td></tr>';
     /// xmldb_field Length
         $o.= '      <tr valign="top"><td><label for="length" accesskey="l">Length:</label></td>';
         $o.= '        <td colspan="2"><input name="length" type="text" size="6" maxlength="6" id="length" value="' . s($field->getLength()) . '" /><span id="lengthtip"></span></td></tr>';
@@ -159,22 +158,19 @@ class edit_field extends XMLDBAction {
         $o.= '        <td colspan="2"><input name="decimals" type="text" size="6" maxlength="6" id="decimals" value="' . s($field->getDecimals()) . '" /><span id="decimalstip"></span></td></tr>';
     /// xmldb_field Unsigned
         $unsignedoptions = array (0 => 'signed', 1 => 'unsigned');
-        $select = html_select::make($unsignedoptions, 'unsigned', $field->getUnsigned(), false);
-        $select->nothingvalue = '';
+        $select = html_writer::input_select($unsignedoptions, 'unsigned', $field->getUnsigned(), false);
         $o.= '      <tr valign="top"><td><label for="menuunsigned" accesskey="u">Unsigned:</label></td>';
-        $o.= '        <td colspan="2">' . $OUTPUT->select($select) . '</td></tr>';
+        $o.= '        <td colspan="2">' . $select . '</td></tr>';
     /// xmldb_field NotNull
         $notnulloptions = array (0 => 'null', 'not null');
-        $select = html_select::make($notnulloptions, 'notnull', $field->getNotNull(), false);
-        $select->nothingvalue = '';
+        $select = html_writer::input_select($notnulloptions, 'notnull', $field->getNotNull(), false);
         $o.= '      <tr valign="top"><td><label for="menunotnull" accesskey="n">Not Null:</label></td>';
-        $o.= '        <td colspan="2">' . $OUTPUT->select($select) . '</td></tr>';
+        $o.= '        <td colspan="2">' . $select . '</td></tr>';
     /// xmldb_field Sequence
         $sequenceoptions = array (0 => $this->str['no'], 1 => 'auto-numbered');
-        $select = html_select::make($sequenceoptions, 'sequence', $field->getSequence(), false);
-        $select->nothingvalue = '';
+        $select = html_writer::input_select($sequenceoptions, 'sequence', $field->getSequence(), false);
         $o.= '      <tr valign="top"><td><label for="menusequence" accesskey="s">Sequence:</label></td>';
-        $o.= '        <td colspan="2">' . $OUTPUT->select($select) . '</td></tr>';
+        $o.= '        <td colspan="2">' . $select . '</td></tr>';
     /// xmldb_field Default
         $o.= '      <tr valign="top"><td><label for="default" accesskey="d">Default:</label></td>';
         $o.= '        <td colspan="2"><input type="text" name="default" size="30" maxlength="80" id="default" value="' . s($field->getDefault()) . '" /></td></tr>';
index 721ca48..44c96c6 100644 (file)
@@ -123,9 +123,8 @@ class edit_index extends XMLDBAction {
         $typeoptions = array (0 => 'not unique',
                               1 => 'unique');
         $o.= '      <tr valign="top"><td><label for="menuunique" accesskey="t">Type:</label></td>';
-        $select = html_select::make($typeoptions, 'unique', $index->getUnique(), false);
-        $select->nothingvalue = '';
-        $o.= '        <td colspan="2">' . $OUTPUT->select($select) . '</td></tr>';
+        $select = html_writer::input_select($typeoptions, 'unique', $index->getUnique(), false);
+        $o.= '        <td colspan="2">' . $select . '</td></tr>';
     /// xmldb_index Fields
         $o.= '      <tr valign="top"><td><label for="fields" accesskey="f">Fields:</label></td>';
         $o.= '        <td colspan="2"><input name="fields" type="text" size="40" maxlength="80" id="fields" value="' . s(implode(', ', $index->getFields())) . '" /></td></tr>';
index bc9c878..90d1957 100644 (file)
@@ -128,11 +128,10 @@ class edit_key extends XMLDBAction {
     /// if ($key->getType() != XMLDB_KEY_FOREIGN_UNIQUE) {
     ///     unset ($typeoptions[XMLDB_KEY_FOREIGN_UNIQUE);
     /// }
-        $select = html_select::make($typeoptions, 'type', $key->getType(), false);
-        $select->nothingvalue = '';
+        $select = html_writer::input_select($typeoptions, 'type', $key->getType(), false);
 
         $o.= '      <tr valign="top"><td><label for="menutype" accesskey="t">Type:</label></td>';
-        $o.= '        <td colspan="2">' . $OUTPUT->select($select) . '</td></tr>';
+        $o.= '        <td colspan="2">' . $select . '</td></tr>';
     /// xmldb_key Fields
         $o.= '      <tr valign="top"><td><label for="fields" accesskey="f">Fields:</label></td>';
         $o.= '        <td colspan="2"><input name="fields" type="text" size="40" maxlength="80" id="fields" value="' . s(implode(', ', $key->getFields())) . '" /></td></tr>';
index 8447136..b51aaa4 100644 (file)
@@ -106,7 +106,7 @@ class new_statement extends XMLDBAction {
             $o.= '    <input type="hidden" name ="postaction" value="edit_statement" />';
             $o.= '    <input type="hidden" name ="sesskey" value="' . sesskey() . '" />';
             $o.= '    <table id="formelements" class="boxaligncenter" cellpadding="5">';
-            $o.= '      <tr><td><label for="type" accesskey="t">' . $this->str['statementtype'] .' </label>' . $OUTPUT->select(html_select::make($typeoptions, 'type')) . '<label for="table" accesskey="a">' . $this->str['statementtable'] . ' </label>' .$OUTPUT->select(html_select::make($selecttables, 'table')) . '</td></tr>';
+            $o.= '      <tr><td><label for="type" accesskey="t">' . $this->str['statementtype'] .' </label>' . html_writer::input_select($typeoptions, 'type') . '<label for="table" accesskey="a">' . $this->str['statementtable'] . ' </label>' .html_writer::input_select($selecttables, 'table') . '</td></tr>';
             $o.= '      <tr><td colspan="2" align="center"><input type="submit" value="' .$this->str['create'] . '" /></td></tr>';
             $o.= '      <tr><td colspan="2" align="center"><a href="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a></td></tr>';
             $o.= '    </table>';
index cacb630..63d9fb3 100644 (file)
@@ -114,7 +114,7 @@ class new_table_from_mysql extends XMLDBAction {
             $o.= '    <input type="hidden" name ="postaction" value="edit_table" />';
             $o.= '    <input type="hidden" name ="sesskey" value="' . sesskey() . '" />';
             $o.= '    <table id="formelements" class="boxaligncenter" cellpadding="5">';
-            $o.= '      <tr><td><label for="table" accesskey="t">' . $this->str['createtable'] .' </label>' . $OUTPUT->select(html_select::make($selecttables, 'table')) . '<label for="after" accesskey="a">' . $this->str['aftertable'] . ' </label>' .$OUTPUT->select(html_select::make($aftertables, 'after')) . '</td></tr>';
+            $o.= '      <tr><td><label for="table" accesskey="t">' . $this->str['createtable'] .' </label>' . html_writer::input_select($selecttables, 'table') . '<label for="after" accesskey="a">' . $this->str['aftertable'] . ' </label>' .html_writer::input_select($aftertables, 'after') . '</td></tr>';
             $o.= '      <tr><td colspan="2" align="center"><input type="submit" value="' .$this->str['create'] . '" /></td></tr>';
             $o.= '      <tr><td colspan="2" align="center"><a href="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a></td></tr>';
             $o.= '    </table>';
index d2ad4c5..dda5a4c 100644 (file)
@@ -116,7 +116,7 @@ class view_structure_php extends XMLDBAction {
         $o.= '    <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
         $o.= '    <input type="hidden" name ="action" value="view_structure_php" />';
         $o.= '    <table id="formelements" class="boxaligncenter" cellpadding="5">';
-        $o.= '      <tr><td><label for="action" accesskey="c">' . $this->str['selectaction'] .' </label>' . $OUTPUT->select(html_select::make($popcommands, 'command', $commandparam, false)) . '&nbsp;<label for="table" accesskey="t">' . $this->str['selecttable'] . ' </label>' .$OUTPUT->select(html_select::make($poptables, 'table', $tableparam, false)) . '</td></tr>';
+        $o.= '      <tr><td><label for="action" accesskey="c">' . $this->str['selectaction'] .' </label>' . html_writer::input_select($popcommands, 'command', $commandparam, false) . '&nbsp;<label for="table" accesskey="t">' . $this->str['selecttable'] . ' </label>' .html_writer::input_select($poptables, 'table', $tableparam, false) . '</td></tr>';
         $o.= '      <tr><td colspan="2" align="center"><input type="submit" value="' .$this->str['view'] . '" /></td></tr>';
         $o.= '    </table>';
         $o.= '</div></form>';
index ceba429..413bcda 100644 (file)
@@ -167,7 +167,7 @@ class view_table_php extends XMLDBAction {
         $o.= '    <input type="hidden" name ="table" value="' . s($tableparam) . '" />';
         $o.= '    <input type="hidden" name ="action" value="view_table_php" />';
         $o.= '    <table id="formelements" class="boxaligncenter" cellpadding="5">';
-        $o.= '      <tr><td><label for="action" accesskey="c">' . $this->str['selectaction'] .' </label>' . $OUTPUT->select(html_select::make($popcommands, 'command', $commandparam, false)) . '&nbsp;<label for="fieldkeyindex" accesskey="f">' . $this->str['selectfieldkeyindex'] . ' </label>' .$OUTPUT->select(html_select::make($popfields, 'fieldkeyindex', $origfieldkeyindexparam, false)) . '</td></tr>';
+        $o.= '      <tr><td><label for="action" accesskey="c">' . $this->str['selectaction'] .' </label>' . html_writer::input_select($popcommands, 'command', $commandparam, false) . '&nbsp;<label for="fieldkeyindex" accesskey="f">' . $this->str['selectfieldkeyindex'] . ' </label>' .html_writer::input_select($popfields, 'fieldkeyindex', $origfieldkeyindexparam, false) . '</td></tr>';
         $o.= '      <tr><td colspan="2" align="center"><input type="submit" value="' .$this->str['view'] . '" /></td></tr>';
         $o.= '    </table>';
         $o.= '</div></form>';
index 1bb2fe8..24fb45e 100644 (file)
@@ -278,7 +278,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
 
 
-        echo $OUTPUT->select(html_select::make($CASLANGUAGES, 'language', $config->language, false));
+        echo html_writer::input_select($CASLANGUAGES, 'language', $config->language, false);
 
 
 
@@ -303,9 +303,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
         unset($options);
 
         $options[1] = get_string('yes');
-        $select = html_select::make($options, 'proxycas', $config->proxycas, get_string('no'));
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select($options, 'proxycas', $config->proxycas, get_string('no'));
 
         ?>
 
@@ -329,9 +327,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
         $options[1] = get_string('yes');
 
-        $select = html_select::make($options, 'logoutcas', $config->logoutcas, get_string('no'));
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select($options, 'logoutcas', $config->logoutcas, get_string('no'));
 
         ?>
 
@@ -355,9 +351,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
         $options[1] = get_string('yes');
 
-        $select = html_select::make($options, 'multiauth', $config->multiauth, get_string('no'));
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select($options, 'multiauth', $config->multiauth, get_string('no'));
 
         ?>
 
@@ -417,7 +411,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
        $versions[3] = '3';
 
-       echo $OUTPUT->select(html_select::make($versions, 'version', $config->version, false));
+       echo html_writer::input_select($versions, 'version', $config->version, false);
 
        if (isset($err['version'])) echo $OUTPUT->error_text($err['version']);
 
@@ -535,7 +529,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
     <td>
 
-    <?php echo $OUTPUT->select(html_select::make($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, false)); ?>
+    <?php echo html_writer::input_select($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, false); ?>
 
     <?php  if (isset($err['user_type'])) echo $OUTPUT->error_text($err['user_type']); ?>
 
@@ -579,7 +573,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
     <td>
 
-        <?php echo $OUTPUT->select(html_select::make($yesno, 'search_sub', $config->search_sub, false)); ?>
+        <?php echo html_writer::input_select($yesno, 'search_sub', $config->search_sub, false); ?>
 
     </td>
 
@@ -607,7 +601,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
        $opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes');
 
-       echo $OUTPUT->select(html_select::make($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, false));
+       echo html_writer::input_select($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, false);
 
        if (isset($err['opt_deref'])) echo $OUTPUT->error_text($err['opt_deref']);
 
@@ -793,7 +787,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
        $deleteopt[AUTH_REMOVEUSER_FULLDELETE] = get_string('auth_remove_delete','auth');
 
-       echo $OUTPUT->select(html_select::make($deleteopt, 'removeuser', $config->removeuser, false));
+       echo html_writer::input_select($deleteopt, 'removeuser', $config->removeuser, false);
 
     ?>
 
index 86be9cb..4eb9178 100644 (file)
@@ -74,7 +74,7 @@
        foreach ($dbtypes as $dbtype) {
            $dboptions[$dbtype] = $dbtype;
        }
-       echo $OUTPUT->select(html_select::make($dboptions, "type", $config->type, false));
+       echo html_writer::input_select($dboptions, "type", $config->type, false);
     ?>
 
     </td>
@@ -86,7 +86,7 @@
 <tr valign="top" class="required">
     <td align="right"><label for="menusybasequoting"><?php print_string("auth_dbsybasequoting", "auth_db") ?></label></td>
     <td>
-        <?php echo $OUTPUT->select(html_select::make($yesno, 'sybasequoting', $config->sybasequoting, false)); ?>
+        <?php echo html_writer::input_select($yesno, 'sybasequoting', $config->sybasequoting, false); ?>
     </td>
     <td><?php print_string("auth_dbsybasequotinghelp", "auth_db") ?></td>
 </tr>
         $passtype["md5"]       = get_string("md5", "auth");
         $passtype["sha1"]      = get_string("sha1", "auth");
         $passtype["internal"]  = get_string("internal", "auth");
-        echo $OUTPUT->select(html_select::make($passtype, "passtype", $config->passtype, false));
+        echo html_writer::input_select($passtype, "passtype", $config->passtype, false);
 
         ?>
     </td>
 <tr valign="top">
     <td align="right"><label for="menudebugauthdb"><?php print_string("auth_dbdebugauthdb", "auth_db") ?></label></td>
     <td>
-        <?php echo $OUTPUT->select(html_select::make($yesno, 'debugauthdb', $config->debugauthdb, false)); ?>
+        <?php echo html_writer::input_select($yesno, 'debugauthdb', $config->debugauthdb, false); ?>
     </td>
     <td><?php print_string("auth_dbdebugauthdbhelp", "auth_db") ?></td>
 </tr>
        $deleteopt[AUTH_REMOVEUSER_KEEP] = get_string('auth_remove_keep','auth');
        $deleteopt[AUTH_REMOVEUSER_SUSPEND] = get_string('auth_remove_suspend','auth');
        $deleteopt[AUTH_REMOVEUSER_FULLDELETE] = get_string('auth_remove_delete','auth');
-       echo $OUTPUT->select(html_select::make($deleteopt, 'removeuser', $config->removeuser, false));
+       echo html_writer::input_select($deleteopt, 'removeuser', $config->removeuser, false);
     ?>
     </td>
     <td>
index b7a558d..84ef491 100644 (file)
@@ -19,7 +19,7 @@
     <td align="right"><label for="menurecaptcha"><?php print_string('auth_emailrecaptcha_key', 'auth_email') ?></label></td>
     <td><?php
         global $OUTPUT;
-        echo $OUTPUT->select(html_select::make($yesno, 'recaptcha', $config->recaptcha, false));
+        echo html_writer::input_select($yesno, 'recaptcha', $config->recaptcha, false);
         ?></td>
     <td><?php print_string('auth_emailrecaptcha', 'auth_email') ?></td>
 </tr>
index 31c1040..48e5bf7 100644 (file)
@@ -48,7 +48,7 @@ if (!isset($config->changepasswordurl)) {
         foreach ($imaptypes as $imaptype) {
             $imapoptions[$imaptype] = $imaptype;
         }
-        echo $OUTPUT->select(html_select::make($imapoptions, 'type', $config->type, false));
+        echo html_writer::input_select($imapoptions, 'type', $config->type, false);
 
         ?>
     </td>
index 51f26b8..27bc9dd 100644 (file)
@@ -95,7 +95,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
        $versions = array();
        $versions[2] = '2';
        $versions[3] = '3';
-       echo $OUTPUT->select(html_select::make($versions, 'version', $config->version, false));
+       echo html_writer::input_select($versions, 'version', $config->version, false);
        if (isset($err['version'])) echo $OUTPUT->error_text($err['version']);
     ?>
     </td>
@@ -128,7 +128,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right"><label for="menupreventpassindb"><?php print_string('auth_ldap_preventpassindb_key','auth_ldap') ?></label></td>
     <td>
-        <?php echo $OUTPUT->select(html_select::make($yesno, 'preventpassindb', $config->preventpassindb, false)); ?>
+        <?php echo html_writer::input_select($yesno, 'preventpassindb', $config->preventpassindb, false); ?>
     </td><td>
     <?php print_string('auth_ldap_preventpassindb','auth_ldap') ?>
     </td>
@@ -163,7 +163,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right"><label for="menuuser_type"><?php print_string('auth_ldap_user_type_key','auth_ldap') ?></label></td>
     <td>
-    <?php echo $OUTPUT->select(html_select::make($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, false)); ?>
+    <?php echo html_writer::input_select($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, false); ?>
     <?php  if (isset($err['user_type'])) echo $OUTPUT->error_text($err['user_type']); ?>
     </td>
     <td>
@@ -185,7 +185,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right"><label for="menusearch_sub"><?php print_string('auth_ldap_search_sub_key','auth_ldap') ?></label></td>
     <td>
-        <?php echo $OUTPUT->select(html_select::make($yesno, 'search_sub', $config->search_sub, false)); ?>
+        <?php html_writer::input_select($yesno, 'search_sub', $config->search_sub, false); ?>
     </td>
     <td>
     <?php print_string('auth_ldap_search_sub','auth_ldap') ?>
@@ -199,7 +199,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
        $opt_deref = array();
        $opt_deref[LDAP_DEREF_NEVER] = get_string('no');
        $opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes');
-       echo $OUTPUT->select(html_select::make($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, false));
+       echo html_writer::input_select($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, false);
        if (isset($err['opt_deref'])) echo $OUTPUT->error_text($err['opt_deref']);
     ?>
     </td>
@@ -261,7 +261,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right" valign="top"><label for="menuforcechangepassword"><?php print_string('forcechangepassword', 'auth') ?></label></td>
     <td>
-        <?php echo $OUTPUT->select(html_select::make($yesno, 'forcechangepassword', $config->forcechangepassword, false)); ?>
+        <?php echo html_writer::input_select($yesno, 'forcechangepassword', $config->forcechangepassword, false); ?>
     </td>
     <td align="left" valign="top">
         <p><?php print_string('forcechangepasswordfirst_help', 'auth') ?></p>
@@ -271,7 +271,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top"  class="required">
     <td align="right" valign="top"><label for="menustdchangepassword"><?php print_string('stdchangepassword', 'auth') ?></label></td>
     <td>
-        <?php echo $OUTPUT->select(html_select::make($yesno, 'stdchangepassword', $config->stdchangepassword, false)); ?>
+        <?php echo html_writer::input_select($yesno, 'stdchangepassword', $config->stdchangepassword, false); ?>
     </td>
     <td align="left" valign="top">
         <p><?php print_string('stdchangepassword_expl', 'auth') ?></p>
@@ -287,7 +287,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
         $passtype['plaintext'] = get_string('plaintext', 'auth');
         $passtype['md5']       = get_string('md5', 'auth');
         $passtype['sha1']      = get_string('sha1', 'auth');
-        echo $OUTPUT->select(html_select::make($passtype, 'passtype', $config->passtype, false));
+        echo html_writer::input_select($passtype, 'passtype', $config->passtype, false);
 
         ?>
     </td>
@@ -322,7 +322,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
        $expiration = array();
        $expiration['0'] = 'no';
        $expiration['1'] = 'LDAP';
-       echo $OUTPUT->select(html_select::make($expiration, 'expiration', $config->expiration, false));
+       echo html_writer::input_select($expiration, 'expiration', $config->expiration, false);
        if (isset($err['expiration'])) echo $OUTPUT->error_text($err['expiration']);
     ?>
     </td>
@@ -359,7 +359,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right"><label for="menugracelogins"><?php print_string('auth_ldap_gracelogins_key','auth_ldap') ?></label></td>
     <td>
-        <?php echo $OUTPUT->select(html_select::make($yesno, 'gracelogins', $config->gracelogins, false)); ?>
+        <?php echo html_writer::input_select($yesno, 'gracelogins', $config->gracelogins, false); ?>
     </td>
     <td>
     <?php print_string('auth_ldap_gracelogins_desc','auth_ldap') ?>
@@ -389,7 +389,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top">
     <td align="right"><label for="menuauth_user_create"><?php print_string('auth_ldap_auth_user_create_key','auth_ldap') ?></label></td>
     <td>
-      <?php echo $OUTPUT->select(html_select::make($yesno, 'auth_user_create', $config->auth_user_create, false)); ?>
+      <?php echo html_writer::input_select($yesno, 'auth_user_create', $config->auth_user_create, false); ?>
     </td>
     <td>
         <?php print_string("auth_user_creation","auth"); ?>
@@ -437,7 +437,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
        $deleteopt[AUTH_REMOVEUSER_KEEP] = get_string('auth_remove_keep','auth');
        $deleteopt[AUTH_REMOVEUSER_SUSPEND] = get_string('auth_remove_suspend','auth');
        $deleteopt[AUTH_REMOVEUSER_FULLDELETE] = get_string('auth_remove_delete','auth');
-       echo $OUTPUT->select(html_select::make($deleteopt, 'removeuser', $config->removeuser, false));
+       echo html_writer::input_select($deleteopt, 'removeuser', $config->removeuser, false);
     ?>
     </td>
     <td>
@@ -455,7 +455,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
     <td align="right"><label for="menuntlmsso_enabled"><?php print_string('auth_ntlmsso_enabled_key','auth_ldap') ?></label></td>
     <td>
     <?php
-       echo $OUTPUT->select(html_select::make($yesno, 'ntlmsso_enabled', $config->ntlmsso_enabled));
+       echo html_writer::input_select($yesno, 'ntlmsso_enabled', $config->ntlmsso_enabled);
     ?>
     </td>
     <td>
@@ -474,7 +474,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
     <td align="right"><label for="menuntlmsso_ie_fastpath"><?php print_string('auth_ntlmsso_ie_fastpath_key','auth_ldap') ?></label></td>
     <td>
     <?php
-       echo $OUTPUT->select(html_select::make($yesno, 'ntlmsso_ie_fastpath', $config->ntlmsso_ie_fastpath));
+       echo html_writer::input_select($yesno, 'ntlmsso_ie_fastpath', $config->ntlmsso_ie_fastpath);
     ?>
     </td>
     <td>
index c0f32f6..480de6a 100644 (file)
@@ -44,7 +44,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
     <td>
         <?php
 
-        echo $OUTPUT->select(html_select::make($yesno, 'auto_add_remote_users', $config->auto_add_remote_users, false));
+        echo html_writer::input_select($yesno, 'auto_add_remote_users', $config->auto_add_remote_users, false);
 
         ?>
     </td>
index cdc30cf..635a57d 100644 (file)
@@ -51,7 +51,7 @@ if (!isset($config->changepasswordurl)) {
         foreach ($pop3types as $pop3type) {
             $pop3options[$pop3type] = $pop3type;
         }
-        echo $OUTPUT->select(html_select::make($pop3options, 'type', $config->type, false));
+        echo html_writer::input_select($pop3options, 'type', $config->type, false);
 
         ?>
     </td>
index 65ae8b6..8cf357a 100644 (file)
@@ -69,7 +69,7 @@ if (!isset($config->changepasswordurl)) {
     $radiustype['CHAP_MD5'] = get_string('auth_radiustypechapmd5', 'auth_radius');
     $radiustype['MSCHAPv1'] = get_string('auth_radiustypemschapv1', 'auth_radius');
     $radiustype['MSCHAPv2'] = get_string('auth_radiustypemschapv2', 'auth_radius');
-    echo $OUTPUT->select(html_select::make($radiustype, 'radiustype', $config->radiustype, false));
+    echo html_writer::input_select($radiustype, 'radiustype', $config->radiustype, false);
 
     if (isset($err['radiustype'])) {
         echo $OUTPUT->error_text($err['radiustype']);
index 64583f8..7b89d2e 100644 (file)
@@ -210,7 +210,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             echo "</b></td><td colspan=\"2\">";
             $meta_options[0] = get_string("no");
             $meta_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($meta_options, "backup_metacourse", $backup_metacourse, false));
+            echo html_writer::input_select($meta_options, "backup_metacourse", $backup_metacourse, false);
             echo "</td></tr>";
         }
         else {
@@ -228,7 +228,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             }
             $user_options[1] = get_string("course");
             $user_options[2] = get_string("none");
-            echo $OUTPUT->select(html_select::make($user_options, "backup_users", $backup_users, false));
+            echo html_writer::input_select($user_options, "backup_users", $backup_users, false);
             echo "</td></tr>";
         }
         else {
@@ -243,7 +243,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             echo "</b></td><td colspan=\"2\">";
             $log_options[0] = get_string("no");
             $log_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($log_options, "backup_logs", $backup_logs, false));
+            echo html_writer::input_select($log_options, "backup_logs", $backup_logs, false);
             echo "</td></tr>";
         }
         else {
@@ -258,7 +258,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             echo "</b></td><td colspan=\"2\">";
             $user_file_options[0] = get_string("no");
             $user_file_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($user_file_options, "backup_user_files", $backup_user_files, false));
+            echo html_writer::input_select($user_file_options, "backup_user_files", $backup_user_files, false);
             echo "</td></tr>";
         }
         else {
@@ -272,7 +272,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
         echo "</b></td><td colspan=\"2\">";
         $course_file_options[0] = get_string("no");
         $course_file_options[1] = get_string("yes");
-        echo $OUTPUT->select(html_select::make($course_file_options, "backup_course_files", $backup_course_files, false));
+        echo html_writer::input_select($course_file_options, "backup_course_files", $backup_course_files, false);
         echo "</td></tr>";
 
 
@@ -285,7 +285,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             echo "</b></td><td colspan=\"2\">";
             $course_file_options[0] = get_string("no");
             $course_file_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($course_file_options, "backup_site_files", $backup_site_files, false));
+            echo html_writer::input_select($course_file_options, "backup_site_files", $backup_site_files, false);
             echo "</td></tr>";
         }
 
@@ -297,7 +297,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             echo "</b></td><td colspan=\"2\">";
             $gradebook_history_options[0] = get_string("no");
             $gradebook_history_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($gradebook_history_options, "backup_gradebook_history", $backup_gradebook_history, false));
+            echo html_writer::input_select($gradebook_history_options, "backup_gradebook_history", $backup_gradebook_history, false);
             echo "</td></tr>";
         } else {
             $hidden_options .= '<input type="hidden" name="backup_gradebook_history" value="0" />';
@@ -311,7 +311,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             echo "</b></td><td colspan=\"2\">";
             $mess_options[0] = get_string("no");
             $mess_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($mess_options, "backup_messages", $backup_messages, false));
+            echo html_writer::input_select($mess_options, "backup_messages", $backup_messages, false);
             echo "</td></tr>";
         }
         else {
@@ -326,7 +326,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             echo "</b></td><td colspan=\"2\">";
             $blog_options[0] = get_string("no");
             $blog_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($blog_options, "backup_blogs", $backup_blogs, false));
+            echo html_writer::input_select($blog_options, "backup_blogs", $backup_blogs, false);
             echo "</td></tr>";
         }
         else {
index 443886c..1e16c9f 100644 (file)
@@ -234,7 +234,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
 /// Acummulator for hidden options and proper XHTML output
     $hidden_options = '';
 
-    echo $OUTPUT->select(html_select::make($restore_restoreto_options, "restore_restoreto", $restore_restoreto, false));
+    echo html_writer::input_select($restore_restoreto_options, "restore_restoreto", $restore_restoreto, false);
     echo "</td></tr>";
     if ($cancreatecourses) {  //display these fields conditionally
 
@@ -260,7 +260,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
                 $category_default = $fromcat;
             }
         }
-        echo $OUTPUT->select(html_select::make($categories, 'restore_restorecatto', $category_default, false));
+        echo html_writer::input_select($categories, 'restore_restorecatto', $category_default, false);
         echo "</td>";
         echo "</tr>";
 
@@ -432,7 +432,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             $metacourse_options = array();
             $metacourse_options[0] = get_string("no");
             $metacourse_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($metacourse_options, "restore_metacourse", $restore_metacourse, false));
+            echo html_writer::input_select($metacourse_options, "restore_metacourse", $restore_metacourse, false);
         } else {
             echo get_string("no");
             echo "<input type=\"hidden\" id=\"menurestore_metacourse\" name=\"restore_metacourse\" value=\"0\" />";
@@ -452,7 +452,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             }
             $user_options[1] = get_string("course");
             $user_options[2] = get_string("none");
-            echo $OUTPUT->select(html_select::make($user_options, "restore_users", $restore_users, false));
+            echo html_writer::input_select($user_options, "restore_users", $restore_users, false);
         } else {
             echo get_string("none");
             echo "<input type=\"hidden\" id=\"menurestore_users\" name=\"restore_users\" value=\"2\" />";
@@ -475,7 +475,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             $group_options[RESTORE_GROUPINGS_ONLY] = get_string('groupingsonly', 'group');
             $group_options[RESTORE_GROUPS_GROUPINGS] = get_string('groupsgroupings', 'group'); //all.
         }
-        echo $OUTPUT->select(html_select::make($group_options, 'restore_groups', $restore_groups, false));
+        echo html_writer::input_select($group_options, 'restore_groups', $restore_groups, false);
         echo "</td></tr>";
 
         //Now print the Logs tr
@@ -488,7 +488,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             $log_options = array();
             $log_options[0] = get_string("no");
             $log_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($log_options, "restore_logs", $restore_logs, false));
+            echo html_writer::input_select($log_options, "restore_logs", $restore_logs, false);
         } else {
             echo get_string("no");
             echo "<input type=\"hidden\" id=\"menurestore_logs\" name=\"restore_logs\" value=\"0\" />";
@@ -505,7 +505,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             $user_file_options = array();
             $user_file_options[0] = get_string("no");
             $user_file_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($user_file_options, "restore_user_files", $restore_user_files, false));
+            echo html_writer::input_select($user_file_options, "restore_user_files", $restore_user_files, false);
         } else {
             echo get_string("no");
             echo "<input type=\"hidden\" id=\"menurestore_user_files\" name=\"restore_user_files\" value=\"0\" />";
@@ -524,7 +524,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             $course_file_options = array();
             $course_file_options[0] = get_string("no");
             $course_file_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($course_file_options, "restore_course_files", $restore_course_files, false));
+            echo html_writer::input_select($course_file_options, "restore_course_files", $restore_course_files, false);
         } else {
             echo get_string("no");
             echo "<input type=\"hidden\" id=\"menurestore_course_files\" name=\"restore_course_files\" value=\"0\" />";
@@ -542,7 +542,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             $site_file_options = array();
             $site_file_options[0] = get_string("no");
             $site_file_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($site_file_options, "restore_site_files", $restore_site_files, false));
+            echo html_writer::input_select($site_file_options, "restore_site_files", $restore_site_files, false);
         } else {
             echo get_string("no");
             echo "<input type=\"hidden\" id=\"menurestore_site_files\" name=\"restore_site_files\" value=\"0\" />";
@@ -559,7 +559,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
                 $gradebook_history_options = array();
                 $gradebook_history_options[0] = get_string("no");
                 $gradebook_history_options[1] = get_string("yes");
-                echo $OUTPUT->select(html_select::make($gradebook_history_options, "restore_gradebook_history", $restore_gradebook_history, false));
+                echo html_writer::input_select($gradebook_history_options, "restore_gradebook_history", $restore_gradebook_history, false);
             } else {
                 echo get_string("no");
                 echo "<input type=\"hidden\" id=\"menurestore_gradebook_history\" name=\"restore_gradebook_history\" value=\"0\" />";
@@ -581,7 +581,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             $message_options = array();
             $message_options[0] = get_string("no");
             $message_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($message_options, "restore_messages", $restore_messages, false));
+            echo html_writer::input_select($message_options, "restore_messages", $restore_messages, false);
             echo "</td></tr>";
         } else {
             $hidden_options .= '<input type="hidden" name="restore_messages" value="0" />';
@@ -599,7 +599,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
             $blog_options = array();
             $blog_options[0] = get_string("no");
             $blog_options[1] = get_string("yes");
-            echo $OUTPUT->select(html_select::make($blog_options, "restore_blogs", $restore_blogs, false));
+            echo html_writer::input_select($blog_options, "restore_blogs", $restore_blogs, false);
             echo "</td></tr>";
         } else {
             $hidden_options .= '<input type="hidden" name="restore_blogs" value="0" />';
index 4416ad9..e27f9bf 100644 (file)
@@ -188,7 +188,7 @@ function comp(v) { // general entry point for all cases
         $options[52] = get_string('weekly','block_loancalc');
         $options[26] = get_string('fortnightly','block_loancalc');
         $options[12] = get_string('monthly','block_loancalc');
-        $this->content->text .= $OUTPUT->select(html_select::make($options,'LOANPAYPERIOD','12'));
+        $this->content->text .= html_writer::input_select($options,'LOANPAYPERIOD','12');
         $this->content->text .= '</td>
                     <td></td>
                 </tr>
index 8e2ee1a..d2afe7a 100644 (file)
@@ -1531,14 +1531,13 @@ function calendar_format_event_time($event, $now, $morehref, $usecommonwords = t
 }
 
 function calendar_print_month_selector($name, $selected) {
-    global $OUTPUT;
     $months = array();
 
     for ($i=1; $i<=12; $i++) {
         $months[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), '%B');
     }
 
-    echo $OUTPUT->select(html_select::make($months, $name, $selected, false));
+    echo html_writer::input_select($months, $name, $selected, false);
 }
 
 function calendar_get_filters_status() {
index 646f776..b8e1299 100644 (file)
@@ -9,9 +9,7 @@
         $options['0']  = get_string('default', 'calendar');
         $options[CALENDAR_TF_12] = get_string('timeformat_12', 'calendar');
         $options[CALENDAR_TF_24] = get_string('timeformat_24', 'calendar');
-        $select = html_select::make($options, "timeformat", $prefs->timeformat, false);
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select($options, "timeformat", $prefs->timeformat, false);
     ?>
     <p><?php print_string('explain_timeformat', 'calendar'); ?></p>
     </td>
@@ -29,9 +27,7 @@
         $options[4] = get_string('thursday', 'calendar');
         $options[5] = get_string('friday', 'calendar');
         $options[6] = get_string('saturday', 'calendar');
-        $select = html_select::make($options, 'startwday', $prefs->startwday, false);
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select($options, 'startwday', $prefs->startwday, false);
     ?>
     <p><?php print_string('explain_startwday', 'calendar'); ?></p>
     </td>
@@ -45,9 +41,7 @@
         for ($i=1; $i<=20; $i++) {
             $options[$i] = $i;
         }
-        $select = html_select::make($options, "maxevents", $prefs->maxevents, false);
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select($options, "maxevents", $prefs->maxevents, false);
     ?>
     <p><?php print_string('explain_maxevents', 'calendar'); ?></p>
     </td>
@@ -61,9 +55,7 @@
         for ($i=1; $i<=200; $i++) {
             $options[$i] = $i;
         }
-        $select = html_select::make($options, "lookahead", $prefs->lookahead, false);
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select($options, "lookahead", $prefs->lookahead, false);
     ?>
     <p><?php print_string('explain_lookahead', 'calendar'); ?></p>
     </td>
@@ -73,9 +65,7 @@
     <th scope="row"><?php print_string('pref_persistflt', 'calendar')?>:</th>
     <td>
     <?php
-    $select = html_select::make(array(0 => get_string('no'), 1 => get_string('yes')), 'persistflt', $prefs->persistflt, false);
-    $select->nothingvalue = '';
-    echo $OUTPUT->select($select);
+    echo html_writer::input_select(array(0 => get_string('no'), 1 => get_string('yes')), 'persistflt', $prefs->persistflt, false);
     ?>
     <p><?php print_string('explain_persistflt', 'calendar'); ?></p>
     </td>
index d692e8c..31c61f2 100644 (file)
@@ -3057,7 +3057,7 @@ function print_grouping_settings($form, $course=NULL) {
 
         $groupingid = isset($cm->groupingid) ? $cm->groupingid : 0;
 
-        echo $OUTPUT->select(html_select::make($groupings, 'groupingid', $groupingid, get_string('none')));
+        echo html_writer::input_select($groupings, 'groupingid', $groupingid, get_string('none'));
         echo '</td></tr>';
 
         $checked = empty($cm->groupmembersonly) ? '':'checked="checked"';
index 29f2e79..e8fa3d4 100644 (file)
@@ -261,7 +261,7 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select
     } else {
         $courses = array();
         $courses[$course->id] = $course->fullname . ((empty($course->category)) ? ' ('.get_string('site').') ' : '');
-        echo $OUTPUT->select(html_select::make($courses,"id",$course->id, false));
+        echo html_writer::input_select($courses,"id",$course->id, false);
         if (has_capability('coursereport/log:view', $sitecontext)) {
             $a = new object();
             $a->url = "$CFG->wwwroot/course/report/log/index.php?chooselog=0&group=$selectedgroup&user=$selecteduser"
@@ -279,11 +279,11 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select
         else {
             $groups = array();
         }
-        echo $OUTPUT->select(html_select::make($groups, "group", $selectedgroup, get_string("allgroups")));
+        echo html_writer::input_select($groups, "group", $selectedgroup, get_string("allgroups"));
     }
 
     if ($showusers) {
-        echo $OUTPUT->select(html_select::make($users, "user", $selecteduser, get_string("allparticipants")));
+        echo html_writer::input_select($users, "user", $selecteduser, get_string("allparticipants"));
     }
     else {
         $users = array();
@@ -294,26 +294,21 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select
         else {
             $users[0] = get_string('allparticipants');
         }
-        echo $OUTPUT->select(html_select::make($users, "user", $selecteduser, false));
+        echo html_writer::input_select($users, "user", $selecteduser, false);
         $a->url = "$CFG->wwwroot/course/report/log/index.php?chooselog=0&group=$selectedgroup&user=$selecteduser"
             ."&id=$course->id&date=$selecteddate&modid=$selectedactivity&showusers=1&showcourses=$showcourses";
         print_string('logtoomanyusers','moodle',$a);
     }
 
-    echo $OUTPUT->select(html_select::make($dates, "date", $selecteddate, get_string("alldays")));
-
-    $select = html_select::make($activities, "modid", $selectedactivity);
-    $select->nothinglabel = get_string("allactivities");
-    $select->nothingvalue = '';
-    echo $OUTPUT->select($select);
-
-    echo $OUTPUT->select(html_select::make($actions, 'modaction', $modaction, get_string("allactions")));
+    echo html_writer::input_select($dates, "date", $selecteddate, get_string("alldays"));
+    echo html_writer::input_select($activities, "modid", $selectedactivity, get_string("allactivities"));
+    echo html_writer::input_select($actions, 'modaction', $modaction, get_string("allactions"));
 
     $logformats = array('showashtml' => get_string('displayonpage'),
                         'downloadascsv' => get_string('downloadtext'),
                         'downloadasods' => get_string('downloadods'),
                         'downloadasexcel' => get_string('downloadexcel'));
-    echo $OUTPUT->select(html_select::make($logformats, 'logformat', $logformat, false));
+    echo html_writer::input_select($logformats, 'logformat', $logformat, false);
     echo '<input type="submit" value="'.get_string('gettheselogs').'" />';
     echo '</div>';
     echo '</form>';
@@ -485,12 +480,12 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate='today'
     echo "<input type=\"hidden\" name=\"showusers\" value=\"$showusers\" />\n";
     echo "<input type=\"hidden\" name=\"showcourses\" value=\"$showcourses\" />\n";
     if (has_capability('coursereport/log:view', $sitecontext) && $showcourses) {
-        echo $OUTPUT->select(html_select::make($courses, "id", $course->id, false));
+        echo html_writer::input_select($courses, "id", $course->id, false);
     } else {
         //        echo '<input type="hidden" name="id" value="'.$course->id.'" />';
         $courses = array();
         $courses[$course->id] = $course->fullname . (($course->id == SITEID) ? ' ('.get_string('site').') ' : '');
-        echo $OUTPUT->select(html_select::make($courses,"id",$course->id, false));
+        echo html_writer::input_select($courses,"id",$course->id, false);
         if (has_capability('coursereport/log:view', $sitecontext)) {
             $a = new object();
             $a->url = "$CFG->wwwroot/course/report/log/index.php?chooselog=0&group=$selectedgroup&user=$selecteduser"
@@ -508,11 +503,11 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate='today'
         else {
             $groups = array();
         }
-        echo $OUTPUT->select(html_select::make($groups, "group", $selectedgroup, get_string("allgroups")));
+        echo html_writer::input_select($groups, "group", $selectedgroup, get_string("allgroups"));
     }
 
     if ($showusers) {
-        echo $OUTPUT->select(html_select::make($users, "user", $selecteduser, get_string("allparticipants")));
+        echo html_writer::input_select($users, "user", $selecteduser, get_string("allparticipants"));
     }
     else {
         $users = array();
@@ -523,27 +518,23 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate='today'
         else {
             $users[0] = get_string('allparticipants');
         }
-        echo $OUTPUT->select(html_select::make($users, "user", $selecteduser, false));
+        echo html_writer::input_select($users, "user", $selecteduser, false);
         $a = new object();
         $a->url = "$CFG->wwwroot/course/report/log/index.php?chooselog=0&group=$selectedgroup&user=$selecteduser"
             ."&id=$course->id&date=$selecteddate&modid=$selectedactivity&showusers=1&showcourses=$showcourses";
         print_string('logtoomanyusers','moodle',$a);
     }
-    echo $OUTPUT->select(html_select::make($dates, "date", $selecteddate, get_string("alldays")));
-
-    $select = html_select::make($activities, "modid", $selectedactivity);
-    $select->nothinglabel = get_string("allactivities");
-    $select->nothingvalue = '';
-    echo $OUTPUT->select($select);
+    echo html_writer::input_select($dates, "date", $selecteddate, get_string("alldays"));
 
-    echo $OUTPUT->select(html_select::make($actions, 'modaction', $modaction, get_string("allactions")));
+    echo html_writer::input_select($activities, "modid", $selectedactivity, get_string("allactivities"));
+    echo html_writer::input_select($actions, 'modaction', $modaction, get_string("allactions"));
 
     $logformats = array('showashtml' => get_string('displayonpage'),
                         'downloadascsv' => get_string('downloadtext'),
                         'downloadasods' => get_string('downloadods'),
                         'downloadasexcel' => get_string('downloadexcel'));
 
-    echo $OUTPUT->select(html_select::make($logformats, 'logformat', $logformat, false));
+    echo html_writer::input_select($logformats, 'logformat', $logformat, false);
     echo '<input type="submit" value="'.get_string('gettheselogs').'" />';
     echo '</div>';
     echo '</form>';
index d3060c2..8987ce8 100644 (file)
     $select->nested = true;
     echo $OUTPUT->select($select);
     echo '<label for="menutimefrom">'.get_string('lookback').'</label>'."\n";
-    echo $OUTPUT->select(html_select::make($timeoptions,'timefrom',$timefrom));
+    echo html_writer::input_select($timeoptions,'timefrom',$timefrom);
     echo '<label for="menuroleid">'.get_string('showonly').'</label>'."\n";
-    echo $OUTPUT->select(html_select::make($roleoptions,'roleid',$roleid,false));
+    echo html_writer::input_select($roleoptions,'roleid',$roleid,false);
     echo '<label for="menuaction">'.get_string('showactions').'</label>'."\n";
-    echo $OUTPUT->select(html_select::make($actionoptions,'action',$action,false));
+    echo html_writer::input_select($actionoptions,'action',$action,false);
     echo $OUTPUT->help_icon('participationreport', get_string('participationreport'));
     echo '<input type="submit" value="'.get_string('go').'" />'."\n</div></form>\n";
 
index 4be01a4..1eeee58 100644 (file)
         }
 
         $table->align = array('left','left','left','left','left','left','left','left');
-        $table->data[] = array(get_string('course'),$OUTPUT->select(html_select::make($courseoptions,'course',$course->id,false)),
-                               get_string('users'),$OUTPUT->select(html_select::make($users,'userid',$userid,false)),
-                               get_string('statsreporttype'),$OUTPUT->select(html_select::make($reportoptions,'report',($report == 5) ? $report.$roleid : $report,false)),
-                               get_string('statstimeperiod'),$OUTPUT->select(html_select::make($timeoptions,'time',$time,false)),
+        $table->data[] = array(get_string('course'),html_writer::input_select($courseoptions,'course',$course->id,false),
+                               get_string('users'),html_writer::input_select($users,'userid',$userid,false),
+                               get_string('statsreporttype'),html_writer::input_select($reportoptions,'report',($report == 5) ? $report.$roleid : $report,false),
+                               get_string('statstimeperiod'),html_writer::input_select($timeoptions,'time',$time,false),
                                '<input type="submit" value="'.get_string('view').'" />') ;
     } else if ($mode == STATS_MODE_RANKED) {
         $table->align = array('left','left','left','left','left','left');
-        $table->data[] = array(get_string('statsreporttype'),$OUTPUT->select(html_select::make($reportoptions,'report',($report == 5) ? $report.$roleid : $report,false)),
-                               get_string('statstimeperiod'),$OUTPUT->select(html_select::make($timeoptions,'time',$time,false)),
+        $table->data[] = array(get_string('statsreporttype'),html_writer::input_select($reportoptions,'report',($report == 5) ? $report.$roleid : $report,false),
+                               get_string('statstimeperiod'),html_writer::input_select($timeoptions,'time',$time,false),
                                '<input type="submit" value="'.get_string('view').'" />') ;
     } else if ($mode == STATS_MODE_GENERAL) {
         $table->align = array('left','left','left','left','left','left','left');
-        $table->data[] = array(get_string('course'),$OUTPUT->select(html_select::make($courseoptions,'course',$course->id,false)),
-                               get_string('statsreporttype'),$OUTPUT->select(html_select::make($reportoptions,'report',($report == 5) ? $report.$roleid : $report,false)),
-                               get_string('statstimeperiod'),$OUTPUT->select(html_select::make($timeoptions,'time',$time,false)),
+        $table->data[] = array(get_string('course'),html_writer::input_select($courseoptions,'course',$course->id,false),
+                               get_string('statsreporttype'),html_writer::input_select($reportoptions,'report',($report == 5) ? $report.$roleid : $report,false),
+                               get_string('statstimeperiod'),html_writer::input_select($timeoptions,'time',$time,false),
                                '<input type="submit" value="'.get_string('view').'" />') ;
     }
 
index a7d4466..650bd50 100755 (executable)
@@ -65,9 +65,7 @@ if (!isset($frm->acceptechecktypes)) {
 <tr valign="top">
     <td align="right">enrol_currency:</td>
     <td><?php
-        $select = html_select::make(get_list_of_currencies(), "enrol_currency", $frm->enrol_currency, false);
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select(get_list_of_currencies(), "enrol_currency", $frm->enrol_currency, false);
         ?>
         <br />
         <?php print_string("currency") ?>
@@ -214,9 +212,7 @@ if (!isset($frm->acceptechecktypes)) {
     <td><?php
     $sorts = array('ttl' => get_string('adminemailexpiredsortsum', 'enrol_authorize'),
                    'cnt' => get_string('adminemailexpiredsortcount', 'enrol_authorize'));
-    $select = html_select::make($sorts, "an_sorttype", $frm->an_sorttype, false);
-    $select->nothingvalue = '';
-    echo $OUTPUT->select($select);
+    echo html_writer::input_select($sorts, "an_sorttype", $frm->an_sorttype, false);
     ?>
     <br />
     <?php print_string("adminemailexpiredsort", "enrol_authorize") ?></td>
index 10dd33e..0095bc7 100644 (file)
@@ -27,9 +27,7 @@ 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>";
-    $select = html_select::make($searchmenu, 'searchtype', $searchtype, false);
-    $select->nothingvalue = '';
-    $buttons .= $OUTPUT->select($select);
+    $buttons .= html_writer::input_select($searchmenu, 'searchtype', $searchtype, false);
     $buttons .= "<input type='text' size='16' name='searchquery' value='' />";
     $buttons .= "<input type='submit' value='$strs->search' />";
     $buttons .= "</div></form>";
index aa838dd..e67c233 100644 (file)
@@ -19,9 +19,7 @@
        if (!isset($frm->enrol_dbtype)) {
            $frm->enrol_dbtype = 'mysql';
        }
-       $select = html_select::make($dboptions, "enrol_dbtype", $frm->enrol_dbtype, false);
-       $select->nothingvalue = '';
-       echo $OUTPUT->select($select);
+       echo html_writer::input_select($dboptions, "enrol_dbtype", $frm->enrol_dbtype, false);
     ?>
 
     </td>
         $assignableroles = get_assignable_roles($sitecontext);
         $assignableroles = array('' => get_string('default')) + $assignableroles;
 
-        echo $OUTPUT->select(html_select::make($assignableroles, 'enrol_db_defaultcourseroleid', $frm->enrol_db_defaultcourseroleid, false));
+        echo html_writer::input_select($assignableroles, 'enrol_db_defaultcourseroleid', $frm->enrol_db_defaultcourseroleid, false);
         if (isset($err['enrol_db_defaultcourseroleid'])) echo $OUTPUT->error_text($err['enrol_db_defaultcourseroleid']);
     ?>
     </td>
     <td align="right">enrol_db_autocreate:</td>
     <td>
     <?php
-       echo $OUTPUT->select(html_select::make($yesno, "enrol_db_autocreate", $frm->enrol_db_autocreate, false));
+       echo html_writer::input_select($yesno, "enrol_db_autocreate", $frm->enrol_db_autocreate, false);
            if (isset($err["enrol_db_autocreate"])) echo $OUTPUT->error_text($err["enrol_db_autocreate"]);
     ?>
     </td>
            $displaylist = array();
            $parentlist = array();
            make_categories_list($displaylist, $parentlist);
-           echo $OUTPUT->select(html_select::make($displaylist, "enrol_db_category", $frm->enrol_db_category, false));
+           echo html_writer::input_select($displaylist, "enrol_db_category", $frm->enrol_db_category, false);
 
     ?>
     <?php  if (isset($err["enrol_db_category"])) echo $OUTPUT->error_text($err["enrol_db_category"]); ?>
     <td align="right">enrol_db_ignorehiddencourse:</td>
     <td>
     <?php
-        echo $OUTPUT->select(html_select::make($yesno, "enrol_db_ignorehiddencourse", $frm->enrol_db_ignorehiddencourse, false));
+        echo html_writer::input_select($yesno, "enrol_db_ignorehiddencourse", $frm->enrol_db_ignorehiddencourse, false);
         if (isset($err['enrol_db_ignorehiddencourse'])) {
             echo $OUTPUT->error_text($err['enrol_db_ignorehiddencourse']);
         }
     <td align="right">enrol_db_disableunenrol:</td>
     <td>
     <?php
-        echo $OUTPUT->select(html_select::make($yesno, "enrol_db_disableunenrol", $frm->enrol_db_disableunenrol, false));
+        echo html_writer::input_select($yesno, "enrol_db_disableunenrol", $frm->enrol_db_disableunenrol, false);
         if (isset($err['enrol_db_disableunenrol'])) {
             echo $OUTPUT->error_text($err['enrol_db_disableunenrol']);
         }
index 40275ba..374131e 100644 (file)
@@ -117,8 +117,8 @@ foreach($this->imsroles as $imsrolenum=>$imsrolename){
 
         $configref = "enrol_imse_imsrolemap" . $imsrolenum;
 
-        echo $OUTPUT->select(html_select::make($assignableroles, 'enrol_imse_imsrolemap'.$imsrolenum,
-           strlen($frm->$configref) ? $frm->$configref : $this->determine_default_rolemapping($imsrolenum), false));
+        echo html_writer::input_select($assignableroles, 'enrol_imse_imsrolemap'.$imsrolenum,
+           strlen($frm->$configref) ? $frm->$configref : $this->determine_default_rolemapping($imsrolenum), false);
     ?>
     </td>
     <td>
index 0dc6392..87734a0 100755 (executable)
@@ -108,7 +108,7 @@ if (!isset($frm->enrol_ldap_template)) {
     <?php
        $versions[2] = "2";
        $versions[3] = "3";
-       echo $OUTPUT->select(html_select::make($versions, "enrol_ldap_version", $frm->enrol_ldap_version, false));
+       echo html_writer::input_select($versions, "enrol_ldap_version", $frm->enrol_ldap_version, false);
         if (isset($err["enrol_ldap_version"])) echo $OUTPUT->error_text($err["enrol_ldap_version"]);
     ?>
     </td>
@@ -351,7 +351,7 @@ if (!isset($frm->enrol_ldap_template)) {
     <td align="right">enrol_ldap_autocreate:</td>
     <td>
     <?php
-       echo $OUTPUT->select(html_select::make(array('0'=>'no','1'=>'yes'), "enrol_ldap_autocreate", $frm->enrol_ldap_autocreate, false));
+       echo html_writer::input_select('0'=>'no','1'=>'yes'), "enrol_ldap_autocreate", $frm->enrol_ldap_autocreate, false);
            if (isset($err["enrol_ldap_autocreate"])) echo $OUTPUT->error_text($err["enrol_ldap_autocreate"]);
     ?>
     </td>
@@ -366,7 +366,7 @@ if (!isset($frm->enrol_ldap_template)) {
            $displaylist = array();
            $parentlist = array();
            make_categories_list($displaylist, $parentlist);
-           echo $OUTPUT->select(html_select::make($displaylist, "enrol_ldap_category", $frm->enrol_ldap_category, false));
+           echo html_writer::input_select($displaylist, "enrol_ldap_category", $frm->enrol_ldap_category, false);
 
     ?>
     <?php  if (isset($err["enrol_ldap_category"])) echo $OUTPUT->error_text($err["enrol_ldap_category"]); ?>
index d116442..2c96ef6 100644 (file)
@@ -9,7 +9,7 @@
         foreach ($roles as $id=>$role) {
             $rolenames[$id]=$role->name;
         }
-        echo $OUTPUT->select(html_select::make($rolenames, 'enrol_manual_keyholderrole', $frm->enrol_manual_keyholderrole));
+        echo html_writer::input_select($rolenames, 'enrol_manual_keyholderrole', $frm->enrol_manual_keyholderrole);
     ?>
     </td>
     <td>
@@ -24,7 +24,7 @@
     $choices = array();
     $choices['0'] = get_string('no');
     $choices['1'] = get_string('yes');
-    echo $OUTPUT->select(html_select::make($choices, 'enrol_manual_showhint', $frm->enrol_manual_showhint, false));
+    echo html_writer::input_select($choices, 'enrol_manual_showhint', $frm->enrol_manual_showhint, false);
 ?>
     </td><td>
     <?php  print_string('enrol_manual_showhint', 'enrol_manual') ?>
@@ -38,7 +38,7 @@
     $choices = array();
     $choices['0'] = get_string('no');
     $choices['1'] = get_string('yes');
-    echo $OUTPUT->select(html_select::make($choices, 'enrol_manual_usepasswordpolicy', $frm->enrol_manual_usepasswordpolicy, false));
+    echo html_writer::input_select($choices, 'enrol_manual_usepasswordpolicy', $frm->enrol_manual_usepasswordpolicy, false);
 ?>
     </td><td>
     <?php  print_string('enrol_manual_usepasswordpolicy', 'enrol_manual') ?>
@@ -52,7 +52,7 @@
     $choices = array();
     $choices['0'] = get_string('no');
     $choices['1'] = get_string('yes');
-    echo $OUTPUT->select(html_select::make($choices, 'enrol_manual_requirekey', $frm->enrol_manual_requirekey, false));
+    echo html_writer::input_select($choices, 'enrol_manual_requirekey', $frm->enrol_manual_requirekey, false);
 ?>
     </td><td>
     <?php  print_string('enrol_manual_requirekey', 'enrol_manual') ?>
index aca9a54..4debfdf 100644 (file)
@@ -15,9 +15,7 @@
     <td>
     <?php
         global $OUTPUT;
-        $select = html_select::make($paypalcurrencies, "enrol_currency", $frm->enrol_currency, false);
-        $select->nothingvalue = '';
-        echo $OUTPUT->select($select);
+        echo html_writer::input_select($paypalcurrencies, "enrol_currency", $frm->enrol_currency, false);
     ?>
     </td>
     <td>
index e134881..900cbe7 100644 (file)
@@ -179,9 +179,7 @@ if (empty($availablefilters)) {
         } else {
             $activechoices[TEXTFILTER_INHERIT] = $strdefaultoff;
         }
-        $select = html_select::make($activechoices, str_replace('/', '_', $filter), $filterinfo->localstate, false);
-        $select->nothingvalue = '';
-        $row[] = $OUTPUT->select($select);
+        $row[] = html_writer::input_select($activechoices, str_replace('/', '_', $filter), $filterinfo->localstate, false);
 
         // Settings link, if required
         if ($settingscol) {
index 107802f..17566ba 100644 (file)
@@ -442,7 +442,7 @@ class html_writer {
         $attributes = (array)$attributes;
         if (is_array($nothing)) {
             foreach ($nothing as $k=>$v) {
-                if ($v === 'choose') {
+                if ($v === 'choose' or $v === 'choosedots') {
                     $nothing[$k] = get_string('choosedots');
                 }
             }
index 938bb4b..0bfa0a6 100644 (file)
@@ -917,9 +917,7 @@ class flexible_table {
             $html = '<form action="'. $this->baseurl .'" method="post">';
             $html .= '<div class="mdl-align">';
             $html .= '<input type="submit" value="'.get_string('downloadas', 'table').'"/>';
-            $select = html_select::make($downloadoptions, 'download', $this->defaultdownloadformat, false);
-            $select->nothingvalue = '';
-            $html .= $OUTPUT->select($select);
+            $html .= html_writer::input_select($downloadoptions, 'download', $this->defaultdownloadformat, false);
             $html .= $OUTPUT->help_icon('tableexportformats', get_string('tableexportformats', 'table'));
             $html .= '</div></form>';
 
index 56720c3..dbd87d9 100644 (file)
@@ -2420,7 +2420,7 @@ function print_grade_menu($courseid, $name, $current, $includenograde=true, $ret
     for ($i=100; $i>=1; $i--) {
         $grades[$i] = $i;
     }
-    $output .= $OUTPUT->select(html_select::make($grades, $name, $current, false));
+    $output .= html_writer::input_select($grades, $name, $current, false);
 
     $linkobject = '<span class="helplink"><img class="iconhelp" alt="'.$strscales.'" src="'.$OUTPUT->pix_url('help') . '" /></span>';
     $link = html_link::make('/course/scales.php?id='. $courseid .'&list=true', $linkobject);
index 1da4e1d..c0f4bc1 100644 (file)
@@ -254,10 +254,9 @@ function message_print_settings() {
     $cbemailmessages = (get_user_preferences('message_emailmessages', 1) == '1') ? 'checked="checked"' : '';
     $txemailaddress = get_user_preferences('message_emailaddress', $USER->email);
     $txemailtimenosee = get_user_preferences('message_emailtimenosee', 10);
-    $format_select = $OUTPUT->select(html_select::make( array(FORMAT_PLAIN => get_string('formatplain'),
-                                             FORMAT_HTML  => get_string('formathtml')),
-                                       'emailformat',
-                                       get_user_preferences('message_emailformat', FORMAT_PLAIN)));
+    $format_select = html_writer::input_select(array(FORMAT_PLAIN => get_string('formatplain'),
+                                                     FORMAT_HTML  => get_string('formathtml')),
+                                              'emailformat', get_user_preferences('message_emailformat', FORMAT_PLAIN));
 
     include('settings.html');
 }
index 962b43a..861a0ea 100755 (executable)
@@ -350,7 +350,7 @@ if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) {          ///
 
     $options = array(0 => get_string('ascending', 'data'),
                      1 => get_string('descending', 'data'));
-    echo $OUTPUT->select(html_select::make($options, 'defaultsortdir', $data->defaultsortdir, false));
+    echo html_writer::input_select($options, 'defaultsortdir', $data->defaultsortdir, false);
     echo '<input type="submit" value="'.get_string('save', 'data').'" />';
     echo '</div>';
     echo '</form>';
index 7b8dbe8..7f31e7b 100755 (executable)
             <?php
                 $course->maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course));
                 $choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
-                $select = html_select::make($choices, 'param3', $this->field->param3, false);
-                $select->id = 'param3';
-
-                echo $OUTPUT->select($select);
+                echo html_writer::input_select($choices, 'param3', $this->field->param3, false, array('id' => 'param3'));
             ?>
         </td>
     </tr>
index 1de8546..8ac9b93 100755 (executable)
@@ -77,7 +77,7 @@ class data_field_latlong extends data_field_base {
                 $options[$temp.','.$longs[$key]] = $temp.','.$longs[$key];
             }
         }
-       return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $value));
+       return html_writer::input_select($options, 'f_'.$this->field->id, $value);
     }
 
     function parse_search_field() {
index c4431ce..5ee3318 100755 (executable)
@@ -47,11 +47,7 @@ class data_field_menu extends data_field_base {
         }
 
 
-        $select = html_select::make($options, 'field_'.$this->field->id, $content, get_string('menuchoose', 'data'));
-        $select->nothingvalue = '';
-        $select->id = 'field_'.$this->field->id;
-
-        $str .= $OUTPUT->select($select);
+        $str .= html_writer::input_select($options, 'field_'.$this->field->id, $content, array(''=>get_string('menuchoose', 'data')), array('id'=>'field_'.$this->field->id));
 
         $str .= '</div>';
 
@@ -88,7 +84,7 @@ class data_field_menu extends data_field_base {
             return '';
         }
 
-        return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $content, '&nbsp;'));
+        return html_writer::input_select($options, 'f_'.$this->field->id, $content, array(''=>'&nbsp;'));
     }
 
      function parse_search_field() {
index 6086967..c5c4fe5 100755 (executable)
             <?php
                 $course->maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course));
                 $choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
-                $select = html_select::make($choices, 'param3', $this->field->param3, false);
-                $select->id = 'param3';
-
-                echo $OUTPUT->select($select);
+                echo html_writer::input_select($choices, 'param3', $this->field->param3, false, array('id'=>'param3'));
             ?>
         </td>
     </tr>
index df5dcfb..4d9d25e 100755 (executable)
@@ -72,7 +72,7 @@ class data_field_radiobutton extends data_field_base {
                 $options[$key] = $key;  //Build following indicies from the sql.
             }
         }
-        return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $value));
+        return html_writer::input_select($options, 'f_'.$this->field->id, $value);
     }
 
     function parse_search_field() {
index c402414..5062cf7 100755 (executable)
@@ -1365,10 +1365,8 @@ function data_print_preference_form($data, $perpage, $search, $sort='', $order='
     echo '<label for="pref_perpage">'.get_string('pagesize','data').'</label> ';
     $pagesizes = array(2=>2,3=>3,4=>4,5=>5,6=>6,7=>7,8=>8,9=>9,10=>10,15=>15,
                        20=>20,30=>30,40=>40,50=>50,100=>100,200=>200,300=>300,400=>400,500=>500,1000=>1000);
-    $select = html_select::make($pagesizes, 'perpage', $perpage, false);
-    $select->id = 'pref_perpage';
-    echo $OUTPUT->select($select);
-     echo '<div id="reg_search" style="display: ';
+    echo html_writer::input_select($pagesizes, 'perpage', $perpage, false, array('id'=>'pref_perpage'));
+    echo '<div id="reg_search" style="display: ';
     if ($advanced) {
         echo 'none';
     }
@@ -1663,9 +1661,7 @@ function data_print_rating_menu($recordid, $userid, $scale) {
     if (empty($strrate)) {
         $strrate = get_string("rate", "data");
     }
-    $select = html_select::make($scale, $recordid, $rating->rating, "$strrate...");
-    $select->nothingvalue = -999;
-    echo $OUTPUT->select($select);
+    echo html_writer::input_select($scale, $recordid, $rating->rating, array(-999=>"$strrate..."));
 }
 
 /**
index 5d1e086..23c2135 100644 (file)
@@ -4172,9 +4172,7 @@ function forum_print_rating_menu($postid, $userid, $scale, $myrating=NULL) {
         $strrate = get_string("rate", "forum");
     }
     $scale = array(FORUM_UNSET_POST_RATING => $strrate.'...') + $scale;
-    $select = html_select::make($scale, $postid, $myrating, false);
-    $select->add_class('forumpostratingmenu');
-    echo $OUTPUT->select($select);
+    echo html_writer::input_select($scale, $postid, $myrating, false, array('class'=>'forumpostratingmenu'));
 }
 
 /**
index 2eae58b..ff27206 100644 (file)
@@ -351,7 +351,7 @@ function forum_print_big_search_form($course) {
     echo '<tr>';
     echo '<td class="c0"><label for="menuforumid">'.get_string('searchwhichforums', 'forum').'</label></td>';
     echo '<td class="c1">';
-    echo $OUTPUT->select(html_select::make(forum_menu_list($course), 'forumid', '', get_string('allforums', 'forum')));
+    echo html_writer::input_select(forum_menu_list($course), 'forumid', '', array(''=>get_string('allforums', 'forum')));
     echo '</td>';
     echo '</tr>';
 
index b4e7fe5..b7bc97f 100644 (file)
@@ -2267,10 +2267,7 @@ function glossary_print_rating_menu($entryid, $userid, $scale) {
     if (empty($strrate)) {
         $strrate = get_string("rate", "glossary");
     }
-    $select = html_select::make($scale, $entryid, $rating->rating, "$strrate...");
-    $select->nothingvalue = '-999';
-
-    echo $OUTPUT->select($select);
+    echo html_writer::input_select($scale, $entryid, $rating->rating, array('-999'=>"$strrate..."));
 }
 
 /**
index 9bdaf74..c8f6665 100644 (file)
@@ -552,7 +552,7 @@ function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {
     print '</td><th align="right" scope="col">'.get_string('reportcontent', 'hotpot').':</th><td colspan="7">';
     foreach ($menus as $name => $options) {
         $value = $formdata[$name];
-        print $OUTPUT->select(html_select::make($options, $name, $value, false));
+        print html_writer::input_select($options, $name, $value, false);
     };
     print '<input type="submit" value="'.get_string('reportbutton', 'hotpot').'" /></td></tr>';
 
@@ -591,7 +591,7 @@ function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {
     print '</td>';
     foreach ($menus as $name => $options) {
         $value = $formdata[$name];
-        print '<th align="right" scope="col">'.get_string($name, 'hotpot').':</th><td>'.$OUTPUT->select(html_select::make($options, $name, $value, false)).'</td>';
+        print '<th align="right" scope="col">'.get_string($name, 'hotpot').':</th><td>'.html_writer::input_select($options, $name, $value, false).'</td>';
     }
     print '</tr>';
 
index 0f58b88..69abffb 100644 (file)
@@ -418,9 +418,7 @@ class quiz_statistics_report extends quiz_default_report {
             $quizinformationtablehtml .= '<div class="mdl-align">';
             $quizinformationtablehtml .= '<input type="hidden" name="everything" value="1"/>';
             $quizinformationtablehtml .= '<input type="submit" value="'.get_string('downloadeverything', 'quiz_statistics').'"/>';
-            $select = html_select::make($downloadoptions, 'download', $this->table->defaultdownloadformat, false);
-            $select->nothingvalue = '';
-            $quizinformationtablehtml .= $OUTPUT->select($select);;
+            $quizinformationtablehtml .= html_writer::input_select($downloadoptions, 'download', $this->table->defaultdownloadformat, false);
             $quizinformationtablehtml .= $OUTPUT->help_icon('tableexportformats', get_string('tableexportformats', 'table'));
             $quizinformationtablehtml .= '</div></form>';
         }
index cc9674f..1be15e5 100644 (file)
@@ -11,7 +11,7 @@
 <input type="hidden" name="wikipage" value="<?php print $wikipage?>" />
 <?php
   $pagelist=wiki_admin_checklinks_list();
-  echo $OUTPUT->select(html_select::make($pagelist, "pagetocheck", $wikipage, false));
+  echo html_writer::input_select($pagelist, "pagetocheck", $wikipage, false);
 ?>
   <input type="submit" name="proceed" value="<?php print get_string("checklinks","wiki"); ?>" />
 </fieldset>
index 0634efe..dc45036 100644 (file)
@@ -109,9 +109,7 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
         '    <TD align="right">'.get_string("exportformats","wiki").":</TD>\n".
         "    <TD>\n";
   if($wiki->htmlmode!=2) {
-      $select = html_select::make($exportformats, "exportformats", $exportformatval, false);
-      $select->nothingvalue = '';
-    $ret.= $OUTPUT->select($select)."\n";
+    $ret.= html_writer::input_select($exportformats, "exportformats", $exportformatval, false)."\n";
   } else {
     $ret.= '<INPUT type="hidden" name="exportformats" value="1" />'.
            get_string("html","wiki");
@@ -135,9 +133,7 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
   if(count($exportdestinations)==1) {
     $ret.='<INPUT type="hidden" name="exportdestinations" value="0" />'.$exportdestinations[0]."\n";
   } else {
-      $select = html_select::make($exportdestinations, "exportdestinations", $exportdestinationsval, false);
-      $select->nothingvalue = '';
-    $ret.= $OUTPUT->select($select)."\n";
+    $ret.= html_writer::input_select($exportdestinations, "exportdestinations", $exportdestinationsval, false)."\n";
   }
   $ret.="    </TD>\n".
       "  </TR>\n".
index b23e2cb..121a532 100644 (file)
@@ -47,7 +47,7 @@ if($err->remark) {
         $operations=array( "lastonly" => get_string("revertlastonly","wiki"),
                            "allsince" => get_string("revertallsince","wiki"),
                            "the" => get_string("revertthe","wiki"));
-        echo $OUTPUT->select(html_select::make($operations, "howtooperate", $form->howtooperate, false));
+        echo html_writer::input_select($operations, "howtooperate", $form->howtooperate, false);
         ?>
     </td>
 </tr>
index 39effd2..b162dd5 100644 (file)
@@ -958,14 +958,11 @@ class question_calculated_qtype extends default_questiontype {
                                                 ? 'decimals'
                                                 : 'significantfigures'), 'quiz', $i);
             }
-            $select1 = html_select::make($lengthoptions, 'calclength[]', $regs[4], false);
-            $select1->nothingvalue = '';
-            $menu1 = $OUTPUT->select($select1);
-
-            $select2 = html_select::make(array('uniform' => get_string('uniform', 'quiz'),
-                                             'loguniform' => get_string('loguniform', 'quiz')), 'calcdistribution[]', $regs[1], false);
-            $select2->nothingvalue = '';
-            $menu2 = $OUTPUT->select($select2);
+            $menu1 = html_writer::input_select($lengthoptions, 'calclength[]', $regs[4], false);
+
+            $menu2 = html_writer::input_select(array('uniform' => get_string('uniform', 'quiz'),
+                                                     'loguniform' => get_string('loguniform', 'quiz')),
+                                               'calcdistribution[]', $regs[1], false);
             return '<input type="submit" onclick="'
                     . "getElementById('addform').regenerateddefid.value='$defid'; return true;"
                     .'" value="'. get_string('generatevalue', 'quiz') . '"/><br/>'
@@ -1400,14 +1397,14 @@ class question_calculated_qtype extends default_questiontype {
                 list($options, $selected) =
                         $this->dataset_options($form, $datasetname);
                 unset($options['0']); // Mandatory...
-                $datasetmenus[$datasetname] = $OUTPUT->select(html_select::make($options, 'dataset[]', $selected, false));
+                $datasetmenus[$datasetname] = html_writer::input_select($options, 'dataset[]', $selected, false);
             }
         }
         foreach ($optionaldatasets as $datasetname) {
             if (!isset($datasetmenus[$datasetname])) {
                 list($options, $selected) =
                         $this->dataset_options($form, $datasetname);
-                $datasetmenus[$datasetname] = $OUTPUT->select(html_select::make($options, 'dataset[]', $selected, false));
+                $datasetmenus[$datasetname] = html_writer::input_select($options, 'dataset[]', $selected, false);
             }
         }
         return $datasetmenus;