Moodle Plugins directory: Checklist | Moodle.org
Checklist
This is a Moodle activity module for Moodle 1.9 and Moodle 2.0+ that allows a teacher to create a checklist / todo list / task list for their students to work through. The teacher can monitor all the students' progress, as they tick off each of the items
in the list. Items can be indented and marked as optional. Students are presented with a simple bar showing how far they have progressed through the required/optional items and can add their own, private, items to the list.
Features include:
- Choose whether students or teachers can check-off items
- Students can add their own notes to their checklist
- Dates can be added to items (and exported to the calendar)
- Teachers can comment on an individual student's items
- Progress is exported to the gradebook
- Choice of colours for each checklist item
- Heading items (without checkboxes)
- (Optional) Import list of current course activities and automatically check-off as activities completed
There are two other plugins that further enhance this activity:
Video overview of this plugin:
The latest version (and the Moodle 1.9 version) can always be found here: https://github.com/davosmith/moodle-checklist (the version on Moodle.org will be updated from time to time)
There isn't currently any support for filtering the list of students by checklist completion status. It sounds like a sensible thing to add, but I'm unlikely to get around to doing it in my spare time. If you know a developer who can work on it, then I'd be happy to review a patch to integrate it back into the official release.
I've not looked at what is involved in adding subsection support to the checklist activity, so I don't know how complicated it would be.
I'm very unlikely to look at it anytime soon (I do very little Moodle development in my free time), but I'd certainly review a well written patch that implemented such a feature (as long as it had good automated test coverage and followed the Moodle coding guidelines).
I'd need to know exactly which version of Moodle and which version of the plugin you were using in order to investigate any further.
Would it be possible to add a feature to mod_checklist allowing group-based collaborative validation?
The idea: when one member of a group checks a task, it gets marked as completed for all members of that group.
This would be very useful for shared workflows in group activities.
Thanks for considering!
Alternatively, if you are wanting to fund this development, please contact me directly and I can look to see if this could be completed during my working day.
i get the error message on mobile app of moodle.
At background runs Moodle 3.9.4+
I have this plugin and it's working wonderfully on 5.1+
What I would like to do is be able to filter by group in the 'view progress > edit checks" view, as we have a large number of learners. Has anybody figured a way to enable this filter?
Thank you
I've not tried this in ages, but, as far as I can see, the report on user progress is already filtered by group, so I'm not quite sure what you're asking for (unless the filter is currently broken?)
mod/checklist/report.php:
Simplified the script to a minimal bootstrap that delegates all rendering (header, content, footer, and controls) to checklist_class->report().
Some variants of report.php were doing a mixture of:
Calling $OUTPUT->header()/$OUTPUT->footer() directly (risking moodle_page::set_state errors, since the class also outputs headers), or
Injecting UI elements (like a second group control), causing duplication and layout issues.
Full Code:
require(__DIR__ . '/../../config.php');
require_once($CFG->dirroot . '/mod/checklist/locallib.php');
$id = required_param('id', PARAM_INT);
$studentid = optional_param('studentid', 0, PARAM_INT);
$url = new moodle_url('/mod/checklist/report.php', ['id' => $id]);
if ($studentid) {
$url->param('studentid', $studentid);
}
$cm = get_coursemodule_from_id('checklist', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', ['id' => $cm->course], '*', MUST_EXIST);
$checklist = $DB->get_record('checklist', ['id' => $cm->instance], '*', MUST_EXIST);
$PAGE->set_url($url);
require_login($course, true, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/checklist:viewreports', $context);
$chk = new checklist_class($cm->id, $studentid, $checklist, $cm, $course);
echo $chk->report();
mod/checklist/locallib.php
I replaced the stock group label with a real dropdown and made sure the selection is applied to the user queries. I also added a small, consistent bottom margin so the dropdown doesn’t collide with the “Hide optional items” button.
Inside checklist_class->report() find this block:
$out .= groups_print_activity_menu($this->cm, $thisurl, true);
$activegroup = groups_get_activity_group($this->cm, true);
if ($activegroup == 0) {
if (groups_get_activity_groupmode($this->cm) == SEPARATEGROUPS) {
if (!has_capability('moodle/site:accessallgroups', $this->context)) {
$activegroup = -1; // Not allowed to access any groups.
}
}
}
Replace that entire block with:
// --- Group selector (always a real dropdown) ---
$activegroup = groups_get_activity_group($this->cm, true); // Moodle's current group (may be 0)
// Build a course group list the current user can access.
$coursecontext = context_course::instance($this->course->id);
$canseeall = has_capability('moodle/site:accessallgroups', $coursecontext);
if ($canseeall) {
$groups = groups_get_all_groups($this->course->id, 0, 0, 'g.id, g.name');
} else {
global $USER;
$groups = groups_get_all_groups($this->course->id, $USER->id, 0, 'g.id, g.name');
}
$menugroups = [0 => get_string('allparticipants')];
foreach ($groups as $g) {
$menugroups[$g->id] = format_string($g->name, true, ['context' => $coursecontext]);
}
// Render a dropdown that sets the ?group= URL parameter.
$select = new single_select($thisurl, 'group', $menugroups, $activegroup, null);
$select->label = get_string('groups');
$select->formid = 'checklist-report-groupselector';
// Compact, consistent spacing
$out .= html_writer::tag(
'span',
$OUTPUT->render($select),
['style' => 'display:inline-block;margin-right:1rem;margin-bottom:8px;']
);
// Respect Separate groups rules when viewer lacks access-all.
if ($activegroup == 0) {
if (groups_get_activity_groupmode($this->cm) == SEPARATEGROUPS) {
if (!has_capability('moodle/site:accessallgroups', $this->context)) {
$activegroup = -1; // No permitted groups -> show no users.
}
}
}
// Use the explicit selection from the URL if present.
$activegroup = optional_param('group', $activegroup, PARAM_INT);
Hope this helps someone!