General developer forum

Calendar, Facetoface - Global Events do not display, Course Events do

 
Picture of Rob Galpin
Calendar, Facetoface - Global Events do not display, Course Events do
 

ISSUE:
Global events created in a Facetoface plugin are NOT displaying in the calendar, Course events ARE displaying. This worked before we upgraded to Moodle 3.3.

Using an old version of Facetoface plugin (2.2.3.1) to register users to sessions, plugin has been  customized to the point where upgrading it will require a lot of development and testing - trying to avoid that. Again, the calendar worked fine until we upgraded to Moodle 3.3. We have upgraded Moodle from a much older version of Moodle: 2.x.

Facetoface session has a CALENDAR OPTIONS field. 

When we set a session CALENDAR DISPLAY SETTINGS to: COURSE, the all the dates for that session appear on the calendar as designed.

If we set CALENDAR DISPLAY SETTINGS for the session to: SITE, which is the same as GLOBAL (green highlight box) the dates do not appear on the calendar.

Facetoface uses a data item referenced as $Facetoface->showoncalendar to identify a session calendar setting as either: SITE or COURSE or NONE.

Since the calendar handles the setting of COURSE correctly, I am looking for where the calendar is failing to handle the setting of SITE/GLOBAL (green highlight on display) for a session correctly.

Any ideas on why this is happening or where to look would be a great help! 

Thank you!


 
Average of ratings: -
Picture of Rob Galpin
Re: Calendar, Facetoface - Global Events do not display, Course Events do
 

How does the calendar use the event record to determine GLOBAL or COURSE calendar setting for the event / date / session?

 
Average of ratings: -
Picture of Rob Galpin
Re: Calendar, Facetoface - Global Events do not display, Course Events do
 

It looks like the event value that is set differently when SITE is selected is the $event->courseid. When this is set to the Facetoface id the date is displayed correctly with a pink hilite. 

When $event->courseid is set to SITEID (value of 1) as is the case when SITE is selected, the calendar does NOT react correctly by displaying with the green hilite. It used to in our earlier version of Moodle. 

Is the new calendar API looking for a different value now? Or is it looking at a different event property to determine the hilite?


 
Average of ratings: -
Picture of Rob Galpin
Re: Calendar, Facetoface - Global Events do not display, Course Events do
 

Changing $newevent->modulename='facetoface';

TO:

$newevent->modulename = 0;

Gets the calendar to display these dates as GLOBAL/ SITE. I don't know why. But it also makes the calendar display 2 instances on mouseover.

Does anyone have knowledge of the calendar API that could lend some direction as to what is going on? 

Probably some holes in my understanding of the Calendar API - any direction would be appreciated.

 
Average of ratings: -