-
Notifications
You must be signed in to change notification settings - Fork 120
Putting a calendar block in the "Admin only" blocks area triggers an error for student users #870
Comments
And what, pray chance may it be thy version number? |
Sorry, forgot that. Moodle 3.5 with Essential V3.5.0.1. |
Can reproduce, no idea how to fix or why getCalendarMonthData js is being called via an event when there is no calendar on the page and thus no markup containing the calendar (wrapper) with the data for the AJAX call. |
Ok, probably because the block is not 'hidden' with its own settings so expects to be 'displayed' and therefore outputs its JS. |
month_mini.mustache rendered with JS but not the markup. |
Called from calendar_mini.mustache |
moodleblock.class.php ->get_content_for_output -> if ($this->instance->visible) { -> block_calendar_month::get_content() |
Workaround is to hide the calendar block in the hidden block region. |
Not sure I can solve this without removing the functionality. |
I don't think this can be solved, going to probably remove the functionality. |
Have you removed the functionality? I have placed the block calendar in the "hidden from users" region but the blocks are displayed for everybody and I can't reproduce this issue. I think the problem is related with https://tracker.moodle.org/browse/MDL-62775 . I'm having the same problems with my custom theme. |
"Have you removed the functionality?" = no. |
No support required... Thank you. |
Ok, thanks. |
As the title says, I have a site where the calendar block has been placed in the block area labelled "Blocks moved into the area below will only be seen by admins". If you then log in as a student, the following error is generated:
Missing required key in single structure: year
Error code: invalidparameter
Moving the calendar block out of the admin only area or hiding the block stops the error. My guess is that some calendar code is still being sent for student users and that includes an Ajax call which triggers the error.
The text was updated successfully, but these errors were encountered: