Moodle plugins directory: Remaining Lesson Timer | Moodle.org
Remaining Lesson Timer
For all schools where a minimum time spent on-line is required (as it is in a classroom) a "Require time spent" for "Activity completion" is provided by the lesson module in moodle. This side block displays the elapsed and remaining time, to a tenth of a minute, in a lesson that uses "Require time spent". It will display "Time Completed" after the time limit has been reached. See printscreens.
This side block will only run when called by lesson/view.php and only then, when the time limit is set [greater than 0]. In other words, it cannot be called directly nor even indirectly by any program other than lesson/view.php.
There is a "REFRESH TIMER" button with which students can refresh the page and update the timer if they wish (it is the same as clicking the browser's refresh button).
The Remaining Lesson Timer code restricts its display to lesson/view.php therefore an administrator can simply have one instance that covers all courses ["Display throughout the entire site"] or a person can be more selective. In either case, it will show up in and only in the lesson/view.php pages where the time limit is set [greater than 0].
If an admin or teacher calls up a timed lesson/view.php page for editing (for example), then there are no {lesson_timer} records but the timer will simply display the required time to be spent and 0 for the actual time spent. See printscreen.
No records are ever written by this timer display nor is there any data entry. This block is display only.
Yes, the access.php needs the "myaddinstance" if the block is to be displayed on the "my" home/dashboard page. Mine is not.
Thank you for all your help;
all that is left is the visibility declaration and
"Warning Release name ($plugin->release) not found in version.php"
when I first checked, the "init" and "get_content" functions etc.
_ _ _ function init() {
_ _ _ function get_content {
I did not see any that were different from what I had; no "public" declaration anywhere.
now I have seen a few (about 1 out of 3) but nothing they can call a mandate.
In fact, Dougiamas has his name on 21 programs with those (2) functions [in mdl 3.5.2]
and of the 21, he put the "public" declarations on only 2.
That certainly implies that the wiser thing to do is to leave it off. [... until they are willing to comply with their own guidlines. (?) ]
Will be available to Moodle 3.6 this plugin? Because I installed 3.5 version on 3.6 but when I'm going to add a new block, this block isn't in the list to add.
Best Regards.
This block was created before 3.6 came out however, this block continues to run on 3.6 and future versions of moodle indefinitely (as long as your database table {mdl}_modules has the lesson module listed in record 11. ~you started using moodle before version 3) Even this shortcoming will be overcome in the next release of the block.
Thank you,
Greg
I'm looking for the block in the list but can't find it.
80 $querycml =
81 "SELECT cm.id AS cmid, cm.module, cm.instance,
82 cm.section, l.*
83 FROM {modules} m, {course_modules} cm
84 JOIN {lesson} l
85 ON ( l.id = cm.instance AND cm.course = l.course )
86 WHERE cm.id = :id
87 AND cm.module = m.id
88 AND m.name LIKE 'lesson' ";
but the block is not on offer
well thank you