Restrict access to courses during a period of hours on a day

Restrict access to courses during a period of hours on a day

by Adolfo Franco -
Number of replies: 3

Hello. Currently I'm working for a school which have some server performance issues, like narrow bandwith, etc. Unfortunately, those problems cannot be solved in the short term. Meawhile we're looking for a solution to mitigate the server stress, specially during students' tests.

I wonder if there is a way to automatically restrict students access to courses like this:

A  - some courses can only be accessed by students in the mornings (from 6am to noon) on weekdays

B - some courses can only be accessed by students in the afternoons (from noon to 6pm) on weekdays

C - all courses can be accessed by students from 6pm to 6am on weekdays

D - all courses can be accessed by students  on weekend

I'm aware of the restrict access feature that Moodle provides for topics and activities in general and I do know how to use it, but I don't believe it is a practical solution for that specific scenario.

As I  said, that could help minimize server performance issues by reducing the number of active students on courses unnecessarily, because some courses are really expected to be accessed by students only in the mornings and other courses only in the afternoons.

Any suggestions are apreciated smile

Average of ratings: -
In reply to Adolfo Franco

Re: Restrict access to courses during a period of hours on a day

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Just accessing a course really is not going to put any more stress on the server than logging into the site in the first place - it is the interaction with activities, specifically quizzes that is going to stress your server. I would set up groups within your courses and restrict activities based on those groups - group A can only access activities in the morning, group B in the afternoon for example.
Average of ratings: Useful (2)
In reply to Emma Richardson

Re: Restrict access to courses during a period of hours on a day

by Adolfo Franco -
Thanks a lot 👍  
It certainly does help, but the restriction settings we are looking for should work at least at course level (at category level would be even better) so that courses must not be available a few hours on a day. So, a group of courses would not be available while another would, alternately.
In reply to Adolfo Franco

Re: Restrict access to courses during a period of hours on a day

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators

Hi

If this is supposed go around performance issues, you are purely treating the symptoms. The proper place to start is improving the performance. See https://docs.moodle.org/en/Performance_recommendations. There is a dedicated forum for this subject, the Hardware and performance forum https://moodle.org/mod/forum/view.php?id=596.