MDL-36778 course - prevent undefined index warnings

When logged in as a guest the mform didn't set userid.
This commit is contained in:
Dan Poltawski
2012-12-10 11:51:57 +13:00
committed by Sam Hemelryk
parent 0e7cadca03
commit 38ab68e6ab
+3
View File
@@ -98,6 +98,9 @@ class recent_form extends moodleform {
$mform->addElement('select', 'user', get_string('participants'), $options);
$mform->setAdvanced('user');
} else {
// Default to no user.
$mform->addElement('hidden', 'user', 0);
}
$options = array(''=>get_string('allactivities'));