Moodle plugins directory: Enrolment Timer | Moodle.org
Enrolment Timer
Enrolment Timer Block
This block provides the functionality to display the remaining time a user has in their enrolment period - including a live JavaScript countdown timer. There are many settings to choose from to customise the way this is displayed to the user; in text, with numbers, customisable units and so on.
Emailing functionality is also included, You can enable a setting for students to be notified by email when 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.
The plugin has been developed with limited styling to enable the best possible base for theme overrides to align the design with your existing Moodle theme.
Developed by LearningWorks Ltd
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.
Please find the latest release that incorporates your reqested changes. Thanks for pointing them out to me!
Cheers
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
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
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
this was the fastest answer I ever get
And yes, it is working now. Thanks for all.
Ralf
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?
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?
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!
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()
Thank you for the work on this block. Great addition for students to keep track of their enrollment.
Cheers,
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