Timestat

Maintained by Elearnity Team
Timestat block measures users real activity time. Time is increased only when Moodle tab is active in browser.
Price option: Free

Supports Moodle 3.11-5.0 See all versions
Latest release: 1 year ago
Installations: 641
Downloads (last 90 days): 216

Frankenstyle name: block_timestat
Blocks

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

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.
Just added the problem with tracking the Assignment and other activities to the tracker:
https://tracker.moodle.org/browse/CONTRIB-5930
As a follow up to my post above, it appears that the problem is the following:
It appears the following line from timestatlib.php
$sql = 'SELECT max(id) FROM {log} WHERE userid=? and course=?';
does not return the correct id
So when one accesses an Activity (not a resource) from the course page, max(id) does not return the id pointing to the Activity, but the one before,pointing to the Course view, therefore even though one is on the acitvity page, the time gets increased for the log pointing to the course page view .
Now, the crazy thing is that if one accesses the Activity from the Upcoming Activities block, then everything works normally.
I think that the problem is occurring because the DB log for the activity gets created AFTER outputrenderers.php runs
require_once($CFG->dirroot.'/blocks/timestat/lib/timestatlib.php');
Thank you, Lukasz!
Members of our faculty brought to our attention that Timestat is logging correctly the time users spend on Resources (Page, Book, etc), but not the time they spend on Activities (Assignment, Forum, etc..)
After running a few tests, and checking the DB logs for Timestat, I can confirm that there is a problem with the reporting by Timestat.
Checking the html source for activities page, reveals that the >> start_of_url << is malformed and points to the wrong log item, therefore time spent on Activities gets logged in the wrong item in the DB.
Lukasz, you can use the same test server I did set up for you, enter the SAMPLE COURSE, and test Timestat for the 2 Resources and 2 Activities I have in that course.
Thank you
Hi I'm using Moodle 2.9.1 (Build: 20150706) and have this error:
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at elearning.mofp.pt Port 80
Does anyone knows the solution?
Best regards.
César Teixeira
no more blank page error here!
Thanks Lukasz
OK, please try latest version it the blank page appears after login.
Marc, Stefania, Ray - can You specify more details of Your system (OS, webserver, PHP, Moodle version etc) here: https://tracker.moodle.org/browse/CONTRIB-5729 ?
I had never have this problem which occur during logging in, and I need more details.
Komal, please update Timestat to latest version and try once again.
Hi ,
I am using Moodle 2.8 and installed Timestat and added Timestat block to one course and made following changes to moodle/lib/outputrenderers.php
changed following function:
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'); //added this line
return $output;
}
But We I click on calculate I am getting this errors with no records are getting displayed:
Class 'textlib' has been renamed for the autoloader and is now deprecated. Please use 'core_text' instead.
line 102 of \lib\classes\component.php: call to debugging()
line ? of unknownfile: call to core_component::classloader()
line 207 of \blocks\timestat\locallib.php: call to spl_autoload_call()
line 190 of \blocks\timestat\index.php: call to block_timestat_report_log_print_mnet_selector_form()
Am I missing something?
Thanks!
Hello, I'm using Moodle 2.7 and when I log into Moodle after logging out or the page timing out, timestat pushes to a web address and a blank page appears: http://education.markettraders.com/blocks/timestat/update_register.php?id=&time=1. Is this because the timestat plugin is not up-to-date (Even though I'm running an older version of Moodle).
Hi Lukasz
I installed Timestat and everithing is fine about reporting, but the plugin creates problems at login. I get xxxx/blocks/timestat/update_register.php?id=43318&time=8 and it just hangs there.
Can you help me?
I use version 2.6.
Thanks in advance
Stefania
Jason, precisely speaking it uses JavaScript, so Java is not required, but browser must run JavaScript scripts on your Moodle page.
Java support for NPAPI has been removed from Chrome (https://java.com/en/download/faq/chrome.xml). Is there anyway to use this plugin without java being required? This could be why people are unable to see data.
Hi
This block works with Legacy Log only.