Permalink
Browse files

MDL-36778 course - prevent undefined index warnings

When logged in as a guest the mform didn't set userid.
  • Loading branch information...
danpoltawski committed Nov 30, 2012
1 parent f42c34a commit 7b48acebaf424e2d394666a4eaac6bc132ae7b63
Showing with 3 additions and 0 deletions.
  1. +3 −0 course/recent_form.php
View
@@ -98,6 +98,9 @@ function definition() {
$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'));

0 comments on commit 7b48ace

Please sign in to comment.