2.8.3 Changing the look of "Time Spent" in lesson

Re: 2.8.3 Changing the look of "Time Spent" in lesson

by Wendi Daniels -
Number of replies: 6

Thank you so much, Jean-Michel!  :D


In reply to Wendi Daniels

Re: 2.8.3 Changing the look of "Time Spent" in lesson

by Wendi Daniels -

Jean-Michel,  I upgraded to 2.9, and the clock is not there at all. What happened to it?

In reply to Wendi Daniels

Re: 2.8.3 Changing the look of "Time Spent" in lesson

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

Have you tried the lesson with a real student account? The timer only shows when you are using a student account (and you have set the timer in Lesson administration>Availability)

In reply to Mary Cooch

Re: 2.8.3 Changing the look of "Time Spent" in lesson

by Wendi Daniels -

Mary, lesson>availability seems to be about time limit, or the maximum amount of time a person is allotted for the lesson. I am talking about the minimum amount of time in lesson>prerequisite. In 2.8.3 and earlier, if a person did not complete the minimum amount of time, they were told that they needed to spend, for example, 10 minutes in the lesson, and they were told how much time they had spent so far, in decimal. They had changed time spent to minutes:seconds, but I upgraded and it is gone altogether. Do you know why? I logged in with a student's account to see it, and it is not there.

In reply to Wendi Daniels

Re: 2.8.3 Changing the look of "Time Spent" in lesson

by Jean-Michel Védrine -

Hello Wendi,

I have not changed the code for the old "lesson prerequisites" feature (that is to be removed in a future version of Moodle and that you can't use in new lessons, only existing lesson can have prerequisites) so the warning should be displayed as before.

Can I ask for some informations

  • Did you look at an old lesson that was made before Moodle 2.9 or are you trying to create a new lesson ?
  • Can you confirm that we are speaking of the "Spend at least xxx minutes in the lesson" message that is used for the old lesson prerequisites feature and not the new "You completed this lesson in xxxxxx, which is less than the required time of yyyy. You might need to attempt the lesson again." that was introduced in Moodle 2.9 for the new "time spent" completion rule ?
  • Are messages for other lesson prerequisites (password, dependency from other lessons, grade better than, completed, ...) also missing or is the one about time the only one missing ?
I understand that it's a bit confusing to have 2 features (prerequisites and activity completion) to do exactly the same thing but this was the only solution to not break existing lessons using prerequisites and introduce custom completion rules in lesson.
My best advice is to move your lessons to use activity completion as soon as possible and to stop using prerequisites.
In reply to Jean-Michel Védrine

Re: 2.8.3 Changing the look of "Time Spent" in lesson

by Jean-Michel Védrine -

I did a test and the old lesson prerequisite "time spent" is working as expected

  • I created 2 lessons "lesson 1" and "lesson 2" and in lesson 2 settings I I set up it as dependent of time spent in lesson 1 (2 minutes)
    prerequisite-time_spent
  • I attempted lesson 1 as a student spending less than 2 minutes to complete it
  • When I try to attempt lesson 2 I get the warning message as expected:
    time spent warning
So for me the old lesson prerequisite feature is working in Moodle 2.9 exactly as it was working in Moodle 2.8 and there is no bug or regression.


Note: As I said it is impossible to use the "lesson prerequisite" feature in Moodle 2.9 for new lessons, you can only use it with lesson created in older Moodle versions and that already have prerequisite conditions. So to make this test I had to create these 2 lessons in Moodle 2.8, create a backup and restore it in Moodle 2.9 wink. Dont be surprised if you create a lesson in Moodle 2.9 and if you don't see the "Prerequiste lesson" section in the settings. This is not a bug, it is working as it should.

Average of ratings: Useful (1)