Course overview block does not update immediately

Course overview block does not update immediately

by T K -
Number of replies: 2

Hi All,

We have this Moodle 3.4 that is integrated with client's student page. Students access the Moodle page from  the student portal, we have this SSO login script that does the student login authentication.

We noticed that upon login into the Moodle page by the student, the course overview page does not refresh immediately.  It takes up to 1 minute to update:


course overview


After 1 minute:


course overview2


We have the cronjob running on the moodle site, but probably because the SSO login is done from external site, I tried to run the cron from the SSO login script with the following line:

shell_exec ("/usr/bin/php  /var/www/html/moodle/lms/admin/cli/cron.php >/dev/null")


However this method still does not work. The course overview still takes 1 minute to update on the screen.


Can someone pls guide me what am i missing here?


Thanks.


Average of ratings: -
In reply to T K

Re: Course overview block does not update immediately

by Benjamin Ellis -
Picture of Particularly helpful Moodlers
Hi,

Suggests the block is being updated by the cron ( I assume it runs every minute???) and your SSO call will maybe jump the relevant task. Calling the whole cron for every login is seriously a bad idea - the cron runs for all the users and so could place a large load on the server. Additionally, it maybe that some caching is involved to reduce the number of DB calls. You need to look at the code to find out where the time lag is happening.
In reply to Benjamin Ellis

Re: Course overview block does not update immediately

by T K -
Thanks, i will look into this