Admin tools ::: tool_inspire
Maintained by David Monllaó, Elizabeth Dalton
The Inspire plugin implements open source, transparent next-generation learning analytics using machine learning backends that go beyond simple descriptive analytics to provide predictions of learner success, and ultimately diagnosis and prescriptions (advisements) to learners and teachers. From Moodle HQ.
Latest release:
76 sites
28 fans
Current versions available: 1

This is Moodle's offical descriptive and predictive analytics engine, implementing machine learning backends.

This plugin is for Moodle 3.3; the plugin has been refactored and integrated into Moodle 3.4 core as the Moodle analytics API.


  • One built-in prediction model: Students at risk of dropping out of courses.
  • A set of student engagement indicators based on the Community of Inquiry.
  • Built-in tools to evaluate models against your site's data
  • Proactive notifications for instructors using Events
  • Instructors can easily send messages to students identified by the model, or jump to the Outline report for that student for more detail about student activity
  • An API to build indicators and prediction models for third-party Moodle plugins
  • Machine learning backend plugin type - supports PHP and Python, and can be extended to implement other ML backends
Note: PHP 7.x is required to use the PHP machine learning backend.

More information


The initial 3.3-r1 version of the Inspire plugin has some limitations:

  • This version is installed as a third-party plugin. Future versions will become part of Moodle Core.

  • This version only reads activity logs from the standard log store. A log store selector will be added in future versions of the plugin.

  • This version requires a site with previous course completion data (final grades and/or completion criteria and/or defined competencies). This data is used to train the prediction engine.

  • The prediction model included with this version requires that courses have fixed start and end dates, and is not designed to be used with rolling enrollment courses. Models that support a wider range of course types will be included in future versions of Inspire.

  • Models and predictions are only visible to teachers and administrators at present.

We are continuing to enhance Inspire, and expanded capabilities will be released going forward. To help contribute to our progress, please join the conversation at the Project Inspire Community. In particular, we need data sets from a wide variety of Moodle-using institutions in order to be able to ship a working prediction model that does not depend on local site data before it can be used.

Potential privacy issues

The Inspire tool does not send any personal data outside your Moodle site.


Screenshot #0
Screenshot #1
Screenshot #2


David Monllaó (Lead maintainer)
Elizabeth Dalton: Research analyst
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Thu, May 11, 2017, 5:20 PM
    Approval issue created: CONTRIB-6895
  • Wed, May 17, 2017, 2:34 AM
    Trying to run this on a test site...
    I get the error:

    More information about this error
    Debug info:
    Error code: errorcantloadmodel
    $a contents: [dataroot]/models/1/1494958559/execution/model.ser
    Stack trace:

    line 120 of /admin/tool/inspire/predict/php/classes/processor.php: moodle_exception thrown
    line 490 of /admin/tool/inspire/classes/model.php: call to predict_php\processor->predict()
    line 122 of /admin/tool/inspire/model.php: call to tool_inspire\model->predict()
  • Thu, May 18, 2017, 9:19 AM
    Hi Mike,

    Thanks for the report. The file that can't be found is the trained machine learning model, the prediction process needs it to base its predictions on it. Do you have any previous error logs? We check that the model is enabled and trained before prediction, the only possible causes I can think of without looking at the code is that the training set was empty but we did still flag the model as trained, any of your test site courses has a past end date with some students activity between the start of the course and its end? We should only flag the model as trained when there is at least 1 valid course, just asking to discard scenarios. Another cause could be a change in the models directory setting (I don't think you did any changes, you use the default one). I am looking at it. In any case feel free to create an issue in, this is not the expected behaviour and needs to be investigated.
  • Wed, May 24, 2017, 11:52 PM

    First of all I´d like to congratulate you on this tool, it´s a great idea.
    I'm trying to test it, but I can not evaluate. In the platform where I am testing it I have two courses, one of them is finished to get the training data, and the other is unfinished.

    The problem is in "Evaluate", I tried to do it from the platform and from cli, and in both cases appears the following error.

    Error evaluate from platform:

    [Wed May 24 11:25:29.547753 2017] [:error] [pid 25338:tid 139897838999296] [client] FastCGI: server "/usr/lib/cgi-bin/php5-fcgi" stderr: PHP message: PHP Warning: Unsupported declare 'strict_types' in /home/www/dev/dev-inserver/moodle/moodle33/admin/tool/inspire/predict/php/phpml/src/Phpml/Classification/Linear/Perceptron.php on line 3, referer:
    [Wed May 24 11:25:29.547780 2017] [:error] [pid 25338:tid 139897838999296] [client] FastCGI: server "/usr/lib/cgi-bin/php5-fcgi" stderr: PHP message: PHP Fatal error: Default value for parameters with a class type hint can only be NULL in /home/www/dev/dev-inserver/moodle/moodle33/admin/tool/inspire/predict/php/phpml/src/Phpml/Classification/Linear/Perceptron.php on line 73, referer:

    Error evaluate from cli:

    Analysing the site
    The site contents are calculated and stored in batches, during evaluation you can stop the process at any moment, the next time you run it it will continue from the point you stopped it.

    Processing site contents
    PHP Warning: Unsupported declare 'strict_types' in /home/www/dev/dev-inserver/moodle/moodle33/admin/tool/inspire/predict/php/phpml/src/Phpml/Classification/Linear/Perceptron.php on line 3

    Warning: Unsupported declare 'strict_types' in /home/www/dev/dev-inserver/moodle/moodle33/admin/tool/inspire/predict/php/phpml/src/Phpml/Classification/Linear/Perceptron.php on line 3
    PHP Fatal error: Default value for parameters with a class type hint can only be NULL in /home/www/dev/dev-inserver/moodle/moodle33/admin/tool/inspire/predict/php/phpml/src/Phpml/Classification/Linear/Perceptron.php on line 73

    Fatal error: Default value for parameters with a class type hint can only be NULL in /home/www/dev/dev-inserver/moodle/moodle33/admin/tool/inspire/predict/php/phpml/src/Phpml/Classification/Linear/Perceptron.php on line 73

    Please, could you tell me if I'm doing something wrong?

    Thank you
  • Fri, May 26, 2017, 8:47 AM
    Hi María,

    PHP 7 is required by the PHP machine learning library we are using. You can either use the python predictions processor or upgrade PHP to 7.x branch.

  • Wed, Sep 20, 2017, 11:50 AM

    Can I set up a custom installed activity module?
  • Tue, Sep 26, 2017, 7:44 AM
    Each activity module needs to be enhanced to support Inspire. Currently, the Core modules have been enhanced for Moodle 3.4. Third party or locally developed plugins will need to be updated by their maintainers to be included in Inspire calculations.
  • Elyse Crichton profile picture
    Tue, Nov 14, 2017, 9:14 AM
    For either 3.3 as a plugin or 3.4 in core, are these reports only able to be viewed/pulled in specific courses or could you pull them on a site-wide or program-wide basis? For example, could I look at all students in our Grad program vs all students in our Traditional Undergrad?
  • Tue, Nov 14, 2017, 3:54 PM
    Hi Elyse,

    - If you are talking about the students at risk model; from a user point of view this model insights are only available at course level.
    - If you are talking about the API for developers; it is up to the model to define the level (course, category, whatever internal organisation) where these insights will be generated; we provide default reports for the generated predictions (the insights report at the level the model defined) but the API allows each model to do basically whatever you want with the predictions generated by the system: From sending notifications to feeding external systems
  • Sun, Jun 27, 2021, 1:09 AM
    Does the plugin work in the moodle 3.9 environment?
  • Mon, Apr 18, 2022, 10:48 PM
    Up to Moodle version 3.3, this plugin's downloads and implementations stats are easily trackable.

    For example, as of today:
    Latest release: 5 years
    73 sites
    28 fans

    Starting Moodle version 3.4, this INSPIRE plugin is a built-in feature. How can I find the number of activations or active "implementations" of this feature?

    Any help really appreciated.
    Thanks a lot.
Please login to post comments