-
Bug
-
Resolution: Fixed
-
Minor
-
4.2.6, 4.3
It seems like export_execute.php should be setting up the global USER with all of the standard fields a user might have. This traceback is caused by the availability component trying to access the user's 'email' property. We can't know what any given component might do, but it is reasonable for them to expect a fully initialised global USER.
PHP Notice: Error processing availability data for 'example': Requested user profile field does not exist |
line 303 of /availability/classes/info.php: call to debugging()
|
line 199 of /availability/classes/info.php: call to core_availability\info->warn_about_invalid_availability()
|
line 2352 of /lib/modinfolib.php: call to core_availability\info->is_available()
|
line 2386 of /lib/modinfolib.php: call to cm_info->obtain_dynamic_data()
|
line 1592 of /lib/modinfolib.php: call to cm_info->get_user_visible()
|
line 102 of /filter/activitynames/filter.php: call to cm_info->__get()
|
line 78 of /filter/activitynames/filter.php: call to filter_activitynames->get_activity_list()
|
line 42 of /filter/activitynames/filter.php: call to filter_activitynames->get_cached_activity_list()
|
line 515 of /lib/filterlib.php: call to filter_activitynames->filter()
|
line 188 of /lib/filterlib.php: call to moodle_text_filter->filter_stage_post_clean()
|
line 230 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
|
line 1370 of /lib/weblib.php: call to filter_manager->filter_text()
|
line 246 of /calendar/export_execute.php: call to format_text() in /path/to/moodle/lib/weblib.php on line 3406
|
Steps to reproduce:
- On a fresh course
- Add an assignment activity with a due date and a restriction that checks the user profile email field is equal to test@example.com
- Enrol a non-privileged test user with email address test@example.com and log-in-as
- Note the student is able to see the activity due date in the calendar - expected
- Export the test user's calendar using a link - make sure the filter will include the assignment due date
- Paste the link into a private window (expect .ics file to be downloaded)
- Note the traceback above in the php error log
- Note that the resulting .ics file does not include the assignment due date - we would have expected to see that