MDL-36778 course - prevent undefined index warnings
When logged in as a guest the mform didn't set userid.
This commit is contained in:
@@ -99,6 +99,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'));
|
||||
|
||||
Reference in New Issue
Block a user