Skip to content

Commit

Permalink
Merge branch 'MDL-38821_master' of git://github.com/dmonllao/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Apr 2, 2013
2 parents 15c2b2c + 1ad8902 commit 6842ab4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions enrol/cohort/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function definition() {
$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'));
Expand Down
1 change: 1 addition & 0 deletions enrol/manual/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function definition() {
$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')));

Expand Down
7 changes: 6 additions & 1 deletion enrol/paypal/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ function definition() {
$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'));
$mform->addElement('select', 'status', get_string('status', 'enrol_paypal'), $options);
$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();
Expand Down Expand Up @@ -74,7 +76,10 @@ function definition() {
$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')));

Expand All @@ -100,4 +105,4 @@ function validation($data, $files) {

return $errors;
}
}
}
1 change: 1 addition & 0 deletions enrol/self/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function definition() {
$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'));
Expand Down

0 comments on commit 6842ab4

Please sign in to comment.