I am trying to build a system such that attendance is imported automatically meaning that users only need see some reports- I have a quicklink block that can link to these reports.
In order to hide unnecessary clutter I have tried removing the id of the mdl_course_modules row from sequence in mdl_course_sections; this is effective at totally hiding the main attendance activity from users but is stopping get_all_instances_in_course() from finding it (this is how my quicklink block creates the links).
If I put the module id in the sections sequence, get the block to display, then remove the module id from the sections sequence it will still display afterwards. However if I get the automatic script that is creating the attendance records to create it, run get_all_instances_in_course() then take the id out of the sequence it doesn't work.
At a guess it seems that it is getting cached or saved somewhere but I can't figure it out- I haven't intentionally cached it in my block.
Thanks,
Mike
Hi,
I think this information is cached in 'modinfo' field? (in mdl_course).
Modinfo is refreshed, for example, if you edit settings for any activity. You can also refresh it in code (can't remember the function name but there is one).
--sam
I think this information is cached in 'modinfo' field? (in mdl_course).
Modinfo is refreshed, for example, if you edit settings for any activity. You can also refresh it in code (can't remember the function name but there is one).
--sam