Skip to content

Commit

Permalink
MDL-66008 core_calendar: fix behat failures
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Aug 13, 2019
1 parent 1946261 commit 4d98566
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions calendar/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3482,6 +3482,9 @@ function calendar_output_fragment_event_form($args) {
if ($starttime) {
$formoptions['starttime'] = $starttime;
}
// Let's check first which event types user can add.
$eventtypes = calendar_get_allowed_event_types($courseid);
$formoptions['eventtypes'] = $eventtypes;

if (is_null($eventid)) {
if (!empty($courseid)) {
Expand All @@ -3492,9 +3495,6 @@ function calendar_output_fragment_event_form($args) {
}
}

// Let's check first which event types user can add.
$eventtypes = calendar_get_allowed_event_types($courseid);
$formoptions['eventtypes'] = $eventtypes;
$mform = new \core_calendar\local\event\forms\create(
null,
$formoptions,
Expand Down

0 comments on commit 4d98566

Please sign in to comment.