MDL-36614 calendar: Add support for storing the submitted event type

This commit is contained in:
Ankit Agarwal 2012-11-16 13:52:44 +08:00
parent 7133a88d06
commit 35ad5fc6bb
2 changed files with 14 additions and 11 deletions

View file

@ -74,11 +74,10 @@ class calendar_addsubscription_form extends moodleform {
$mform->addHelpButton('pollinterval', 'pollinterval', 'calendar');
$mform->setType('pollinterval', PARAM_INT);
// Eventtype: 0 = user, 1 = global, anything else = course ID.
list($choices, $groups) = calendar_get_eventtype_choices($courseid);
$mform->addElement('select', 'eventtype', get_string('eventkind', 'calendar'), $choices);
$mform->addRule('eventtype', get_string('required'), 'required');
$mform->setType('eventtype', PARAM_INT);
$mform->setType('eventtype', PARAM_ALPHA);
if (!empty($groups) and is_array($groups)) {
$groupoptions = array();