The "timer.js" script in "Lesson"

The "timer.js" script in "Lesson"

by Wendi Daniels -
Number of replies: 10

Hey, it looks like there is an obsolete coding for a timer in lesson. Does anyone have enough knowledge about writing script to dust it off and get it working again? Having a timer would be great!

Average of ratings: -
In reply to Wendi Daniels

Re: The "timer.js" script in "Lesson"

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

This "obsolete" coding does not prevent the Lesson timer from working as expected, as far as I know.

Joseph

In reply to Joseph Rézeau

Re: The "timer.js" script in "Lesson"

by Wendi Daniels -
No, it doesn't. My post was not about the timer working, my post was about having the clock back, which apparently was there at one time, but is now gone. Do you know anything about this, Joseph?
In reply to Wendi Daniels

Re: The "timer.js" script in "Lesson"

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Wendi "...my post was about having the clock back"

Not sure what you mean.

Wikipedia says " A timer which counts upwards from zero for measuring elapsed time is often called a stopwatch; a device which counts down from a specified time interval is more usually called a timer".

As far as I know, the original "clock" that the Moodle Lesson timer is based on worked as a stopwatch. The modified "clock" works as a timer, that is to say it tells the student how much time is left for the activity. Which is what we want, no?

Joseph

In reply to Joseph Rézeau

Re: The "timer.js" script in "Lesson"

by Wendi Daniels -
Yes, Joseph, that is what I want, but as of now there is nothing to tell the student how much time remains in the lesson before they can move on. I am asking about the presence of a visual timer.
In reply to Wendi Daniels

Re: The "timer.js" script in "Lesson"

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

The Lesson timer does work and it does tell the student how much time is remaining.

screenshot #1

screenshot #2

However it is not as efficient as the Quiz timer. The Quiz timer is updated dynamically. The Lesson timer is only updated when the student submits an answer or goes to the next page.

Having in the Lesson activity the same kind of timer as in the Quiz activity would need quite some development.

Joseph

In reply to Joseph Rézeau

Re: The "timer.js" script in "Lesson"

by Wendi Daniels -

Thank you, Joseph. I have set the time prerequisite, but I do not see the timer that you show. How do I program the lesson to show that timer?

In reply to Wendi Daniels

Re: The "timer.js" script in "Lesson"

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

You set a timer for a lesson in the lesson administration settings (when you set it up or edit its settings) by enabling the "Time limit" setting. So if you want lesson 2 to be available when a student has spent 20 minutes in lesson 1, then not only would you have to set the lesson prerequisite in lesson2 to be 20 minutes in lesson 1 but you could also go into lesson 1 and enable the "Time limit" setting so students can see where they are up to.

In reply to Mary Cooch

Re: The "timer.js" script in "Lesson"

by Wendi Daniels -

Unfortunately, I found that setting that time limit, as I suspected, kicks the student out of the lesson when the time is up. I wanted a time piece to show them how much more time they must spend before they are allowed to move on to the next lesson. Is there a way to do that, without kicking them out of the lesson when the clock reaches "zero"?

In reply to Wendi Daniels

Re: The "timer.js" script in "Lesson"

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

"Is there a way to do that, without kicking them out of the lesson when the clock reaches "zero"?"

No, that would need some special development.

Joseph