And how do you cause it to "forget" the last state? Here's how! Read on.
An expert and authority on Course Formats, Gareth J Barnard, replied.
Here's the hack code that does the job of stopping persistance in all Topics courses:
Edit 'format.php' in the '/course/format/topics' folder and change the code from:
And once again, thanks to the unsung heroes and kind Moodle Community, another stuck programmer is rescued and a teething programming problem is solved. Don't you just LOVE the Moodle Community?
Happy Moodling
Frankie Kam
An expert and authority on Course Formats, Gareth J Barnard, replied.
Here's the hack code that does the job of stopping persistance in all Topics courses:
Edit 'format.php' in the '/course/format/topics' folder and change the code from:
if ($topic != -1) {
$displaysection = course_set_display($course->id, $topic);
} else {
$displaysection = course_get_display($course->id);
}
$displaysection = course_set_display($course->id, $topic);
} else {
$displaysection = course_get_display($course->id);
}
to
if ($topic != -1) {
$displaysection = $topic;
} else {
$displaysection = 0;
}
$displaysection = $topic;
} else {
$displaysection = 0;
}
And once again, thanks to the unsung heroes and kind Moodle Community, another stuck programmer is rescued and a teething programming problem is solved. Don't you just LOVE the Moodle Community?
Happy Moodling
Frankie Kam
Very nice indeed! Many thanks for this specific!
ReplyDelete