Adding count down timer to start of Folder-type activity

Adding count down timer to start of Folder-type activity

by Greg Rich Debonair -
Number of replies: 4
Picture of Plugin developers

hello,

I will really appreciate some help coding a plugin that has the functionality of a countdown timer and then after countdown reveal start and access to folder type activity as an assignment to submit later.

Note: The "assignment activity" functionality and also "block countdown timer" is not fit for purpose in this case.

I can't get the countdown timer to render output in the folder type activity, neither with the render to template work so far.

Help please??

Greg

Average of ratings: -
In reply to Greg Rich Debonair

Re: Adding count down timer to start of Folder-type activity

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hello Rich. I am going to move your post to the General developer forum since you are asking about coding. But just to clarify - do you want to restrict access to a folder until a certain date and time? You can already do that with the Restrict access feature, and I imagine you could perhaps add a label with some embedded countdown timer code under/above the folder as a workaround.
In reply to Mary Cooch

Re: Adding count down timer to start of Folder-type activity

by Greg Rich Debonair -
Picture of Plugin developers
Hi Mary,

Thanks so much for your response.
Yes indeed there is the "Label" workaround/restriction, if eventually i don't succeed in coding one installable plugin for all the institution exams.
The issue with the restriction, is the page needs to be refreshed before the student can access the unrestricted content. This 5000 students page refresh and accompanying server crashing load is what we are trying to avoid

Thanks again
In reply to Greg Rich Debonair

Re: Adding count down timer to start of Folder-type activity

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
When does the countdown start? When the student click on the folder activity? Then if 5000 students click it at the same time, it will reveal itself at the same time. Or, are you thinking of a random duration for the countdown?

Well there are sneaky tricks like, making a quiz a precondition for the folder. The only question of the quiz being to type a long but easy to remember sentence as the correct answer. That will "randomize" the entry to the folder.

Well even then, if 5000 students start that quiz at the same time, you are again in trouble. https://moodle.org/plugins/quizaccess_delayed seems to provide a solution. Never tried it.

The truth is, if you serve a stampede of 5000 students, your infrastructure should match. Everything else is a painful path. The initial pointers in this directions are in the documentation of the Hardware and performance forum https://moodle.org/mod/forum/view.php?id=596.
In reply to Visvanath Ratnaweera

Re: Adding count down timer to start of Folder-type activity

by Greg Rich Debonair -
Picture of Plugin developers
Hi Visvanath,

Thank you so much, especially for the pointer to Mod forum. Have you noticed there is no forum for the folder activity as well.

Yes indeed i suggested the delayed access to the activity but the institution decided against with a firm no, i guess due to government regulatory body standards and all that entails.

I am currently trying to implement a solution using mustache templates and javascript. When i eventually find one, i will share, to further help the developer community.

Cheers