Your Moodle version

Blocks: Enrolment Timer

Maintained by Picture of Aaron Leggett Aaron Leggett, Jeremy self portrait Jeremy FitzPatrick
Block to show the user their remaining time enrolled in a course with live countdown and lots of settings to customise the display of this timer.

A block to show students the time remaining in their enrolment period including a live JavaScript countdown. Many settings have been included to customise the way the counter is displayed; in text, with numbers, customisable units and so on. This block was also developed as a base so it is easy to incorporate your theme overrides.

Emailing functionality is also included, You can enable students be notified by email that their enrolment is expiring in a set amount of days (Default 10). Email notifications can also be enabled to congratulate a student on passing the course. This email is sent after the student receives a required grade in the course_total grade.

Developed by LearningWorks Ltd


Screenshot #0
Screenshot #1
Screenshot #2


Picture of Aaron Leggett
Aaron Leggett (Lead maintainer)
Jeremy self portrait
Jeremy FitzPatrick
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Marek Kancelarek
    Mon, Feb 2, 2015, 5:34 PM
    Thank you!
  • Picture of Yogesh Nahar
    Fri, Feb 27, 2015, 7:19 PM
    Hi Aaron,

    Thank you for the latest version. I tested it in my environment but am getting an error when the student tries to access the course after the admin adds the block to the course page. My shared hosting environment is:
    Moodle 2.8.1 (Build: 20141113)
    PHP 5.4.34

    Here is the debug info. Please advice.

    Error reading from database
    Debug info: Table 'webideat_mo3405.mdl_user_enrolments' doesn't exist

    SELECT ue.userid,, ue.timestart, ue.timeend
    FROM mdl_user_enrolments ue
    JOIN mdl_enrol e on ue.enrolid =
    WHERE ue.userid = ? AND e.courseid = ?

    [array (
    0 => '3',
    1 => '2',
    Error code: dmlreadexception
    Stack trace:
    line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
    line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
    line 85 of /blocks/enrolmenttimer/locallib.php: call to mysqli_native_moodle_database->get_records_sql()
    line 41 of /blocks/enrolmenttimer/locallib.php: call to block_enrolmenttimer_get_enrolment_records()
    line 197 of /blocks/enrolmenttimer/block_enrolmenttimer.php: call to block_enrolmenttimer_get_remaining_enrolment_period()
    line 288 of /blocks/moodleblock.class.php: call to block_enrolmenttimer->get_content()
    line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
    line 962 of /lib/blocklib.php: call to block_base->get_content_for_output()
    line 1014 of /lib/blocklib.php: call to block_manager->create_block_contents()
    line 392 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
    line 39 of /theme/lambda/layout/columns3.php: call to core_renderer->standard_head_html()
    line 915 of /lib/outputrenderers.php: call to include()
    line 845 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 245 of /course/view.php: call to core_renderer->header()
  • Picture of Yogesh Nahar
    Sat, Feb 28, 2015, 8:09 PM
    Looks like the table it was looking for was mdl_..... and my tables are named pdc_.....! Issue resolved!

    Thank you for the work on this block. Great addition for students to keep track of their enrollment.

  • Picture of Aaron Leggett
    Thu, Mar 19, 2015, 9:45 AM
    Hi Yogesh,
    Thanks for reporting this issue and pointing out the bug! Its great to hear you managed to get it fixed also. I have now updated the source code so feel free to now download the new version with the fix.


  • Picture of Anant Sahni
    Fri, Jun 19, 2015, 4:45 AM
    Hi Aaron,

    Just wanted to check if the Plugin is compatible with Moodle Version 2.9?

  • Picture of Hamed Azimi
    Thu, Jul 9, 2015, 9:42 PM
    Hi Aaron,

    Thanks. It was working fine, but:
    when I translated it to Persian (UTF-8), the "Actively count down" stopped working and the numbers just change when we refresh the page!
    And also the timer is showing right to left (Because Persian is RTL and we use it), but time is always from left to right. (Although the texts below the Actively timer is working fine and they are RTL as they must be)

    Any idea on how to fix them?

    And also how about to add "Hours to alert on" for "Alert Email Notifications Settings"? (We have some classes that students should pay every 3 days and we want to remind them hours (instead of days) before their enrollment expires)

  • Picture of Ralf Brauckhoff
    Tue, Sep 15, 2015, 8:18 PM
    Hi Aaron,
    just a remark. If the block is in a course, which has as enrolment method "Course meta link", the enrolment timer does not show the time. In the meta course it`s ok.

  • Picture of Ger Tielemans
    Wed, Oct 21, 2015, 9:00 PM
    People love the count-down block in the old Moodle, but it was Flash.
    Is it possible to create a spin-off with the behavior of the count down block: 1. remove enrollment timer 2. add static date 3. add WYSIWYG editor to show countdown + text&pictures in block
  • Picture of Aaron Leggett
    Mon, Nov 2, 2015, 9:24 AM
    Hi Ger, This plugin is 100% javascript based and contains no flash. I will be looking into updating this for the latest Moodle soon, so hold tight for the next version smile
  • Picture of Tiffany Backers
    Wed, Nov 4, 2015, 12:27 AM
    Hi Aaron,

    Your plugin is great. However, is there a way to make it work with other user enrolment methods than self or manual enrolment?
  • Picture of Aaron Leggett
    Wed, Nov 4, 2015, 4:45 AM
    Hi Tiffany,
    Unfortunately currently the plugin only supports the basic enrolment types. Could you give an example of the Enrolment types you would like to be able to use and maybe Jeremy could add it to the next version.
  • Picture of Andrew Walding
    Tue, Dec 8, 2015, 1:26 AM
    When will this plugin support Moodle 2.9 and/or 3.0???
  • Picture of Andrew Walding
    Sun, Jan 31, 2016, 3:21 AM
    No answer to the 3.0 upgrade query of this plug in (posted Dec 7). Bummer.
  • Just wondering . . .
    Sun, Jan 31, 2016, 3:54 PM
    Andrew, have you tried a personal message? Surprisingly, some coders just ignore messages from this forum. You also could post in the plugins forum on Also surprisingly, some people fix plugins for their own use and never think to tell anyone until we ask.
    Good luyck.

  • Picture of Brandon Jimenez
    Wed, Feb 3, 2016, 9:07 PM
    Hi, I'm currently running a Moodle 2.9.3+ site and planning to update it to Moodle 3 or 3.1 (sometime in the future), and i would love to have your plugin installed. I do, however, have a question: have you tested in a Moodle 3+ environment? When would you have it certified?

1 2 3
Please login to post comments