Restriction by time

Availability restriction ::: availability_time
Maintained by Stefan Hanauska
Restrict activities / sections to a time period
Latest release:
287 sites
45 downloads
19 fans
Moodle 3.9, 3.10, 3.11, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1

This plugin allows you to restrict activities / sections to a time period (every day).

You can use this for example for showing a greeting label or a warmup task to your students in the morning.

The plugin respects users timezone - so be aware that it can be manipulated by choosing another timezone.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Stefan Hanauska (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments

Pamerkan komen
  • Plugins bot
    Kha, 29 Dis 2022, 5:40 AM
    Approval issue created: CONTRIB-9169
  • Daniel Gandolfo
    Kha, 27 Apr 2023, 6:57 PM
    Hi Stefan, I have a question if you don't mind.
    Applied to a section of my course, your plugin will allow the section to be open for a given duration.
    Question: when the time is up, will the section be automatically closed to the student?
    More precisely, currently in moodle, you can put restrictions on access to a section for a given time. However, when the time is up, unless the course page is refreshed, the section will remain open to the student...
    Will your plugin automatically close the section at the end of the specified time?
    Thank's for comments.
    All the best.
    Daniel
  • Stefan Hanauska
    Kha, 27 Apr 2023, 7:24 PM
    Hi Daniel,
    that's an interesting idea! Right now, availability_time does not support this kind of feature. But the restriction is effective for all activities in the section, so even if the list of activities is still visible to the students, the activities can't be used by them.
    Best
    Stefan
  • Daniel Gandolfo
    Kha, 27 Apr 2023, 7:56 PM
    Thank you for your comment Stefan.
    But then, what is the difference between your plugin and what moodle allows to do with date and time restrictions to sections access, I don't see.
    Sorry if my question is stupid...
    Daniel
  • Stefan Hanauska
    Kha, 4 Mei 2023, 8:09 PM
    Hi Daniel,
    the plugin allows to do that for every day. So you can make some content visible only from 8:00 to 9:00.
    Best
    Stefan
  • H D
    Ahd, 8 Okt 2023, 10:00 PM
    Can we define different time for different groups?
  • Stefan Hanauska
    Sel, 10 Okt 2023, 9:55 PM
    You can achieve this by using restriction sets (one group restriction and one time restriction per set).
  • Flemming Bornemann
    Kha, 23 Okt 2025, 2:55 PM
    I have been looking for a plugin to dip just this, and was so happy when I found it yesterday smile

    I do have a problem as the times I enter for availability dosen't seem to get registred correct. It keeps showing " Requires time from 00:00 to 00:00 (hidden otherwise)"

    Any suggestions?

    Kind Regards Flemming
    Running Moodle 5.0.3 (Build: 20251006)
  • Flemming Bornemann
    Kha, 23 Okt 2025, 8:28 PM
    Seems that if I toggle the eye-icon for visibility on/off then the times get registret correctly.
  • Daniele Fontanot
    Jum, 16 Jan 2026, 6:01 AM
    Hi, on Moodle 5.1+ (Build: 20251030) the plugin displays the classic error message
    "deprecated style in use..." in the configuration panel with the hour times.
    that occurs when a plugin or theme uses the old Bootstrap versions (and classes),
    How to fix that?
    also, it would be great to mix also conditions related to day of the week, (just like the opening hours panel in Google Business activity). They add in the setting panel all the 7 days of the week as buttons that can be active/non-active. That is useful to allow activity access, for example only during working days in the week.
    thanks!
Please login to post comments