Timestat

Blocks ::: block_timestat
Maintained by Jorge C.
Timestat block measures users real activity time. Time is increased only when Moodle tab is active in browser.
Latest release:
321 sites
213 downloads
42 fans
Current versions available: 1

This block measure time of real activity done by Moodle users.

Installation

Install block in standard way (copy it to '/moodle/blocks' folder and click 'Notifications' in admin panel) or install it directly from the Admin panel.

Usage

The block only counts the time on the pages to which it has been added, so you need to add the block on the pages where you want to count the time. If you want to add the block on the course page and on all activity pages at once, please refer to the following documentation: https://docs.moodle.org/400/en/Block_settings#Making_a_block_sticky_throughout_a_course

The block accounts for student inactivity, identified by no interactions such as clicks or scrolling. To prevent counting time during periods of inactivity, the tracking feature automatically pauses when a student is inactive for an extended period. You can customize the maximum inactivity time in the settings. It's also possible to adjust how often the recorded time is saved.

The block offers a visual time counter, visible to users with specific permissions (block/timestat:viewtimer) or to all users enrolled in the course, if enabled in the settings. Time is tracked even if the block or counter isn't visible to a student. Additionally, the block includes a link to a detailed report on time spent, with filters for course, activity, and user. Initially, only roles such as editing teachers, teachers, course creators, managers, and admins can access this report. The 'block/timestat:viewreport' capability allows extending access to other roles.

To use the block within the Quiz attempt page, configure the quiz settings to 'Show blocks during the attempt' by going to Quiz > Edit Settings > Appearance > Show more.

You can access the plugin settings from Site Administration > Plugins > Blocks > Timestat.

More information

The version of the plugin for Moodle 2.9 and earlier was developed by: Barbara Dębska Łukasz Musiał Łukasz Sanokowski

Upgrade from Moodle 1.9 to Moodle 2.5 version was made thanks to contribution of: Classroom Revolution Lib Ertea Mart van der Niet Joseph Thibault

Upgrade from Moodle 3.11 to Moodle 4.2 version was made thanks to contribution of: Institut Obert de Catalunya (IOC)

License

Licensed under the GNU GPL License.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

Jorge C. (Lead maintainer)
Łukasz Sanokowski: Original Developer
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Komal Barde
    Fri, 9 Oct 2015, 4:50 PM
    Hi ,

    I am using Moodle 2.8 and installed Timestat(release 1.2.1) and I have added it to one course and it is displaying all records correctly.
    But when user logins to to LMS it is directing user to http://localhost/moodle/blocks/timestat/update_register.php?id=2921&time=22 URL and it displays blank page.
    Why this is happening? Am I missing something?

    Thanks,
    Komal.
  • Łukasz Sanokowski
    Mon, 12 Oct 2015, 9:52 PM
    Komal, please try latest version (1.2.2.1)
  • Komal Barde
    Tue, 13 Oct 2015, 4:14 PM
    Hi,
    Thanks for your reply.
    I have tried with latest version also,still facing same problem.
  • Komal Barde
    Wed, 4 Nov 2015, 1:56 PM
    Hi,

    I have instilled timestat block(release 1.2.1) on moodle 2.8.
    But when user is just enrolled one course and user visit the course for first time and suppose user spent10 min on course.
    Then I go to block and then click on 'Calculate',it does not show any record.
    But when user visits course for second time and spent 5 min. Then I go to block and then click on 'Calculate',it shows record for 2 visit that is course with 5 min spent on course.

    Why this is happening? Am I missing something?

    Thanks,
    Komal.
  • Komal Barde
    Wed, 4 Nov 2015, 2:17 PM
    Also addition to above note I have tried with latest version,but still facing same issue.
  • Stefano Rossi
    Fri, 20 Nov 2015, 10:53 PM

    Good morning,
    I installed its plugin, made various changes and php activated log_legacy, the problem is that does not count the right time.

    For example we have entered a time MINIMUM to complete a lesson, 2 hours, in order to unlock the voice CERTIFICATE and download a certificate of course completion.
    But when I go to counted per time with timestat it tells me 12 minutes, when it is impossible to complete the lesson because you have to put two hours, and I see that log_standard began the lesson at 13:04 and ended at 15:30.

    Why timestat makes me a count wrong?
  • Anderson Hsu
    Sat, 16 Apr 2016, 9:04 AM
    Dear partners,
    We found after install timestat blocks, the speed of moodle website become a little slow. Is there any suggestion for adjust the question ? Thank you.
  • Łukasz Sanokowski
    Mon, 18 Apr 2016, 4:35 PM
    Hi Anderson

    Timestat have some influence on overall Moodle performance. It have to store data (amount of time spent online) in database. The query is executed on exit of every displayed webpage (for example on reload, going to another url etc.). During this there is executed query which find latest record in log table of particular user in particular course. If the log table is big, this query can take some time, especially on slow server. If the speed now is too slow for you, consider improving performance of your server (that is the obvious answer ;), or reduce size of the log table - timestat works on legacy log table, there is a parameter named "loglifetime" when you can set a maximum lifetime of log entries.

    Regards
  • Sudhanshu Gupta
    Wed, 15 Feb 2017, 7:28 PM
    Hi,
    Your plugin is not working in Moodle 3.1 as you are retrieving the data from legacy log which is disable in 3.1 version. so do we have any method to resolve this issue.

    Looking forward for your reply.
  • Anderson Hsu
    Tue, 9 May 2017, 8:50 PM
    Dear partners,
    If there sql example which we can join mdl_block_timestat and mdl_log table to list time spent by course or account ? Thanks a lot.
  • Łukasz Sanokowski
    Wed, 10 May 2017, 3:19 PM
    Hello Anderson

    There is no fixed SQL query build in. The query is generated dynamically with use of parameters set in this app form.
  • Anderson Hsu
    Wed, 10 May 2017, 9:57 PM
    Dear Łukasz Sanokowski
    I can use phpmyadmin or other plugin to use sql query, but I don't know it's relationship between mdl_log and mdl_block_timestat. (I don't know the field definition of mdl_block_timestat)
    Thanks a lot.
  • Łukasz Sanokowski
    Thu, 11 May 2017, 3:11 PM
    The table mdl_block_timestat contains a "log_id" field which references to particular record in mdl_log table. The "timespent" field is a time, measured in second, which was spent on Moodle site, on page which is described in "mdl_log" table with "mdl_log.id" = "mdl_block_timestat.log_id"
  • Anderson Hsu
    Sun, 14 May 2017, 4:41 PM
    Dear Łukasz Sanokowski,
    What is the unif of timespent field in the mdl_block_timestat table ? It's by minute or second or hour, how to count it's real time ? Thanks a lot.
  • Łukasz Sanokowski
    Tue, 16 May 2017, 7:50 PM
    Time stored in database field is in seconds format.
Please login to post comments