Merge branch 'MDL-38821_master' of git://github.com/dmonllao/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 2 Apr 2013 11:54:46 +0000 (19:54 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 2 Apr 2013 11:54:46 +0000 (19:54 +0800)
enrol/cohort/edit_form.php
enrol/manual/edit_form.php
enrol/paypal/edit_form.php
enrol/self/edit_form.php

index 006e79c..7f3011f 100644 (file)
@@ -47,6 +47,7 @@ class enrol_cohort_edit_form extends moodleform {
         $mform->addElement('header','general', get_string('pluginname', 'enrol_cohort'));
 
         $mform->addElement('text', 'name', get_string('custominstancename', 'enrol'));
+        $mform->setType('name', PARAM_TEXT);
 
         $options = array(ENROL_INSTANCE_ENABLED  => get_string('yes'),
                          ENROL_INSTANCE_DISABLED => get_string('no'));
index d148078..834aee7 100644 (file)
@@ -63,6 +63,7 @@ class enrol_manual_edit_form extends moodleform {
         $mform->disabledIf('expirythreshold', 'expirynotify', 'eq', 0);
 
         $mform->addElement('hidden', 'courseid');
+        $mform->setType('courseid', PARAM_INT);
 
         $this->add_action_buttons(true, ($instance->id ? null : get_string('addinstance', 'enrol')));
 
index 50c1646..2b9cc2f 100644 (file)
@@ -39,6 +39,7 @@ class enrol_paypal_edit_form extends moodleform {
         $mform->addElement('header', 'header', get_string('pluginname', 'enrol_paypal'));
 
         $mform->addElement('text', 'name', get_string('custominstancename', 'enrol'));
+        $mform->setType('name', PARAM_TEXT);
 
         $options = array(ENROL_INSTANCE_ENABLED  => get_string('yes'),
                          ENROL_INSTANCE_DISABLED => get_string('no'));
@@ -46,6 +47,7 @@ class enrol_paypal_edit_form extends moodleform {
         $mform->setDefault('status', $plugin->get_config('status'));
 
         $mform->addElement('text', 'cost', get_string('cost', 'enrol_paypal'), array('size'=>4));
+        $mform->setType('cost', PARAM_TEXT);
         $mform->setDefault('cost', $plugin->get_config('cost'));
 
         $paypalcurrencies = $plugin->get_currencies();
@@ -74,7 +76,10 @@ class enrol_paypal_edit_form extends moodleform {
         $mform->addHelpButton('enrolenddate', 'enrolenddate', 'enrol_paypal');
 
         $mform->addElement('hidden', 'id');
+        $mform->setType('id', PARAM_INT);
+
         $mform->addElement('hidden', 'courseid');
+        $mform->setType('courseid', PARAM_INT);
 
         $this->add_action_buttons(true, ($instance->id ? null : get_string('addinstance', 'enrol')));
 
@@ -100,4 +105,4 @@ class enrol_paypal_edit_form extends moodleform {
 
         return $errors;
     }
-}
\ No newline at end of file
+}
index 04bc13d..dc324f2 100644 (file)
@@ -39,6 +39,7 @@ class enrol_self_edit_form extends moodleform {
         $mform->addElement('header', 'header', get_string('pluginname', 'enrol_self'));
 
         $mform->addElement('text', 'name', get_string('custominstancename', 'enrol'));
+        $mform->setType('name', PARAM_TEXT);
 
         $options = array(ENROL_INSTANCE_ENABLED  => get_string('yes'),
                          ENROL_INSTANCE_DISABLED => get_string('no'));