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
210 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

  • Heinz Schmolke
    Fri, 7 Nov 2014, 6:32 AM
    Ah, thank you. Now I' ve found it.
  • Tomasz Kępiński
    Fri, 7 Nov 2014, 11:20 PM
    hej, mam problem z blokiem (moodle 2.6.5), zainstalowany, wyświetla się, natomiast gdy chce wygenerować jakąś aktywność otrzymuje błąd: Błąd odczytu z bazy danych.

    Dokładniej:
    error/moodle/dmlreadexception
    W moodlu mam włączony raport błedów ale nic sie nie wyświetla.
  • Ray Di Mascio
    Fri, 14 Nov 2014, 12:48 AM
    Dear Lukasz,
    I have installed Timestat block on the course page ("on any page" in settings) but I get no results. No Records to display. Am I missing something please ?
    Many thanks,
    Ray
  • Heinz Schmolke
    Fri, 14 Nov 2014, 6:04 AM
    The same like me: No results. I added the timestat to course page but after visiting by participants nothing happens. No results. I'm using moodle 2.7
  • Heinz Schmolke
    Sat, 15 Nov 2014, 7:23 PM
    Unfortunately the block don't work in 2.7. If I click on "calculate" I got "0 results" although a lot of people worked inside the course.
  • Łukasz Sanokowski
    Tue, 18 Nov 2014, 5:57 PM
    Hi, timestat requires three things to work: 1: proper installation (with modification of core file mentioned in readme), 2: java enabled in browser and 2: adding this block to course page to get results. Have You done all of them?
  • Heinz Schmolke
    Wed, 19 Nov 2014, 5:31 AM
    Ok, lets see:

    1. I changed the code in moodle/lib/outputrenderers.php to " public function standard_end_of_body_html() {
    global $CFG;

    // This function is normally called from a layout.php file in {@link core_renderer::header()}
    // but some of the content won't be known until later, so we return a placeholder
    // for now. This will be replaced with the real content in {@link core_renderer::footer()}.
    $output = '';
    if (!empty($CFG->additionalhtmlfooter)) {
    $output .= "\n".$CFG->additionalhtmlfooter;
    }
    $output .= $this->unique_end_html_token;
    require_once($CFG->dirroot.'/blocks/timestat/lib/timestatlib.php');
    return $output;
    }"
    2. Java is enabled in Browser (Chrome)

    3. I added a block called "timestat" to every course. I can click in this block on the word "calculate", then a new page will open and I can change some settings (Period) and I have to push the calculate bottom again. But it says "no results". What is wrong?
    What is wrong? Thanks!
  • Ray Di Mascio
    Wed, 26 Nov 2014, 7:06 AM
    Aha ! The readme file. Yes, Lukasz, you're right, it works when I follow the instructions. Thank you for your patience !
    Ray
  • Ray Di Mascio
    Fri, 28 Nov 2014, 4:12 AM
    Hi again lukasz

    Timestat is now recodring times accurately thanks. BUT it creats a problem at login. I get xxxx/blocks/timestat/update_register.php?id=43318&time=8 and it just hangs there.
    I get the same results using it in 2.6, 2.7 and 2.8
    Regards
    Ray
  • Aurélie Malétras
    Thu, 5 Feb 2015, 12:06 AM
    Hi
    I work with Moodle 2.8.2+ (Build: 20150115).
    I have installed the block, enabled Legacy log, followed the modification of core file mentioned in readme, and checked Java is enabled in Browser. I added the "timestat" block to every page of my course.
    I logged with a studend count, opened a SCORM activity, a pdf document, and answered a quiz.
    I looged back on my admin/teacher count.
    Like Heinz Schmolke, when I click on “calculate”, whatever the settings, it says "no results".
    I activated the Debugging mode. Now when I click on “calculate”, it shows this message :
    add_to_log() has been deprecated, please rewrite your code to the new events API

    line 48 of /lib/deprecatedlib.php: call to debugging()
    line 140 of /blocks/timestat/index.php: call to add_to_log()

    Help, What should I do ?
    I need time stats, and your time traker is the only one with the 2.8 stamp. So I hope you’ll tell me how to fix it smile
    Thanks smile
  • Łukasz Sanokowski
    Thu, 5 Feb 2015, 4:12 PM
    Hi Aurelie

    Have You set time constraints in timestat report correctly (including time when Your student worked)?

    You don't need to add this block to every course, it works everywhere when after modification of core function.

    The warning with 'add_to_log()' is displayed because this is a legacy log function, please ignore it.
  • erika alarcon
    Thu, 26 Mar 2015, 5:00 AM
    Hi, I have the same issue as Ray in Moodle 2.7.5,

    When I log into Moodle appears a blank page:
    /moodle-27_actualizacion/blocks/timestat/update_register.php?id=&time=11

    I have to delete from /blocks/ to get into the platform.

  • Alberto Brandi
    Sun, 19 Apr 2015, 11:13 PM
    hi i install it from plugin install zip...but appear internal error can you help me please to install it correctly?

    thanks so much i have moodle 2.8.5
  • Stefania Gallazzi
    Tue, 28 Apr 2015, 9:45 PM
    Hi,
    I installed this plugin and everything work fine. Just a question is it possible to export the result in .csv or .xls file?

    Thanks a lot
    Stefania

    Thanks a lot
    Stefania
  • Łukasz Sanokowski
    Tue, 28 Apr 2015, 9:55 PM
    Yes, it is possible Stefania. Just change the last parameter on report list, from "Display on page" to "Download in excel format"
Please login to post comments