diff --git a/mod/checklist/README.txt b/README.txt similarity index 52% rename from mod/checklist/README.txt rename to README.txt index d9b58cd5..788a60df 100644 --- a/mod/checklist/README.txt +++ b/README.txt @@ -1,63 +1,30 @@ Checklist module ================ -**Introduction** +==Introduction== This is a Moodle plugin for Moodle 1.9 & 2.0+ that allows a teacher to create a checklist for their students to work through. The teacher can monitor all the student's progress, as they tick off each of the items in the list. -Note: There are separate downloads for the Moodle 1.9 and 2.0+ versions of this plugin - make sure you download the correct version. +Note: This is the Moodle 1.9 version of the plugin. Items can be indented and marked as optional or turned into headings; a range of different colours can be used for the items. Students are presented with a simple chart showing how far they have progressed through the required/optional items and can add their own, private, items to the list. -**Installation** -Unzip the contents of file you downloaded to a temporary folder. -Upload the files to the your moodle server, placing them in the 'moodle/mod/checklist' folder. -Log in as administrator and click on 'Notifications' in the admin area to update the Moodle database, ready to use this plugin. +==Installation== +1. Unzip the contents of file you downloaded to a temporary folder. +2. Upload the files to the your moodle server, placing the 'mod/checklist' files in the '[moodlefolder]/mod/checklist' folder and (optionally) the 'blocks/checklist' files in the '[moodlefolder]/blocks/checklist' folder. +3. Log in as administrator and click on 'Notifications' in the admin area to update the Moodle database, ready to use this plugin. -IMPORTANT: The 'Check-off modules when complete' option now works via cron, by default. This means that there can be a delay of up to 60 seconds, between a student completing an activity and their checklist being updated. -** If you are happy with this delay, then ignore all of these suggested changes below ** -If this is not acceptable, then you should make the following changes to the Moodle core code (for extra help with this, look in 'mod/checklist/core_modifications.txt'): - -* Open the file: moodle/lib/datalib.php -Find the function 'add_to_log', then add these lines to the end of it: - - require_once($CFG->dirroot.'/mod/checklist/autoupdate.php'); - checklist_autoupdate($courseid, $module, $action, $cm, $userid); - -* Open the file: moodle/mod/quiz/lib.php -Find the function 'quiz_grade_item_update', then add these lines just before the final 'return' line: - - // Inserted to allow autoupdating items in checklist - require_once($CFG->dirroot.'/mod/checklist/autoupdate.php'); - checklist_autoupdate_score('quiz', $quiz->course, $quiz->id, $grades); - // Inserted to allow autoupdating items in checklist +==Adding a checklist block== +1. Click 'Turn editing on', in a course view. +2. Under 'blocks', choose 'Checklist' +3. Click on the 'Edit' icon in the new block to set the checklist to display and (optionally) which group of users to display. -* Open the file: moodle/mod/forum/lib.php -Find the function 'forum_grade_item_update', then add these lines just before the final 'return' line: - // Inserted to allow autoupdating items in checklist - require_once($CFG->dirroot.'/mod/checklist/autoupdate.php'); - checklist_autoupdate_score('forum', $forum->course, $forum->id, $grades); - // Inserted to allow autoupdating items in checklist - - -* Open the file: moodle/mod/assignment/lib.php -Find the function 'assignment_grade_item_update', then add these lines just before the final 'return' line: - - // Inserted to allow autoupdating items in checklist - require_once($CFG->dirroot.'/mod/checklist/autoupdate.php'); - checklist_autoupdate_score('assignment', $assignment->courseid, $assignment->id, $grades); - // Inserted to allow autoupdating items in checklist - -WARNING: This will slow your Moodle site down very slightly. -However, the difference is unlikely to be noticable. +IMPORTANT: The 'Check-off modules when complete' option now works via cron, by default. This means that there can be a delay of up to 60 seconds, between a student completing an activity and their checklist being updated. -You should also disable the cron updates, by changing the following line in 'mod/checklist/autoupdate.php' (it is at the top of the file): -$CFG->checklist_autoupdate_use_cron = true; -should be changed to: -$CFG->checklist_autoupdate_use_cron = false; +If you are not happy with this delay, then make the changes found in the file core_modifications.txt -**Usage** +==Usage== Click on 'Add an activity' and choose 'Checklist'. Enter all the usual information. You can optionally allow students to add their own, private items to the list (this will not affect the overall progress, but may help students to keep note of anything extra they need to do). @@ -84,13 +51,13 @@ If you allow a checklist to be updated by teachers (either exclusively, or in ad 5. (Optional) Click 'Add comments', enter/update/delete a comment against each item, Click 'Save' 5. Click 'View all Progress' to go back to the view with all the students shown. -**Further information** +==Further information== Moodle plugins database entry: http://moodle.org/mod/data/view.php?d=13&rid=3582 Browse the code: http://cvs.moodle.org/contrib/plugins/mod/checklist Download the latest version: http://download.moodle.org/download.php/plugins/mod/checklist.zip Report a bug, or suggest an improvement: http://tracker.moodle.org/browse/CONTRIB/component/10608 -**Contact details** +==Contact details== Any questions, suggested improvements (or offers to pay for specific customisations) to: davo@davodev.co.uk diff --git a/mod/checklist/core_modifications.txt b/core_modifications.txt similarity index 82% rename from mod/checklist/core_modifications.txt rename to core_modifications.txt index 9e54b770..174c0941 100644 --- a/mod/checklist/core_modifications.txt +++ b/core_modifications.txt @@ -1,3 +1,48 @@ +The changes shown in this file are only needed if you are worried about a short (60 second) delay between students completing an activity and it being checked-off on the checklist. + +** If you are happy with this delay, then ignore all of these suggested changes below ** +If this is not acceptable, then you should make the following changes to the Moodle core code (for extra help with this, look in 'mod/checklist/core_modifications.txt'): + +* Open the file: moodle/lib/datalib.php +Find the function 'add_to_log', then add these lines to the end of it: + + require_once($CFG->dirroot.'/mod/checklist/autoupdate.php'); + checklist_autoupdate($courseid, $module, $action, $cm, $userid); + +* Open the file: moodle/mod/quiz/lib.php +Find the function 'quiz_grade_item_update', then add these lines just before the final 'return' line: + + // Inserted to allow autoupdating items in checklist + require_once($CFG->dirroot.'/mod/checklist/autoupdate.php'); + checklist_autoupdate_score('quiz', $quiz->course, $quiz->id, $grades); + // Inserted to allow autoupdating items in checklist + +* Open the file: moodle/mod/forum/lib.php +Find the function 'forum_grade_item_update', then add these lines just before the final 'return' line: + + // Inserted to allow autoupdating items in checklist + require_once($CFG->dirroot.'/mod/checklist/autoupdate.php'); + checklist_autoupdate_score('forum', $forum->course, $forum->id, $grades); + // Inserted to allow autoupdating items in checklist + + +* Open the file: moodle/mod/assignment/lib.php +Find the function 'assignment_grade_item_update', then add these lines just before the final 'return' line: + + // Inserted to allow autoupdating items in checklist + require_once($CFG->dirroot.'/mod/checklist/autoupdate.php'); + checklist_autoupdate_score('assignment', $assignment->courseid, $assignment->id, $grades); + // Inserted to allow autoupdating items in checklist + +WARNING: This will slow your Moodle site down very slightly. +However, the difference is unlikely to be noticable. + +You should also disable the cron updates, by changing the following line in 'mod/checklist/autoupdate.php' (it is at the top of the file): +$CFG->checklist_autoupdate_use_cron = true; +should be changed to: +$CFG->checklist_autoupdate_use_cron = false; + + To help with modifying the core code to get the 'Check-off modules when complete' feature working, I have included below what the functions will look like after the modification has taken place. Look for the comment '/**** These are the extra lines of code to add for the checklist plugin *****/' to see where the changes have been made. NOTE: This code is taken form Moodle 1.9.9. Do NOT copy and paste the whole functions, as this may not be compatible with your current Moodle version. diff --git a/.emacscopyto b/mod/checklist/.emacscopyto similarity index 100% rename from .emacscopyto rename to mod/checklist/.emacscopyto