Blocks: Course checker

block_course_checker
Maintained by Picture of FFHS (Fernfachhochschule Schweiz)FFHS (Fernfachhochschule Schweiz), Picture of Adrian Perez RodriguezAdrian Perez Rodriguez, Picture of Christoph KarlenChristoph Karlen, Picture of Sascha VogelSascha Vogel
A Moodle course checker plugin that improves the quality and eliminate human routine tasks in online courses.
119 sites
108 downloads
18 fans

Moodle Course Checker Build Status Coverage Status

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 and userdata 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).

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

Picture of FFHS (Fernfachhochschule Schweiz)
FFHS (Fernfachhochschule Schweiz) (Lead maintainer)
Picture of Adrian Perez Rodriguez
Adrian Perez Rodriguez: Developer
Picture of Christoph Karlen
Christoph Karlen: Developer
Picture of Sascha Vogel
Sascha Vogel: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Mon, Oct 14, 2019, 8:50 PM
    Approval issue created: CONTRIB-7872
  • Picture of Vladimir Miranovic
    Tue, Dec 24, 2019, 11:48 PM
    Hello to all developers,

    can you please explain is it possible to use your plugin for checking links in book activity and how? We have book activity "Resources" in number of our courses, with 20-30 pages of links (all external links), and we have problem to check periodically if all links are still valid (not broken). When I am reading your explanation it seams that your plugin is doing exactly what we need, but when I tried on my local instance of moodle, there are no results (and I know there is broken links in test activity), can you explain please more maybe I need to set something in plugin settings.

    Thank you,
  • Picture of Vladimir Miranovic
    Fri, Dec 27, 2019, 10:28 PM
    Hello again,

    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,
  • Picture of Adrian Perez Rodriguez
    Mon, Jan 6, 2020, 3:35 PM
    Hi Vladimir

    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
  • Dr. Herwig Rehatschek
    Mon, Jan 27, 2020, 8:31 PM
    Dear 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
  • Picture of Adrian Perez Rodriguez
    Mon, Jan 27, 2020, 8:54 PM
    Hello 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
  • Dr. Herwig Rehatschek
    Tue, Jan 28, 2020, 10:35 PM
    Dear Adrian,

    Ah thanks for the hint, now I succeeded at least to add the block smile But what is still strange: the block looks differently in different courses. See: https://box.medunigraz.at/s/isGKqGD6zw57QZo

    In one course I get all the checkable options, in the next course I am offered nothing sad I already tried to use the configure feature of the block, but there I cannot find anything useful, besides the settings are the same in both courses.

    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

  • Picture of Adrian Perez Rodriguez
    Thu, Jan 30, 2020, 4:08 PM
    Hi 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
  • Dr. Herwig Rehatschek
    Tue, Feb 4, 2020, 9:17 PM
    Hi 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
  • Picture of Adrian Perez Rodriguez
    Tue, Feb 4, 2020, 9:34 PM
    Hello 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
  • Dr. Herwig Rehatschek
    Fri, Feb 7, 2020, 8:20 PM
    Dear 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 smile

    Thank you again for your help,
    Best wishes, Herwig from sunny Austria
  • Picture of Kelly Parnell
    Sat, Mar 7, 2020, 3:44 AM
    We are currently testing this plugin and was wondering how we can change the automatic check date to the manual date ONLY? I can't find where to change the settings for this feature. Any assistance is greatly appreciated!
  • Picture of Christoph Karlen
    Sun, Mar 8, 2020, 4:49 PM
    Hey Kelly
    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
  • Picture of Kelly Parnell
    Tue, Mar 10, 2020, 8:57 PM
    HI Christoph,
    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!
  • Picture of Christoph Karlen
    Wed, Mar 11, 2020, 6:10 AM
    Hi Kelly
    Please check the following things:
    - Is your cron-job up and running?
    - Is the Link-Checker enabled in the plugin settings?

Please login to post comments