Use Stats

Blocks ::: block_use_stats
Maintained by Valery Fremaux
Provides time base use stats indicators. The compilation library is used by the "training session" report plugin.
Latest release:
855 sites
316 downloads
37 fans
Current versions available: 17

CHANGE :   We have spent time enough to use Moodle Plugin Maintenance API to support automated plugin update chain from our internal development workflow.

This block samples the user's log records and thresholds the activity backtrace. The main hypothesis is that any activity type unless offline activity or in-classroom activity may underlie a constant loggin track generation.

The block compiles all log events and summarizes all intervals larger than an adjustable threshold. Compilation are also made on a course basis.

This is the community version that comes with the "core" feature set of this plugin.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Valery Fremaux (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Valery Fremaux
    Wed, 22 Feb 2017, 6:40 PM
    Hi all, new version of the use_stats plugins has been deeply reviewed to optimize many of the queries and time records processing. This could be done thaks to some of customers that had imperative high duty report output. Compiling time correctly in Moodle considering all possible bias (technical and behavioural) is far from a trivial calculation, but we hope we come now to enough maturity of the process. We ye would like in the future to be more performant on time range queries. At the moment a new caching strategy has been added to save precompilation results for a user/exact timerange pair. I'm sure there are better ways to optimize this. Cheers. Note that the Training Sessions report also has been reviewed and is on publishing process. Note finally that I am changing a bit the publishing strategy. Users are asking more and more accuracy and reliability of the plugins. This needs a huge work on my 130 plugins. The new distribution strategy will offer 2 distributions of the qualit demanding plugins. Community is published here for anyone. Pro version will add performance, additional productvity features, more formats, interoperability, webservices, required by a professional exploitation of the plugins. Cheers
  • Dinis Medeiros
    Thu, 16 Mar 2017, 1:02 AM
    Debug info: Duplicate entry '76-1488365176' for key 'mdlvn_blocusestatsess_uses_uix'
    INSERT INTO mdlvn_block_use_stats_session (userid,sessionstart,sessionend,courses) VALUES(?,?,?,?)
    [array (
    0 => '76',
    1 => '1488365176',
    2 => 1489017289,
    3 => '11,0',
    )]
    Error code: dmlwriteexception
    Stack trace:

    line 482 of /lib/dml/moodle_database.php: dml_write_exception thrown
    line 1259 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
    line 1305 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
    line 641 of /blocks/use_stats/locallib.php: call to mysqli_native_moodle_database->insert_record()
    line 124 of /blocks/use_stats/detail.php: call to use_stats_aggregate_logs()
  • bea val
    Tue, 16 May 2017, 4:06 PM

    Hi, I would like to know how to access the information of use stats.
    Thanks.
  • Virangya Senevirathne
    Tue, 14 Nov 2017, 3:40 PM
    Hi,
    Thanks for your plugin use stats. Its very helpful.
    Unfortunately I faced an issue. We have been using it for many months now and the things were okay. But on the end of October , after i gathered teachers working hours, many complained that the values they noticed are lot higher than the statistics i sent. Same issue was complained by many number of teachers. One has even sent a screen shot. According to few complains, statistics have been reset at the middle or at the end of the month.
    Nothing has been changed from my side and i'm wondering what might have coursed this, as i have checked the hours many times to see no difference.
    I would like to know the location of log files, is it a database table or a file containing data?
    What might have coursed this? Have you came up with similar issues before? How to get around this and how to prevent it from happening in the future?
    I really appreciate your quick response and help regarding this.
    Thanks in advance.
  • tarik yuce
    Sun, 4 Feb 2018, 6:39 AM
    hi,
    my moodle version is 3.4.1+
    i downloaded use blocks latest version Release 3.4.0 (build 2017090600)
    but there are installation problem:
    "[Error] Required Moodle version [2018110800]
    Installation aborted due to validation failure"
    what is wrong?
  • tarik yuce
    Tue, 20 Feb 2018, 2:18 AM
    help please,
    i can not installation Use Block latest release 3.4.0(build 2017090600) on moddle 3.4.1+
    is it not compatible with moodle 3.4.1+ ???
  • Thierry SEBBAR
    Thu, 15 Nov 2018, 12:12 AM
    It seems sources of block_use_stats are now here: https://github.com/vfremaux/moodle-block_use_stats/
  • Virangya Senevirathne
    Mon, 19 Oct 2020, 12:37 PM
    Hello!
    In the report it shows "Other" appart from the time spent on lessons. What does this Other mean? Your prompt reply is highly appreciated. Thank you.
  • maria oikonomidi
    Mon, 26 Jul 2021, 10:25 PM
    Hello,
    where can we access the logs? Which table contains the time logs in our database?
  • Daniel
    Thu, 20 Jul 2023, 12:29 AM
    Bonjour,
    Sur mes plateformes 4.2 mises à jour, j'ai systématiquement ce message d'erreur quand le tente d'installer ce bloc dans un cours.
    Exception : Attempt to assign property "elapsed" on null
  • Abdon G.
    Thu, 14 Sep 2023, 11:15 PM
    Hi
    I installed this plugin, but when I added it to a course gave this error:
    moodle Exception - Attempt to assign property "elapsed" on null

    I'm using moodle 4.2.1, anyone have an idea how to fix it?
  • Daniel García
    Mon, 30 Oct 2023, 4:21 PM
    Hello, I'm having the same issue, when I add the block to the course, the entire course crashes with this error message:

    "Exception - Attempt to assign property "elapsed" on null"

    Any idea of what could be causing this?

    I'm using Moodle 4.0.8

    Thanks in advance smile
  • Valery Fremaux
    Mon, 30 Oct 2023, 4:50 PM
    Hi Daniel, could you make code line appear using Developer Debug level ?
  • Daniel García
    Mon, 30 Oct 2023, 7:06 PM
    Hello again, I was able to quickly enable the debugging to get the error and disable it. This is with the old version of the plugin 2017090600

    Here's what it said:

    Error
    Exception - Attempt to assign property "sessionstart" on null
    Debug info:
    Error code: generalexceptionmessage
    Stack trace:

    line 388 of /blocks/use_stats/locallib.php: Error thrown
    line 159 of /blocks/use_stats/block_use_stats.php: call to use_stats_aggregate_logs()
    line 341 of /blocks/moodleblock.class.php: call to block_use_stats->get_content()
    line 235 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
    line 1222 of /lib/blocklib.php: call to block_base->get_content_for_output()
    line 1280 of /lib/blocklib.php: call to block_manager->create_block_contents()
    line 377 of /lib/blocklib.php: call to block_manager->ensure_content_created()
    line 27 of /theme/lambda/layout/columns3.php: call to block_manager->region_has_content()
    line 1477 of /lib/outputrenderers.php: call to include()
    line 1403 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 238 of /course/view.php: call to core_renderer->header()

    Here's what it says with the version for moodle 4.0:

    Error
    Exception - Attempt to assign property "elapsed" on null
    Debug info:
    Error code: generalexceptionmessage
    Stack trace:

    line 414 of /blocks/use_stats/locallib.php: Error thrown
    line 161 of /blocks/use_stats/block_use_stats.php: call to use_stats_aggregate_logs()
    line 341 of /blocks/moodleblock.class.php: call to block_use_stats->get_content()
    line 235 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
    line 1222 of /lib/blocklib.php: call to block_base->get_content_for_output()
    line 1280 of /lib/blocklib.php: call to block_manager->create_block_contents()
    line 377 of /lib/blocklib.php: call to block_manager->ensure_content_created()
    line 27 of /theme/lambda/layout/columns3.php: call to block_manager->region_has_content()
    line 1477 of /lib/outputrenderers.php: call to include()
    line 1403 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 238 of /course/view.php: call to core_renderer->header()

    I also see that when installing the plugin for the 4.0 it gives a warning about some english language values being null "Multiple English language files found [null]"

    I also posted this in github, please feel free to reply in any of these sites just to not duplicate the answers

    Thanks in advance smile
  • Laëtitia Breton
    Wed, 14 Feb 2024, 1:36 AM
    Bonjour,
    J'utilise la version 3.4.0, qui pour le moment me va très bien.
    Je voulais savoir s'il était possible d'étendre la période max du tracking pour des formations en 2 ans par exemple.
    Merci d'avance
1 2
Please login to post comments