Engagement analytics

Activities ::: mod_engagement
Maintained by Adam Olley
This is the indicator component of the Engagement analytics suite. Make sure to also get the report and block!
Latest release:
79 sites
8 fans
Current versions available: 2

Moodle Engagement Analytics for Moodle 2


This plugin is useless on its own, you should also get the report and block plugins that are part of the set.



Code: Adam Olley <adam.olley@netspot.com.au>
Code: Ashley Holman <ashley.holman@netspot.com.au>
Concept: Phillip Dawson <phillip.dawson@monash.edu>
Indicator Algorithms: Phillip Dawson <phillip.dawson@monash.edu>


This plugin is part of set Engagement Analytics.


Adam Olley (Lead maintainer): Developer
Ashley Holman: Developer
Phillip Dawson: Concept & Algorithms
Danny Liu: Developer
Please login to view contributors details and/or to contact them

Comments RSS


  • Mon, May 26, 2014, 8:34 AM
    Hi all,

    Latest version uploaded just now finally supports mod_assign in the assessment indicator. Thanks go to eugeneventer for his pull request.
  • Tue, May 27, 2014, 3:09 AM
    Hi Adam,

    Our Moodle is using Oracle 11g, so I got the following error when I go to course->report-engagement analytics:

    Debug info: ORA-00933: SQL command not properly ended

    SELECT rawdata
    FROM m_engagement_cache
    WHERE indicator = :o_param1
    AND courseid = :o_param2
    AND timestart = :o_param3
    AND timemodified > :o_param4
    ORDER BY timemodified DESC
    LIMIT 1
    [array (
    'o_param1' => 'assessment',
    'o_param2' => 482,
    'o_param3' => '1335844800',
    'o_param4' => 1401127527,
    Error code: dmlreadexception
    Stack trace:

    line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
    line 271 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
    line 1122 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
    line 1428 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_records_sql()
    line 1056 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->get_record_sql()
    line 1501 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_record_sql()
    line 156 of /mod/engagement/indicator/indicator.class.php: call to moodle_database->get_field_sql()
    line 132 of /mod/engagement/indicator/indicator.class.php: call to indicator->get_cache()
    line 111 of /mod/engagement/indicator/indicator.class.php: call to indicator->get_risk_for_users()
    line 94 of /report/engagement/index.php: call to indicator->get_course_risks()

    The fix I have put in mod/engagement/indicator/indicator.class.php is:

    $rawdata = $DB->get_field_sql('
    ! SELECT rawdata from
    ! (SELECT rawdata
    FROM {engagement_cache}
    WHERE indicator = ?
    AND courseid = ?
    AND timestart = ?
    AND timemodified > ?
    ! ORDER BY timemodified DESC)
    ! where rownum = 1', $params);

    Not sure whether you can integrate it into your plugins or not. Just wanted to let you know.

  • Tue, May 27, 2014, 3:12 AM

    Other than that error, the engagement analytics plugins version 2.6 is working fine in our Moodle 2.6.2 .
  • Matt Bury
    Tue, Jun 24, 2014, 2:25 AM
    Thanks for the updates Adam. I now have the mod, report, and block running on Moodle 2.6. I think these plugins are useful and have great potential so thank you for contributing them.

    I have a number of dummy accounts enrolled on a course for testing purposes, they have example info on their profile pages and profile pictures (edited by me as an admin) but I've never logged in under those accounts. The course has forums, chats, and wikis on it.

    From the sitewide config page: moodle/report/engagement/manage_indicators.php?contextid=1 I see that it only monitors Assessment (presumably pushed grades?), Forum, and Login activity. Are there any plans to include other core Moodle activity modules?

    Also, it'd be nice to have some documentation collated somewhere so that it's easier to get started and to understand how it works, e.g. How does it calculate the percentages it shows?

    Thanks in advance smile
  • Tue, Jun 24, 2014, 8:03 AM
    Hi Matt,

    There are no immediately plans for me to make additional indicators right now. That said, nothing stopping people making their own to share, like Dan Marsden did for the attendance module:

    As for developer documentation, I did write some up when this was released, you can find it here:
    It includes a couple basic examples of things that I hope are helpful smile
  • Mon, Oct 20, 2014, 7:38 PM
    Hi, I am wondering is there any more recent documentation available for writing additional plugins. I really need to have an indicator based on downloading (opening) course related material as well. While this is not strictly engagement in our case it is an indicated of success as we use Moodle to host all class handouts and activities as well. Would someone be able to post me in the correct direction? Thanks!
  • Wed, Apr 1, 2015, 7:57 PM
    Hi, I have installed engagement analytics in moodle 2.6 (mod, block, report).
    The results for assessment and login are exact, while in the forum section of the report users either have 100% risk (even if they have read posts), either 69% risk that doesn' t change no matter if some students have made many posts or if i change the settings (e.g. Min risk 0.1 (posts, read, etc), max 0). The problem (standard percentages that don't differentiate for each user) exists for all the forum indicators (posts, total posts, replies).... Thanks!
  • Thu, Apr 30, 2015, 5:39 AM
    good afternoon

    I would like to help me with this error that I get in my moodle , moodle my version is 2.8.5

    Capability "report/engagement:manage" was not found! This has to be fixed in code.
    line 389 of \lib\accesslib.php: call to debugging()
    line 1299 of \lib\adminlib.php: call to has_capability()
    line 3639 of \lib\navigationlib.php: call to admin_externalpage->check_access()
    line 3671 of \lib\navigationlib.php: call to settings_navigation->load_administration_settings()
    line 3671 of \lib\navigationlib.php: call to settings_navigation->load_administration_settings()
    line 3622 of \lib\navigationlib.php: call to settings_navigation->load_administration_settings()
    line 3471 of \lib\navigationlib.php: call to settings_navigation->load_administration_settings()
    line 719 of \lib\pagelib.php: call to settings_navigation->initialise()
    line 768 of \lib\pagelib.php: call to moodle_page->magic_get_settingsnav()
    line 6592 of \lib\adminlib.php: call to moodle_page->__get()
    line 34 of \admin\reports.php: call to admin_externalpage_setup()
  • Fri, May 1, 2015, 11:23 AM
    @Jose Mesa: That's odd. Did the plugin install correctly? Can you see the capability listed in the report/engagement/db/access.php file?
  • Thu, May 7, 2015, 4:49 AM
    Adam Olley and install the three plugins correctly there are no errors but now my problem is how do I genererar the report, I do not get the tab Engagement analytics reporting could help me with that please Thanks .
  • Fri, Jun 5, 2015, 10:38 PM
    I am running Moodle 2.7 with the Engagement Analytics installed. The Login Activity is not reporting any information, although I know the students are logging in. Is there any way to get login activity added back into the analytics? Although the assessment activity is important, I really would like to know how the login activity is affecting the grades.
  • Tue, Jun 23, 2015, 4:20 AM
    Any chance this one will make it to the 2.8 branch?
  • Sat, Aug 8, 2015, 8:14 AM
    I am running Moodle 2.7 with the latest Engagement Analytics installed, v2014042902. It can take hours for the Assessment Activity and Forum Activity numbers to update following student activity. How quickly should the Engagement Analytics update when an assessment or forum post occurs? What triggers the update?

    Note that the Login Activity counter does not work for me. EA always reports "Never logged in" for every student, no matter how many logins have occurred. Thanks for any help!
  • Thu, Oct 15, 2015, 9:53 PM
    Love this plugin, but the "Login Activity" reporting part has not worked since we upgraded to 2.8 with any combination to the setting and weightings. Are there any plans in the works to update the plugin to work with 2.8? It would be greatly appreciated!!!
  • Tue, Dec 5, 2017, 5:02 AM
    Hello! I installed block_engagement and report_engagement to Moodle 3.3 just fine, but when I try to install mod_engagement, I get the following error:

    Downloading mod_engagement ... OK
    Validating mod_engagement ... Error
    [Error] Unsupported syntax detected in version.php file [$module]
    Installation aborted due to validation failure

    Could you tell me what I should do? Thank you so much for your help!
Please login to post comments