Enrolment Timer icon

Enrolment Timer

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.
Price option: Free

Supports Moodle 3.0-3.7 See all versions
Latest release: 6 years ago
Installations: 492
Downloads (last 90 days): 51

Frankenstyle name: block_enrolmenttimer
Blocks

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hi James,
What version of Moodle did you install the plugin on? We will look into this error and try to find a solution.
Regards,
Mathew
Hi
I have just installed the plugin but noticed that it is throwing a console error. The plugin still seems to work as expected but because of this error it starts to impact other plugins that are also dependent on javascript. The error that is being generated is
Uncaught Error: Mismatched anonymous define() module: function ($){var options=[],arrayKeys=[],timestamp=0,forceTwoDigits=false;$(document).ready(function(){function getDisplayedOptions(){var children=$('.block_enrolmenttimer .active .timer-wrapper').find('.timerNum');for(var i=children.length-1;i>=0;i--){var arrayKey=$(children[i]).attr('data-id');arrayKeys.push(arrayKey)}}
function populateWithData(){for(var i=arrayKeys.length-1;i>=0;i--){var option=$('.block_enrolmenttimer .active .text-desc .'+arrayKeys[i]).text();options[arrayKeys[i]]=option}}
function makeTimestamp(){for(var i=arrayKeys.length-1;i>=0;i--)switch(arrayKeys[i]){case'seconds':timestamp+=parseInt(options[arrayKeys[i]],10);break;case'minutes':timestamp+=parseInt(options[arrayKeys[i]],10)*60;break;case'hours':timestamp+=parseInt(options[arrayKeys[i]],10)*3600;break;case'days':timestamp+=parseInt(options[arrayKeys[i]],10)*86400;break;case'weeks':timestamp+=parseInt(options[arrayKeys[i]],10)*604800;break;case'months':timestamp+=parseInt(options[arrayKeys[i]],10)*2592e3;break;case'years':timestamp+=parseInt(options[arrayKeys[i]],10)*31536e3;break}}
function updateMainCounter(counter,time){var html='';if(forceTwoDigits===true&&time.toString().length==1){html+='0';html+=''+time.toString()+''}else for(var i=0;i'+time.toString().charAt(i)+'';$('.block_enrolmenttimer .active .timer-wrapper .timerNum[data-id="'+counter+'"]').html(html);$('.block_enrolmenttimer .active .text-desc .'+counter).html(time)}
function updateLiveCounter(){timestamp--;var time=timestamp,tokens=['years','months','weeks','days','hours','minutes','seconds'],units=['31536000','2592000','604800','86400','3600','60','1'];for(var i=0;i=units[i]){var count=Math.floor(time/units[i]);updateMainCounter(tokens[i],count);time=time-(count*units[i])}else updateMainCounter(tokens[i],0)};if($('.block_enrolmenttimer .active').length>0){getDisplayedOptions();populateWithData();makeTimestamp();window.setInterval(function(){updateLiveCounter()},1e3)};if($('.block_enrolmenttimer .timer-wrapper[data-id=force2]').length>0)forceTwoDigits=true})}
http://requirejs.org/docs/errors.html#mismatch
at B (require.min.js:12)
at J (require.min.js:27)
at Object.g [as require] (require.min.js:27)
at requirejs (require.min.js:27)
at footer:1
Should I create a ticket on the repo for this? Is this something that has been noticed by others?
I am using the latest version 3.3.0 2017051200. Issue in both firefox and chrome.
Hi Josiah,
We have changed the logic so that the plugin will email anyone with an enrollment end date where the end date minus days to alert occurs between the current date and the next cron run. This means a user should only be mailed once per course.
Regards, Mathew.
I have enabled email to students reminding them that enrollment is coming to an end. Admins are also getting an email every single day reminding them of this fact. Can this be reconfigured so as to get only one email, at the value of "Days to alert on" before the end of the enrollment period?
I would like to change the font color for the timer numerals. In my installation they have white color, but I want the to be in black or at least have the squares around them showing in dark color as in the images above. How do I do that. I'm using moodle 3.1
Uso a versão 3.0, e instalei esse plugin, mas não aparece o contador e, não aparece no curso.
Hi all.
Can anyone please tell me if using this plugin creates a Java dependency on the end users browser? If so, are there any particular Java / JRE versions it needs?
Cheers
Alan W.
Using ver 3.0.0 2016031700 of enrollment timer on a moodle 3.1 platform (but the issue was also noted for moodle 3.0).
When a participant clicks on a link to open a course, the page that is opened contains the following extraneous text, located in the page immediately after the line starting with "

I note that the time at the end of that string is the current time displayed as if it were in am/pm format. In other words, when the local time is 14:10:09, then 02:10:09 is displayed, as in the example above, but without any the "pm".
When the plugin is disabled, or when a user with admin rights is connected, that string is not displayed. I further note that the problem occurs with a variety of different themes.
Really need to have the color issue fixed...time keeps ticking by....
I fixed the bug in version 2016031700 by commenting out the two VAR_DUMP lines in the "locallib.php" file.
That gets rid of the output at the top of the page.
Then I edited the "style.css" file to add a background-colour to the numbers.
I hope that helps people, until an update is released.
Thanks Guys for update, it did manage to get rid of the error message, but still the digits aren't visible, purged caches, checked settings, changes three different themes, and finally removed plug-in all together to re-install again just to see if I am doing anything wrong, and yet they remain invisible until highlighted with mouse drag.
Thank you Kris and Usman for the feedback. A new version is now available.
When you correct a mistake?
Great news...the new version for Moodle 3 works on our school!! BUT...there is always a 'but'...need an option to set the text/background color of the timer block. Will keep testing....
Sorry just managed to see Kris's comment just above mine, so just double that, figures doesnt show on block (highlighting with mouse reveals). but then same string message on top of theme (tested 3 different themes and same message across)