You can place Your feedback of Timestat Block here.
I have uploaded your timestat block to my moodle site lib folder and added the code to the lib.php file. Now what do I need to do to activate it?
It does not show up on my Manage Blocks list
I have managed to resolve my own problem - I did not know that I had to to load the module in the 'BLOCKS' folder - I copied everything only in the 'LIB' folder.
I've tested it and it seems to work OK - it seems to be registering current usage - but is not able to gather data on usage before it was installed.
I think this is going to be a very useful tool. Up to now time time stats and usage were very difficult to collect efficiently - and those two elements seem to me to be fundamentally important infomration for an on-line course.
Very well done and many thanks for creating this! I look forward to using it.
I successfully installed timestat in my Moodle 1.96 website - and it works perfectly. I now want to instal it in a Moodle 2 website - but I have hit on a problem. The Coding in the Weblib.php file in moodle 2 is different from Moodle 1.9. and I don't know where to paste the piece of code. I tried guessing - but received error message when I logged into Administration.
Is the timstat compatible with Moodle 2? If so where do I paste the code?
I followed the readme.txt instructions and got it installed on my site http://scm.moodleace.co - MANY THANKS and it works!
I noticed that it started calculating the time starting from when I
installed it. WOW! I wish that I could have had this block back in
November 2010 when my college semester started!!!
Anyway, this is a much welcomed block to monitoring student usage
of my Moodle site.
It causes a problem with the "Login/Logout Block". After logging out from the Login/Logout block, I re-type my user name and password and then click on the Login link of the "Login/Logout Block" - I can't login. LOL!
Anyone else face the same problem?
This is weird. I understand that your Moodle platform with Timestat block works everywhere except login block..
I can not reproduce this error on my platform, so its difficult to point what is the problem.
My problem is when I click on the Login button, I get thrown to a blank screen. The address bar on my Mozilla Firefox reads:
Since you TimeStats block was so simple to use, EFFECTIVE and simply BRILLIANT, I had to TRY to solve my login problem. So I reinstalled your block.
I then revisited the problem and this time, I removed this line:
from the update_register.php file, and the problem went away!
Now I can login with no problems.
However, this is NOT how I should solve it because the block
keeps recording my time spent online even after I have logged
out! So I am back to square one....by the way, I am using
Frankie Kam, Malaysia
//require_login(); <-- I commented out this line!
//now I can login without any problems
//but the block no longer gives
//an accurate record of time spent!!!
//Pobierany jest rekord o przeslanym ID oraz dodany do niego zostaje obliczony czas, przeslany w zmiennej TIME.
//Get record with sent ID and add to it counted time, sended in variable TIME
Block appears to be caluculating well, but I get error message 'This block has not been implemented correctly and thus cannot provide a configuration interface' when I try to edit the block.
Have I done something wrong? I have installed twice.
Indeed this block have no configuration. I will swich configuration button off.
Tukasz, thanks for such wonderful block, this is exactly what we are looking for and it should be added to the Moodle core blocks!!
By the way, I noticed that in the "readme" file, it mentioned that "Measured activity time is incremented only when user perform operations using themouse or keyboard." Can you explain a little bit more about how the time is calculated (what "counts" and what does not count?)
Also, if there are a lot of "resources" (e.g. videos or SWF files, etc.) linked under a course, is there a way to track how much time students are spending on using these "resources"? We only care about when they "opened" (clicked) on a certain resource, and when they"closed" the resource, and would like to track the time between and would consider that they were using this "time frame" for reading.. If we want to do that which part (function and php file) should we modify the codes? Thanks a lot!
Your block is very interesting, and it will be useful to use it also in "Course dedication block" mode. This block use only the Log DB table to create time intervals. Many actions doesn't create a record in Log table (SCORM action, ect.). So time measurement in many cases (long scorm lesson) it's very inaccurate.
Your block can resolve the problem. How can i adapt the block to use it like "Course dedication block"? Your block use a DB table to record user action?
By the way, have anyone tested this block with the latest Moodle 1.9.11? It seems that there are some bugs with the permission. In 1.9.11, if I login as a teacher, I could add this "Time stats" block, but I could not configure it (but with admin permission I could)... just a quick FYI...
Also, I noticed that with Moodle 1.9.11 (maybe some 1.9.x versions as well?), now I'm getting a lot of redirect to http://localhost/blocks/timestat/update_register.php?id=xxxx&time=xx AFTER I login, and the page will just go blank.. any idea why is that? Thanks!
I have the same problem, some time ago I send this comment and the block creator told me that may be a problem with file and folder permissions, I modify the permissions and the problem had not fixed.
If in the blank page (with the URL you mentioned before) you enter the URL of the main page, you enter to the system and the block operate well, but you have to do that every time you login.
I tried to modify the lib to redirect to the main page, but it doesn't work well and for job problems I couldn't continue working on it.
I have finally managed how to reproduce this error, lol
This is weird, because application works perfectly on both of my Moodle instances. I installed completely clean version of Moodle 1.9.11, and I noticed 'login blank page error' there - so now I can try to solve Your problem - be patient.
Which version of Moodle do You use (where login blank page error occurs)?
Please download latest version of block from server. I think that I resolved problem with blank login page. Addidtionally there were some security improvements made, and all files are placed now in /timestat/ block folder.
Please give here a feedback if blank page after login still ocurrs after update of this block.
Before all, thanks a lot for your support in this problem, unfortunately, I update the block, but the problem it's still present.
I'm using Moodle 1.9.9 Build 20100609, PHP 5.2.9 and mySQL client version 5.0.67
After login, a blank page appears, and I have to enter the main page addres to access Moodle, after I do this, the block operate well.
But there is something diferent from the last version.
The problem only occurs when I try to login in an open browser after I logged out from Moodle.
If I logged out and close the browser, then when I open a new browser and I login into Moodle, the block works fine.
I will suggest my Moodle users to do that, when they logged out from a Moodle sesion and want to login again, they have to open a new browser sesion.
Thanks again for your great block.
Martin, please try to use file which I attached to this post. I am waiting for Your reply.
Great job Lukasz,
The block works very well.
Thanks a lot for your great job and to share this block.
PS. All the stats are showed at course level, is there any way to see the stats of all the courses in a single report using your block?
Excuse me Lukasz,
The problem with the blank page was fixed, but it's still present the problem with the "teachers" configuration and usage of the block.
When I login as Teacher, I can add the block, but I can't configure or use it, is this normal?
Thanks in advance for your help.
All the stats are showed at course level, is there any way to see the stats of all the courses in a single report using your block?
Nope, there is no such a feature included.
If You want to allow teachers using this block, You need to edit permissions for teacher role, and set parameter 'block/timestat:view' to 'Allow'.
When you say that all files are placed in the timestat folder and some security improvements were made. Do we still have to modify the core file weblib.php?
Hi i am having a problem i have installed the timestat block but it appears its not working, when i turn debugging on i get the below:
ERROR: column "l.id" must appear in the GROUP BY clause or be used in an aggregate function
SELECT DISTINCT l.id, l.time , sum(l.count) as sumtime,l.cmid,u.username,u.firstname,u.lastname,c.fullname FROM mdl_log l JOIN mdl_user u ON l.userid = u.id JOIN mdl_course c ON l.course=c.id WHERE u.username!='guest' and l.course=2033 and l.cmid in (0,23727,17382,17384,17957,18286,27245,27247,27248,27249,23726,17383,17757,23482,23717,18045,27015,27624,18006,17955,17971,22737,21034,23485,23484,23483,23247,17949,17950,18039,18041,21037,21040,21038,17946,18042,18043,20744,20745,20746,21035,23624,21555,17953,17942,17948,21870,21556,17945,21039,18047,18044,18037,17951,18046,21036,23299,23625,23626,23627,23628,23629,23630,23631,23632,24991,27801,17952,20175,18168,18240,18243,18245,18244,18239,18242,18238,18241,27357,27356,27352,27350,27359,27353,27355,27354,27351,27349,27358,27363,27361,27360,27362) and u.lastname LIKE '%' group by l.userid order by u.lastname
ERROR: column "l.id" must appear in the GROUP BY clause or be used in an aggregate function
SELECT DISTINCT l.id, l.time , sum(l.count) as sumtime,l.cmid,u.username,u.firstname,u.lastname,c.fullname FROM mdl_log l JOIN mdl_user u ON l.userid = u.id JOIN mdl_course c ON l.course=c.id WHERE u.username!='guest' and l.course=2033 and l.cmid in (0,23727,17382,17384,17957,18286,27245,27247,27248,27249,23726,17383,17757,23482,23717,18045,27015,27624,18006,17955,17971,22737,21034,23485,23484,23483,23247,17949,17950,18039,18041,21037,21040,21038,17946,18042,18043,20744,20745,20746,21035,23624,21555,17953,17942,17948,21870,21556,17945,21039,18047,18044,18037,17951,18046,21036,23299,23625,23626,23627,23628,23629,23630,23631,23632,24991,27801,17952,20175,18168,18240,18243,18245,18244,18239,18242,18238,18241,27357,27356,27352,27350,27359,27353,27355,27354,27351,27349,27358,27363,27361,27360,27362) and u.lastname LIKE '%' group by l.userid
could anyone plaese please help
Thanks in advance
This block was developed on Moodle based on Mysql server. It has never been tested on Postgres. I actually still use mysql Moodle database only. This problem most probably comes from different syntax of query mentioned by You. You can try to change this query to satisfy Postgres syntax.
Still not ready for prime time. The block worked fine and login was not a problem from the login block on the main page.
Whenever I logged in from the regular login / create a new account page -- only a blank page appears.
I would like to use this module, however the blank page is a major issue.
Are there any suggestions?
Jesse, are You using latest version of block?
Your block works fine on my site now. No more problems with the login.
I do have an observation. When I clicked the download button to download
the stats in Excel format, there was no feedback that the file had been downloaded. Actually it did but I had to do it twice before i finally checked my "My Documents/Downloads" folder. Am using MFirefox. Just thought I'd let you know that if it gave some feedback on screen, that would be better.
Probably, You have Your browser set up to automatically download files to folder "My Documents/Downloads", without asking. File is small so it takes very short time.
I don't see necessity of creating a page 'You downloaded a file' ;)
Howewer, thanks for Your contribution, Frankie.
I have downloaded the timestat block. I read the readme wfile which said edit the weblib.php. There is no file called this in the zip. I read the history and thought perhaps the changes that had been made made that file obsolete and the code required antered correctly.
I copied it to my Moodle/ blocks folder. There is nothing in my Moodle notifications folder to say there has been a change and the block isn't appearing in the block list.
Can you help please?
If You want to do this, edit file block_timestat.php, and edit line 81, change:
'site-index' => false,
'site-index' => true,
and please write here if it is working correctly on front page.
This is great! Is there any chance that I can use this to show a block for each user which shows how much time they have been in a course that has an activity lock? I want the users to be able to see how much time they have been in the course so they know how much longer they need before they can take the final. Any help would be greatly appreciated. Thanks again.
I spent a couple hours of time trying to run timestat. Now i cannot get any data in report. Form after choosing criteria do not return any data. Moodle 1.9.12+.
Any idea?, maybe I should send anny additonal data?
After some more investigetion:
- table mdl_log in field count have data
- function create_time_array from printlib.php return array without results
- sql query executed in printlib.php in line 340 seems to have syntax error on sql server 2008. The executed query is:
SELECT DISTINCT l.id, l.time , sum(l.count) as sumtime,l.cmid,u.username,u.firstname,u.lastname,c.fullname FROM mdl_log l JOIN mdl_user u ON l.userid = u.id JOIN mdl_course c ON l.course=c.id JOIN mdl_role_assignments ra ON l.userid=ra.userid WHERE u.username!='guest' and l.course=2 AND ra.contextid IN (10,3,1) AND ra.roleid=5 and l.cmid in (0,1,5,2,4) and u.lastname LIKE '%' group by l.userid, l.course, l.cmid, ra.contextid order by u.lastname
and it returns error:
Column 'mdl_log.id' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Are there any know bugs for sql server?
Pozornie jest to nie na temat, ale instalując twój blok, a chyba dopisując coś w weblib.php (wdług Twojego zalecenia) "zepsułem" inny blok Chat console.
Oto bowiem od tego momentu wysakuje mi taka uwaga w miejscu tego bloku (patrz załącznik i zwróć na moje żółte podkreślenie). Ten bład wyskakuje mi jednak tylko w IE9 - w Mozili juz nie (?)
Masz jakis pomysł?
Hello. We have installed timestats and love it! I have a question about what has happened to my notifications page, however. We get the following message and selecting the continue button does nothing. We are stuck on this page.
Thank you for any suggestions you might have.
I cant reproduce this error. Which version of Moodle do You use.
Hello, I installed this block, it works properly. However, it doesnt count the time of the file modules, for instance, pdf file shared as a file in the course. How can I handle it?
I have tried to install the module timestat in windows system and linux system.
On the windows system,I installed xampp (windows)1.7.1 and moodle 1.9.13, and found the module works very well.
But on the ubuntu system(11.10),I installed xampp (linux) 1.7.1 and moodle 1.9.13,the module can't be installed.
It is not compatible with the current version of Moodle(1.9.13).
It is very strange,could you help me ? Thank you very much.
We are using Moodle 2.3.X Does anyone have Timestat running on this version?
The timestat block was for 1.9 so is unlikely to work in Moodle2 - have you tried looking at the Attendance block? would that do what you are looking for?
Cool, I'll give it a try and post feedback. It's a shame Moodle doesn't have this sort of functionality already built in, we badly need a reporting mechanism that gives us total time spent by students in courses, and later what activities they spent most of their time on.
Hopefully, the Moodle developers will get round to including this in future builds.
I'm working with Lukasz on raising funds to have this block upgraded for Moodle 2.5 and 2.6 and have pledged about 20% already. If you're interested in making this happen (It will be released at Moodle.org) please help by contributing at www.moodlegarage.com. More info at http://www.moodlenews.com/2014/community-funding-timestat-block-for-moodle-2-5-and-up/
I am using moodle 1.9.19 version for my moodle site. I am facing issues with timestat blcok:
1) I copied timestat block to moodle/blocks folder successfully
2) I copied the line given in readme file into moodle/lib/weblib.php
3) when i clicked on notifications, it displayed a messgage saying timestat installed successfully.
Issue: This timestat block is not visible in blocks list (even after restart).
Kindly provide me a solution at the earliest pl.