Your Moodle version

Blocks: Enrolment Timer

block_enrolmenttimer
Maintained by Picture of Aaron Leggett Aaron Leggett
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.
4k
179
8

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

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

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

Comments RSS

Show comments
  • Picture of German Valero
    Wed, Jun 11, 2014, 11:36 PM
    Hi Aaron,
    I think that this plugin is great, but it would be even better for Moodle users of languages other than English if some English language strings, which are currently hard-wired, were declared as variables, so that AMOS translators (as myself) could make a better translation to other languages.

    The currently hard-wired English strings are:

    The choices for viewoptions: 'years, month, weeks, days, minutes seconds'.
    The default text option for enrolmentemailsubject: 'Enrolment Expiring'
    The default text for completionemailsubject: 'Course Completed'

    Thanks in advance for your help.

  • Picture of Aaron Leggett
    Thu, Jun 12, 2014, 9:44 AM
    Hey German,
    Please find the latest release that incorporates your reqested changes. Thanks for pointing them out to me!

    Cheers
  • Picture of German Valero
    Fri, Jun 13, 2014, 9:48 AM
    Hi Aaron,

    Thanks for upgrading so fast this plugin. Now it will be even more friendly for Moodle users from many languages. I have updated this plugin translation for mexican spanish in AMOS.

    Cheers
  • Picture of Ralf Brauckhoff
    Thu, Aug 7, 2014, 5:26 AM
    Hi,
    thanks for this block. I have updated to the latest version and now I have this message at the top of the page:

    array(7) { ["years"]=> int(31536000) ["months"]=> int(2592000) ["weeks"]=> int(604800) ["days"]=> int(86400) ["hours"]=> int(3600) ["minutes"]=> int(60) ["seconds"]=> int(1) }

    The block is still showing the remaining time. I am working with Moodle 2.6.1+ (Build: 20140117).
    Thanks for your work.
    Ralf
  • Picture of Aaron Leggett
    Thu, Aug 7, 2014, 5:45 AM
    Hi Ralf,
    Thanks for finding that bug. I have found a dump or a variable I had forgotten to remove.
    If you re-download todays version of the block as below
    - Moodle 2.6.2+ (Build: 20140807) (2014080700)
    and install it in your Moodle instance, you should no longer see the output.

    Cheers
    Aaron
  • Picture of Ralf Brauckhoff
    Thu, Aug 7, 2014, 6:31 AM
    Hi,
    this was the fastest answer I ever get smile
    And yes, it is working now. Thanks for all.
    Ralf
  • Picture of Calvin Young
    Fri, Jan 23, 2015, 5:14 PM
    Hi,
    I can't seem to get the email notifications from this block to work. Has anyone else had this problem or can suggest a possible fix?
  • Picture of Marek Kancelarek
    Thu, Jan 29, 2015, 4:45 PM
    Hi,
    are there any plans to add Moodle 2.8 support to this plugin? Or is it fully compatible and just the compatibility info has not been upgraded yet?
  • Picture of Aaron Leggett
    Mon, Feb 2, 2015, 10:10 AM
    Hi Calvin,
    Can you please check your PHP error logs and let me know if there are any errors there. Also please advise your moodle version

    Hi Marek,
    I have now updated and tested the plugin in Moodle 2.8. Enjoy!
  • 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)
    MySQL 5.5.41.37.0
    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.id, ue.timestart, ue.timeend
    FROM mdl_user_enrolments ue
    JOIN mdl_enrol e on ue.enrolid = e.id
    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.

    Cheers,
    Yogesh
  • 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.

    Cheers

    Aaron
  • 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?

    Regards,
    Anant
  • 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)

    Best,
    Hamed
1 2
Please login to post comments