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:
802 sites
106 downloads
36 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
  • tarik yuce
    Dil, 4 Gur 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
    Qib, 20 Gur 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
    Kam, 15 Sad 2018, 12:12 AM
    It seems sources of block_use_stats are now here: https://github.com/vfremaux/moodle-block_use_stats/
  • Virangya Senevirathne
    Wix, 19 Onk 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
    Wix, 26 Ado 2021, 10:25 PM
    Hello,
    where can we access the logs? Which table contains the time logs in our database?
  • Daniel
    Kam, 20 Ado 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.
    Kam, 14 Ful 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
    Wix, 30 Onk 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
    Wix, 30 Onk 2023, 4:50 PM
    Hi Daniel, could you make code line appear using Developer Debug level ?
  • Daniel García
    Wix, 30 Onk 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
    Rob, 14 Gur 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
  • marcia mota
    Kam, 21 Bit 2024, 11:00 PM
    Hello,
    Is there any time frame for an update of the plugin to Moodle version 4.3?
    thanks


  • Panagiotis Doris
    Qib, 25 Wax 2024, 5:03 PM
    Same comment posted at trainning session plugin cause use_stats calculates the time and training session displays it.-> I've encountered a significant issue with the TrainingSessions plugin that affects its accuracy and reliability. When searching for activity time over different periods, extending the search period sometimes results in a lower total time, which is illogical. For instance, a search for the period 19/5 to 3/6 shows 35 hours, but extending the search to 19/5 to 4/6 reduces the total to 22 hours, despite additional SCORM activity on 4/6. Logically, the total time should remain the same or increase with a longer search period. This discrepancy indicates a bug that needs to be addressed for the plugin to be considered accurate and reliable.

    Please investigate and resolve this issue to ensure consistent and accurate reporting of training sessions.
  • Valery Fremaux
    Wix, 1 Ado 2024, 5:16 PM
    Answering to Doris : The reported use case points me to a possible use case : Use stats aims to measure the time spent in the last enrol session. That is : if a user has several enrolments in the same course, it would be possible to get a "masking" effect of some past time when enrol dates are reajusted. To avoid this masking effect we added a global setting to disable the enrol check when compiling log across a period. The most accurate versions of use_stats, constantly maintained are at https://github.com/vfremaux/moodle-block_use_stats. These are the branches we use on many projects, being used daily by reporters.
  • Panos Doris
    Rob, 9 Onk 2024, 5:26 PM
    Nope same error on trying to add the blog to a course-> 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 337 of \blocks\moodleblock.class.php: call to block_use_stats->get_content()
    line 231 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 4089 of \lib\outputrenderers.php: call to block_manager->region_has_content()
    line 70 of \theme\workplace\layout\drawers.php: call to core_renderer->blocks()
    line 1477 of \lib\outputrenderers.php: call to include()
    line 1403 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
    line 547 of \lib\outputrenderers.php: call to core_renderer->header()
    line 477 of \course\management.php: call to plugin_renderer_base->__call()

    Im so tired with this plugin. Ill try to find the issue on my own cause i dont see any solution from the creator. The plugin is installed in a brandnew moodle 4.1.3 with only a test course. Also training sessions has issues about array or object param at htmlrenderer.php at line 416. Thats from me. All brand new and still issues from loading the page.... i dont know what else to say. I just need to ask this. Does Moodle developers test the plugin before uploaded to Moodle plugin directory?
1 2 3
Please login to post comments