NOMDL course recent activity form: fixed group field value if there are no groups in the course

This commit is contained in:
David Mudrak
2010-07-26 21:29:02 +00:00
parent 7a5f4be030
commit 6d16a670e8
+4
View File
@@ -120,6 +120,10 @@ class recent_form extends moodleform {
}
$mform->addElement('select', 'group', get_string('groups'), $options);
$mform->setAdvanced('group');
} else {
$mform->addElement('hidden','group');
$mform->setType('group', PARAM_INT);
$mform->setConstants(array('group'=>0));
}
} else {
$mform->addElement('hidden','group');