Lesson

 
 
Picture of Amy Dominick
Lesson Dependency - Show user time spent
 
Hello all,

When a lesson is dependent on time spent in a previous lesson, and the user does not spend the appropriate amount of time, mod/lesson/view.php returns this message:
You must complete the following condition(s) in (lesson name) before you can proceed.
Spend at least (the dependency time set) minutes in the lesson.

I would like to know if it is possible to notify the student how much time he has spent in the lesson.

Example: ...Spend at least 25 minutes in the lesson. You have spent 22 minutes in the lesson.

We're using version 1.9.5

Thank you!
 
Average of ratings: -
Picture of Joseph Rézeau
Re: Lesson Dependency - Show user time spent
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators
Hello Amy,
Good idea! If you have admin access to your moodle site (or are on friendly terms with your adminwink) you can make the following small change in file moodle/mod/lesson/view.php, around line 145 in current moodle 1.9.8 version:
change
// collect all of our error statements
if (!$timespent) {
$errors[] = get_string('timespenterror', 'lesson', $conditions->timespent);
}


to
// collect all of our error statements
if (!$timespent) {
$minutesspent = round($duration/60, 2);
$errors[] = get_string('timespenterror', 'lesson', $conditions->timespent).'<br />'.get_string('timespentminutes', 'lesson').': '.$minutesspent;
}


Joseph
I have opened report MDL-22105 in the bug tracker for interested people to vote.

 
Average of ratings:Useful (5)
Picture of Amy Dominick
Re: Lesson Dependency - Show user time spent
 
Joseph, Thank you, thank you, thank you! It works PERFECTLY!
smile
 
Average of ratings: -
Picture of Joseph Rézeau
Re: Lesson Dependency - Show user time spent
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Glad it helped. By the way, you can show your appreciation by "rating" my answer to your question.

Those ratings don't get us free beerssad, but they count somewhere in the system to help us keep our "helpful moodlers" status.cool


 
Average of ratings:Useful (3)
Head
Re: Lesson Dependency - Show user time spent
Group Particularly helpful MoodlersGroup Testers
free beer - that would be nice wink
 
Average of ratings: -
Picture of Amy Dominick
Re: Lesson Dependency - Show user time spent
 
Hi again,

I'm back with a new issue. I'm not sure this one can be resolved as easily as the last one but if you don't ask...

I have a Lesson Dependency on a lesson for time spent in a previous lesson and I added the code above to moodle/mod/lesson/view.php and it works perfectly. (You must complete the following condition(s)... you have spent "x" minutes)..

Now I have a need to make the lesson dependent on two factors, one being time spent in a lesson, the second being a score of 80% or better on a quiz before the lesson may be accessed. I used an activity lock for the grade requirement, but when I do that, the activity lock message overrides the "you must spend "x" amount of time" message and the only requirement that shows when the lesson has been clicked is "you must score at least 80%" on quiz "quizname" before you may proceed. The time requirement is gone. (paraphrased). Is it possible to show both messages? I realize activity locking and lesson dependencies are two different animals, but I can't make activity locking require time spent, and I can't make lesson dependency require more than one item.

thanks in advance! Moodle is awesome.


 
Average of ratings: -
Me at the Moodle Moot NZ11
Re: Lesson Dependency - Show user time spent
Group Particularly helpful Moodlers
Hmmm

1. I'm wondering how frustrated learners might be if they complete a Lesson assigned a 15 minute allocation and they complete it in 10 minutes. Does this mean they have to go back to the completed Lesson and 'twiddle their thumbs' for 5 minutes before they can move on? Anyway, that's an aside!

2. I'm not sure you can make the Lesson dependent on two activities. But do you really need to? If activity B (e.g. Quiz) cannot be done until activity A (Lesson 1) is completed, then you have both conditions achieved before activity C (next Lesson) anyway?

Stuart
 
Average of ratings:Useful (1)
Picture of Amy Dominick
Re: Lesson Dependency - Show user time spent
 
You know, I have read many posts on the topic of the "wrongness" in forcing time spent and how it is not geared towards learning. I agree. The reason I have the need is the age-old argument of "the regulators". I've read some forums that are actually pretty humorous, poking fun at the idea. Unfortunately it is not something I can laugh at wholeheartedly because it is my job to ensure we are compliant with the regulations. I suspect there are many schools similar to mine that have gravitated towards Moodle for the very fact that it offers so much, and it is open source. Many small schools simply can't afford to pay for an LMS, whether it be on a per-student basis or an outrageous flat fee. I was surprised at the cost when I started my research over a year ago. Here in the U.S., many businesses have been hit very hard and schools like ours have closed their doors or are struggling to survive.

I had hopes for 2.0 having more of the features that we need for "enforcement", (what a dirty word) after having read some of the documentation it appears that Moodle is moving in the other direction, for example, the lesson conditions based on time spent are going by the wayside from what I can tell. It makes me believe that I am attempting to force a square peg in a round hole.

As for frustration, the students are familiar with being forced to do X, Y, and Z because that is all they have known, and it likely does cause frustration if there is not enough material in a lesson to justify the time (and the student actually reads the material). Do I justify this thinking? Not really. The regulators do not look upon our students as "learners". They are numbers, and they are either compliant or non-compliant. I think regulations are an attempt to enforce learning, but the end result is not the desired one.

Giving the student the choice to go ahead and complete the quiz prior to spending the time in the lesson was an attempt at allowing a little more freedom to the student as these particular regulations do not force the order of the items, just both conditions must be met prior to completion. I did as you suggested and took the course down a linear path, it satisfies the regulations and presents a clear path to our students.

Thank you!
 
Average of ratings:Useful (1)
Me at the Moodle Moot NZ11
Re: Lesson Dependency - Show user time spent
Group Particularly helpful Moodlers
Hi Amy

You know, we see this type of question/scenario a lot in the Business Users Forum here on Moodle.org. And it is just a natural organisational tension between education and training (over simplification, but you know what I mean).

Moodle does not force a specific way of working, and there are ways of creating linear content (e.g. Lessons) and conditional activities - and these do go some way towards enabling us to create defined pathways through material, and there is nothing necessarily bad about this in the correct context - a perfect example being something like Health and Safety training, or some compliance requirement.

Ultimately, in my mind, I believe that IF the content is interesting, engaging, clear, and well assessed, the linear/controlled approach has quite a small impact on the overall quality of learning. At least that's how it should be smile

Stu.
 
Average of ratings:Useful (1)
here is my current college avatar
Re: Lesson Dependency - Show user time spent
Group Documentation writersGroup Particularly helpful MoodlersGroup Testers
Thanks Amy,
Every year or so, I crawl up on the same FYI soapbox, to remind educators that many regulators maintain the view: "seat time + test score = certification".

Ooops, got to run. I do not want to be tardy to the professional development workshop "Real Innovations in Education: Flatland Revisited" and miss the signin sheet. smile

Chris
 
Average of ratings: -
Picture of Bernard Boucher
Re: Lesson Dependency - Show user time spent
 
Hi Amy,
first thanks for your explainations about your needs and your resiliency about the "wrongness" wink

The lesson module already keep into account 2 or 3 conditions in parallel. Your problem is that you want a Dependency of a Quiz not a lesson. A technically simple but maybe long to do solution, is to transform your quiz in a lesson.

Another solution, wich will require some modifications of the lesson, is to duplicate and to modify the code for the depedency "gradebetterthan" in the file that Joseph point to you and in mod/lesson/mod.html to add a fourth condition that will apply to the quiz results. That may require much more time than to transform your quiz in a lesson but that may be more usefull to others moodlers.

I hope it may help.

Salutations from Québec,

Bernard



 
Average of ratings: -
Picture of Joseph Rézeau
Re: Lesson Dependency - Show user time spent
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators
As Bernard says, making availability of a Lesson instance dependable on completion score of another Lesson instance and a Quiz instance score would entail too many changes to the moodle core files.
Joseph
 
Average of ratings: -
Picture of Amy Dominick
Re: Lesson Dependency - Show user time spent
 
Thank you both Bernard and Stu,

I would like to correct my previous statement about Moodle 2.0; I installed the latest preview and was happy to find that the lesson dependency on time spent is still there. I can move forward with Moodle and I'm very excited about it.

I believe the suggestion is very helpful with modifying the files and I'll try that when I'm feeling brave! I'm not an expert at code by any means but I firmly believe in the motto "Essayons".

Thanks again,

Amy


 
Average of ratings: -
Picture of John Anderson
Re: Lesson Dependency - Show user time spent
 

Thank you Joesph. This makes much better U.I. and U.E.

Too bad Moodle can't see that.

 
Average of ratings: -