Added setType to form elements for security and to remove the debugging message introduced in Moodle 2.5

This commit is contained in:
Mark Nelson 2013-04-09 13:10:56 +08:00
parent 87b1e9d7f0
commit d6428b89d1
2 changed files with 3 additions and 0 deletions

View file

@ -217,10 +217,12 @@ class mod_customcert_edit_form extends moodleform {
$mform->addHelpButton('orientation_' . $pageid, 'orientation', 'customcert');
$mform->addElement('text', 'width_' . $pageid, get_string('width', 'customcert'));
$mform->setType('width_' . $pageid, PARAM_INT);
$mform->addRule('width_' . $pageid, null, 'required', null, 'client');
$mform->addHelpButton('width_' . $pageid, 'width', 'customcert');
$mform->addElement('text', 'height_' . $pageid, get_string('height', 'customcert'));
$mform->setType('height_' . $pageid, PARAM_INT);
$mform->addRule('height_' . $pageid, null, 'required', null, 'client');
$mform->addHelpButton('height_' . $pageid, 'height', 'customcert');

View file

@ -55,6 +55,7 @@ class mod_customcert_mod_form extends moodleform_mod {
$mform->addElement('header', 'options', get_string('options', 'customcert'));
$mform->addElement('text', 'requiredtime', get_string('coursetimereq', 'customcert'), array('size' => '3'));
$mform->setType('requiredtime', PARAM_INT);
$mform->addHelpButton('requiredtime', 'coursetimereq', 'customcert');
$this->standard_coursemodule_elements();