Skip to content

Commit

Permalink
MDL-36778 course - prevent undefined index warnings
Browse files Browse the repository at this point in the history
When logged in as a guest the mform didn't set userid.
  • Loading branch information
danpoltawski committed Nov 30, 2012
1 parent e4592b2 commit 0e19f8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions course/recent_form.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ function definition() {


$mform->addElement('select', 'user', get_string('participants'), $options); $mform->addElement('select', 'user', get_string('participants'), $options);
$mform->setAdvanced('user'); $mform->setAdvanced('user');
} else {
// Default to no user.
$mform->addElement('hidden', 'user', 0);
} }


$options = array(''=>get_string('allactivities')); $options = array(''=>get_string('allactivities'));
Expand Down

0 comments on commit 0e19f8e

Please sign in to comment.