I'm trying to get page view statistics for all students in all courses from the Canvas data and presume that I would need to interrogate the requests table in some way. So far I haven't been able to get numbers which correlate with the page view numbers shown in the User Analytics page for a course.
Has anyone else had any success in doing this and how did you do it?
Thank you in advance,
Daniel.
I've been able to get close to some of the numbers displayed by using:
select sum(views) as views, user_id
from (
select count(*) as views, user_id
FROM requests
where WEB_APPLICAITON_ACTION = 'show'
and WEB_APPLICATION_CONTROLLER <> 'quizzes/quizzes'
group by user_id
union all
select count(distinct QUIZ_ID) as views, user_id
FROM requests
WHERE WEB_APPLICAITON_ACTION = 'show'
and WEB_APPLICATION_CONTROLLER = 'quizzes/quizzes'
group by user_id
) |
group by user_id
Thank you for your script. I used the WEB_APPLICATION_ACTION = 'show' filter and was also able to get close to some of the numbers also. Where they differ they can be over or under so I don't think the solution is going to be easy. I've queried this here so I'm waiting to see if I get any more info.
db