allow students to view any page in lesson

Re: allow students to view any page in lesson

by Steve Bilton -
Number of replies: 0
I stumbled upon a similar post that describes the exact same issue from august 2007. The thread is here : http://moodle.org/mod/forum/discuss.php?d=77872

Chris I noticed you also commented about this issue at the time.

I don't do that much streaming video inside a lesson so I am learning.

It's not really about the streaming media, it's the page links that are the problem and not being able to view an individual lesson page without first starting the lesson from the its' beginning (not just the direct link to the first page). The about thread describes this behaviour quite well.

I can understand the behaviour of the lesson module as it has restrictive capabilities to only allow a certain number of attempts, but if there was an option for an unlimited amount of attempts (instead of the default max value of 10) the lesson should allow users to visit any page without being dependant on the attempts field in the database.
At least that's what I reckon.

A few modifications to php code in lesson module might be in order smile

By eidting the file : mod/lesson/mod_form.php around lines 91-97 I can up the maximum number of attempts a student can have.

Find the code:
$mform->setDefault('review', 0);

$numbers = array();
for ($i=10; $i>0; $i--) {
$numbers[$i] = $i;
}
$mform->addElement('select', 'maxattempts', get_string('maximumnumberofattempts', 'lesson'), $numbers);
$mform->setHelpButton('maxattempts', array('maxattempts', get_string('maximumnumberofattempts', 'lesson'), 'lesson'));
$mform->setDefault('maxattempts', 1);


Where it says $i=10; This value can be altered to any integer. I've upped mine to 50 to ensure students can re-take the lesson a greater number of times. Although this will only work for newly created or updated lessons, so changing the maxattempts field to "50" for all existing lessons will sort that out. ('maxattempts', 1); can also be changed to a higher value to change the default setting for new lessons

I'm still poking around trying to find where the PHP looks for a USER ID in the mdl_lesson_attempts table. That's what I think I need to be looking for if i'm right.

I hope someone else can shed some light.

Steve


P.S.

Chris, i know this is a little off topic , but Regarding flv media videos....

I've been using more flv videos in my courses and found an excellent post with instructions about how to have a playlist of videos that are shareable as a resource across courses without duplicating the (flv) media files in each course ID folder within the /moodledata directory.
here's the post : http://moodle.org/mod/forum/discuss.php?d=98244#p476292
Many Thanks to Johnathan Kemp! This worked a treat.

I successfully tested this on a 1.8.4 & 1.8.8 Moodle, but i'd assume it would work for all versions, I just have to buy the JW Player licence now before I go live with it, but it's only $30.00 for a lifetime licence on a single domain. Although I belive sharing resources across courses will be included within moodle 2.0.