User's accumulative time spent in course

User's accumulative time spent in course

by Javier Tejera -
Number of replies: 10

Hi there,

Can someone explain in plain words (even better with an example...) what "A sum up of the time delta between logstore_standard_log user's records, considering the a 2-hour session limit" mean? I am referring to the definition of the ad hoc report User's accumulative time spent in course

Had a interesting discussion with a guy who is obsessed with this and thinks that there is a high correlation between time and grading. By running this report and putting it on a scatter plot with linear regressions, I see that this is not case in basically all my courses (which makes total sense!). 

However, I would like to know exactly how this report track the time spent.

Thanks!
Javier 

Average of ratings: -
In reply to Javier Tejera

Re: User's accumulative time spent in course

by Motasem Al Haj Ali -
Hi Javier,

It is a fascinating piece of code. I know that some analytics platforms integrated with Moodle count the time spent by the number of clicks in a period. But this code seemed to calculate the user time spent based on the calculation of the deferences between each action/log time (timecreate) and the previous action time (@prevtime) in two hours. 

I can see the ambiguity in the code, and I am not sure if this code works fine and do the expected job, but I think we can use it to calculate the time that students spend on a quiz need 2 hours if we add some conditions like 'last two hours do this calculation or specify the module id'. But I am still unsure how this code calculates the time spent in two hours sessions without overriding or recalculating the same log points. 

I was trying to visualise the code, and I would like to share the screenshot below with you. 

Suppose we calculate the last two hours from a specific time, and the students left at 30 minutes after creating some logs. In that case, we can get the 'sumtime' as 30 minutes, but if the student did some work and then left and came back at the last minute to create a new log, then the sum time will be 2 hours even though that the user did not spend all the two hours doing work on the page.

Hopefully, that adds to the conversation.

Regards
Mo
sql time
  

In reply to Motasem Al Haj Ali

Re: User's accumulative time spent in course

by Javier Tejera -
Hi Mo,

Thanks so much for your time explaining this. That visualisation is very helpful indeed!

So, if the student of your example creates a log at the last minute of the 2h period, that will be counted as 2h. But imagine that the student creates a log in in the minute 1 after the 2 h, would that be counted as 31 min instead of 2h?

Javier
In reply to Javier Tejera

Re: User's accumulative time spent in course

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Just jumping in here in case it's relevant - we've recently taken over maintenance of the "course dedication" block and have been updating it a bit to work with Moodle's 4.0 report builder so you can report on time-spent across courses a bit easier. This plugin uses a similar metric on the logs table for calculating how much time a user spent inside a course.

One of my colleagues here at Catalyst also wrote some POC code that uses the Page Visibility API instead of the moodle logs to try and estimate the time a user has spent - I'm hoping we might at some point add this to the dedication block as well so we will have 2 possible methods of tracking timespent - one using moodle logs, and the other using the Page visibility API: https://www.w3.org/TR/page-visibility/
Average of ratings: Useful (2)
In reply to Dan Marsden

Re: User's accumulative time spent in course

by Motasem Al Haj Ali -
Dan,

That's a great idea, do you think we can include this HTML code in our SQL code using Concat()??
In reply to Dan Marsden

Re: User's accumulative time spent in course

by artur santos -
Hello every one! smile
There is a way to extratct a User's accumulative time spent in a set of courses?
Thanks in advance.
Artur

In reply to Javier Tejera

Re: User's accumulative time spent in course

by Motasem Al Haj Ali -
Hi Javier,

That's what I meant when I said " But I am still unsure how this code calculates the time spent in two hours sessions without overriding or recalculating the same log points. "

anyhow please see the attached example for two days of one user logs, hopefully, that adds to the subject.

Regards
In reply to Javier Tejera

Re: User's accumulative time spent in course

by Brian Merritt -
Picture of Particularly helpful Moodlers
Hi - a little late in the day, but just came across this.

I use IntelliBoard and produce daily reports for each student using their timetracking report so I get "exactly" how many minutes per day on each activity on Moodle.

There are of course outliers, so someone who spends almost no time on Moodle might pass with flying colours because they already knew the material, but once you include initial test results it becomes apparent.

I might have a look at this code and see how close the timings are to what I am getting from IntelliBoard, as I have a 2 month gap this year because our hosting partner forgot to include the plugin in the upgrade to 4.1
Average of ratings: Useful (1)
In reply to Brian Merritt

Re: User's accumulative time spent in course

by Joseph Thibault -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Brian, I'm just curious how you handle writing activities. Does either report assume that writing doesn't happen on the LMS or only certain activities (e.g. Assignment is "offline" whereas discussion is "online")?
In reply to Joseph Thibault

Re: User's accumulative time spent in course

by Brian Merritt -
Picture of Particularly helpful Moodlers
My understanding of IntelliBoard is it uses a combination of mouse movements, scrolling, and the fact that browser window is active to track time.

It doesn't include lecture capture, but we get that from Panopto.

It doesn't include LTI, and to be honest tracking that with most providers is painful when going down to the user.

ps - I had a look at the log report output, and of course it is just course based - doesn't include activities and resources because they are not at course level. For my 2 month gap I guess I will be building up a map piecemeal based on users, courses, modules etc for a period where I do have data, and then compare that to the log version of the map, and then work out a method to estimate time spent during the gap.
In reply to Brian Merritt

Re: User's accumulative time spent in course

by Brian Merritt -
Picture of Particularly helpful Moodlers
Sorry, and only online assignment time would be included, haven't yet got to the point of analysing submitted documents, where maybe a different value such as # words, # pictures etc could estimate amount of time