Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Deprecated functions in 2.0

From MoodleDocs

popup_form (51)

Old code: popup_form($baseurl, $options, $formid, $selected, $nothing, $help, $helptext, $return, $targetwindow, $selectlabel, $optionsextra, $submitvalue, $disabled, $showbutton); New code: // if $baseurl == 'http://domain.com/index.php?var1=1&var2=' $select = moodle_select::make_popup_form('http://domain.com/index.php?var1=1', 'var2', $options, $formid, $selected); $select->disabled = $disabled; // optional $select->set_label($selectlabel, $select->id); // optional, set to false if no "nothing" option is desired (when $selectlabel == in original call) $select->set_help_icon($help, $helptext); // optional $select->form->button->text = $submitvalue; // optional

echo $OUTPUT->select($select); Notes:

  • The $optionsextra param is not supported. If your code uses it, you should find another way to add extra params to your <option> tags without using this horrible hack which usually includes inline JS or CSS.