Moodle Plugins directory: Course checker | Moodle.org

Course checker
Moodle Course Checker

A Moodle course checker plugin that improves the quality and eliminate human routine tasks in online courses
This plugin provides a framework that can check a course based on independent checkers. It will help you find misconfiguration in your courses and follow your internal guidelines. The checkers can be triggered manually an will be executed by the Moodle AdHoc task system.
Requirements
This plugin should be compatible with Moodle 3.7+
- You have to set up a cron to run the checkers
php-ext-curl
should be on (for the link checker)
Installation
Install the plugin like any other plugin to folder blocks/course_checker
.
Use git to install this plugin:
cd /var/www/html/moodle
git clone https://github.com/ffhs/moodle-block_course_checker.git blocks/course_checker
echo '/blocks/course_checker/' >> .git/info/exclude
Then complete upgrade over CLI:
sudo -u apache /usr/bin/php admin/cli/upgrade.php
or GUI (Site administration -> Notifications).
See MoodleDocs for details on installing Moodle plugins
Documentation
This plugin provides interfaces and well defined result objects to extend this plugin. New useful checkers and issue notifications are highly appropriated
- Each checker can be executed separately (re-run or all at once)
- Individual checkers can be deactivated
- If checkers are deactivated you can show or hide the existing results
- Some checkers e.g
activedates
anduserdata
make only sense to be run in template courses. Therefore, they have an advanced setting where you can define a regexp which checks the course fullname if the checker will be shown or not. - A static date and a note can be stored (human check)
- A list with edited and created activities since this date will be displayed
- This form can allowed only for given roles
- The user will be notified by Moodle when a check is done
- Individual settings are defined in each checker (
classes/checkers/checker_name/settings.php
), rather than in settings.php - Individual edit_forms are defined in each checker (
classes/checkers/checker_name/edit_form.php
), rather than in edit_form.php.php - Individual dependencies are defined in each checker (
classes/checkers/checker_name/dependency.php
)
Available checkers
Checker Name | User Story | Dependency |
Attendance sessions | As editing teacher, - I would like to see if in my course the attendance activity is created. There must be no sessions added to the activity, to ensure teachers can take attendance during class and that no old sessions are copied. |
mod_attendance |
Group submission for assignments | As editing teacher, - I would like to see, if in my course in an assignment the option "students submit in groups" is set, whether the "group mode" is activated. A grouping is created and selected, and corresponding groups exist and are allocated. This allows me to ensure that the first submission of a student does not block the submission for all other students. |
|
Links in course summary and URL activities | As editing teacher, - I would like to see if all the external links that are in the course are reachable -I would like to be able to create my own domain whitelist per course Links that requires authentication are currently not supported (e.g internal Moodle links) |
|
Settings compared to reference course | As editing teacher, - I would like to be able to compare specific coursesetting fields between a course and the reference course - I would like to be able to compare the filter settings between a course and the reference course - I would like to be able to compare courseformat options between a course and the reference course |
|
Label subheadings check | As editing teacher, - I would like to see, if all labels starts with a h4 HTML tag and a FontAwesome icon |
|
Data activity with fields | As editing teacher, - I would like to see, if databases have fields defined |
|
Active dates in activity configurations | As editing teacher, - I would like to see, if activities has timing configurations set |
|
Total mark in activity quiz | As editing teacher, - I see that for quizzes, the maximum points correspond to the total number questions points |
|
Stored user data in activities | As editing teacher, - I see that no user data is entered for activities that may contain user data (e.g. databases, forums, glossaries, wikis) They will not be copied to the individual courses |
|
Blocks exists | As editing teacher, - I would like to be able to compare the present blocks between a course and the reference course |
Copyright
Copyright (C) 2019 Liip AG the Swiss Moodle Partner.
Further developments and open-sourced by Swiss Distance University of Applied Sciences (FFHS).
I need to correct my previous post. We have book activity with 20-30 chapters with 15-30 links each. Looking at your code, I found in course_checker\classes\checkers\checker_link\checker.php line 99 - $url = new \moodle_url('/mod/' . $modname . '/view.php', ['id' => $mod->coursemodule]); but chapters are having additional "chapterid" - /mod/book/view.php?id=66&chapterid=45
Can you implement checking links in book activity chapters in your plugin? It is very useful, but it would be grate to have a book activity link check too.
Thank you,
Thanks for your messages and your findings. The variable initiated in line #99 that you mention is only the resolution link to have a link direct to this activity on the details page.
But you're right, the book chapters are not included in this checker as only the properties "name, intro, content" of activities and "externalurl" for the activity URL are included. I'll create an issue on GitHub and I would really appreciate if you can help to add this feature.
Kind regards,
Adrian
first a big thank you to provide such a great plugin. I have a very basic question: we just installed the plugin at our Moodle 3.7. But how can I use the plugin now? I mean I can openb the configuration interface of the plugin, but I do not see any new menu in the courses. So how can I activate it within the course? (I cannot see screenshot 1 and 2, only 3 ...).
Thanks a lot for any hints,
Best wishes from a bright and sunny Austria,
Herwig
This plugin is a block. Therefore, you can add it like the others with "Add a block" to each course. Please be aware, that the global settings (screenshot 3) are related to all block instances over all courses. We don't have yet independent settings for each block instance per course.
Greets,
Adrian
Ah thanks for the hint, now I succeeded at least to add the block
In one course I get all the checkable options, in the next course I am offered nothing
Furthermore you state in your doc that we have to start cron jobs - which ones exactly? php-ext-curl - this addon we have installed, do we have to do anything else?
Thanks for your kind help,
Best wishes from sunny Austria to sunny Switzerland,
Herwig
It doesn't show the check results if the _first_ course check is pending. After the first run, the check results should be shown.
> Cron should run in the background, as the queue of this course checks is done as adhoc tasks (https://docs.moodle.org/dev/Task_API#Adhoc_tasks).
> The php extension cURL is necessary for the
link checker
.HTH,
Adrian
Thanks again for your help. What I still can't understand: I receive the course checker block only in two courses in our Moodle installation, in the other courses I simply cannot see the block in the courses nor do I see any possibility to add the block ... see screenshot of one of the many courses where the course checker block does not appear. Do you have any idea why it doesn't show up? Is it a special setting in the course?!
See here what I (do not) see: https://box.medunigraz.at/s/LLyAzrEmky9cHHA
Thanks again for any hints,
Best wishes from a partly sunny Austria,
Herwig
Are you sure you are in edit mode and you can add blocks to this course? Please click in the course settings on "Turn editing on". I think, that this problem has nothing to do with that "Course checker" plugin and if you need help you should consider contacting your Moodle administrator.
Greets,
Adrian
you are right thanks for the hint. When turning editing on I can manually add the block "course checker" and then it remains visible. And yes, I have the rights to add blocks, I have admin rights
Thank you again for your help,
Best wishes, Herwig from sunny Austria
When you click the "CHECK THIS COURSE" the activated checks are sheduled and then processed by your moodle-cronjob as soon as possible. At the moment the plugin doesn't provide a way to pospone oder plan the execution of the checks once you have clicked the button.
The "Set manual check date" section of the block provides a way to set a date when a human beeing made a manual check by reading the content of the course - so no automation here. The only real impact this date has, is on the "Last modified activities" on the Detail page. Here, all the activities are listed since that date.
Can you describe what you want to accomplish? Maybe I can help you.
have a nice day
Thanks for reaching back out! I am testing this plugin for our Moodle system, and when I try to run the checker it says that this course is already scheduled to be checked automatically, but it also says that the automatic check has never been launched. I do not know how to launch it. When I set the manual check date, and view the detailed results, I get a message saying “this course has never been checked automatically”. I am trying to figure out how to get it to work! I know for certain that there are broken links in the course, because I put them there myself. If you have any suggestions, please let me know! Thank you so much!
Please check the following things:
- Is your cron-job up and running?
- Is the Link-Checker enabled in the plugin settings?
The block is course related, so we don't want to add it to the dashboard. Maybe you could use this config setting https://github.com/moodle/moodle/blob/master/config-dist.php#L246-L248 to solve your problem?
Greets
Adrian