cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Member

How can I know the time details within the "Total Activity"?

Jump to solution

At the "People" page we can get the user's total activity in hh:mm:ss. My question is, how can we know the details of the time?

What we need to know is, within the total activity, how many hours/minutes happen between for example 12pm-8pm or 9am-9pm.

We need this information to show the hours students and teachers are BOTH online, so we need to separate students' time to see when students are online with the teacher ready to help at the same time. This is very important for us. Thank you!

1 Solution

Accepted Solutions
Highlighted

You could build a custom report to dig down on an hourly basis... Here is one that I cooked up quickly as an example:

224159_pastedImage_1.png

This allows you to select the course you want data for, then click on the user's id (though you could do User Name instead) and then it will tell you what hour (0-23) they were logged doing things in that particular course.

View solution in original post

9 Replies
Highlighted
Community Coach
Community Coach

john.sun@insightacademy.ca, the short answer is that you can't on the front end of Canvas. This information just isn't available. As for the back-end of Canvas, you would want to check with the https://community.canvaslms.com/groups/canvas-developers?sr=search&searchId=60247771-7121-400b-8c07-...‌ group. I'm going to go ahead and share this with them to see if they can assist.

Highlighted
Instructure
Instructure

I'd recommend that you install google analytics on your site. This resource from the community is an alright place to start. Sadly there isn't a comprehensive document on how to add google analytics to your site, but it'd get you the hourly tracking of users by user role if you need it.

This is the code that I have working to gather information on users and courses.

//In Google Analytics you'll need to set up custom dimensions as follows
// Custom Dimension 1 = User ID --- Scope = User
// Custom Dimension 2 = Deprecated --- Inactive
// Custom Dimension 3 = User Role --- Scope = User
// Custom Dimension 4 = Course ID --- Scope = Hit
// Custom Dimension 5 = Course Name --- Scope = Hit
// Custom Dimension 6 = Sub-Account ID --- Scope = Hit

//In the script below you'll need to change the UA number to what is generated from your new google analytics account

(function (i, s, o, g, r, a, m) {
    i['GoogleAnalyticsObject'] = r;
    i[r] = i[r] || function () {
        (i[r].q = i[r].q || []).push(arguments)
    }, i[r].l = 1 * new Date();
    a = s.createElement(o),
    m = s.getElementsByTagName(o)[0];
    a.async = 1;
    a.src = g;
    m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');

$(document).ready(function () {

    // START - More Google Analytics Tracking Code
    var sUserId
    var sUserRole
    var sTemp // Course ID from URL
    var _course
    var sCourseName = null
    var parent_account //Give you the subaccount_id that the course is in

    // CHANGE UA # HERE
    ga('create', 'UA-12345678', 'auto');

    //Get User Information
    sUserId = ENV["current_user_id"]
    ga('set', 'dimension1', sUserId);


    //Get User Roll
    if ($.inArray('admin', ENV['current_user_roles']) == -1 && $.inArray('teacher', ENV['current_user_roles']) == -1 && $.inArray('student', ENV['current_user_roles']) > -1) {
        sUserRole = "student"
    } else if ($.inArray('admin', ENV['current_user_roles']) == -1 && $.inArray('teacher', ENV['current_user_roles']) > -1) {
        sUserRole = "teacher"
    } else if ($.inArray('admin', ENV['current_user_roles']) > -1) {
        sUserRole = "admin"
    } else {
        sUserRole = "other"
    }

    ga('set', 'dimension3', sUserRole);

    //If the user is in a course
    try {
        sTemp = window.location.pathname.match(/\/courses\/(\d+)/);
        if (sTemp[1]) {

            //Get Course information - Course Name and parent sub-account id
            var d1 = $.get('/api/v1/courses/' + sTemp[1], function (_course) {
                parent_account = _course.account_id
                parent_account = parent_account.toString();
                sCourseName = _course.name
            });


            $.when(d1).done(function (_account) {
                // ...do stuff...
                ga('set', 'dimension4', sTemp[1]);
                ga('set', 'dimension5', sCourseName);
                ga('set', 'dimension6', parent_account);
                ga('send', 'pageview');
            });
        } else {
            ga('send', 'pageview');
        }
    } catch (err) {}

    // END - Google Analytics Tracking Code

});‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Hope that helps,

Highlighted

Thank you so much Jeremy. I managed to add Google Analytics to my site by uploading your code to the global JS, it works well and I have already received some data.

I really have zero experience using Google Analytics. What I saw are some statistics, not for each individual student. What I'm looking for is the answer to such a question like "How long has this student spent on this online course between 12am and 8pm (School Time) during the past 12 weeks?". Is it possible to have such data/report by using the current code you  provided? Or I have to add some more dimensions/metrics/segments? 

A simple table (for one online course) in my mind is something like this:

 

 

Week 1

Week 2

Week 3

 

School Time

Home Time

School Time

Home Time

School Time

Home Time

Alice

04:03:02

02:03:04

01:02:03

03:02:01

02:03:04

03:02:04

Bob

01:02:03

03:02:01

04:03:02

02:03:04

01:02:03

03:02:01

Cindy

02:03:04

03:02:04

01:02:03

03:02:01

01:02:03

03:02:01

David

04:03:02

02:03:04

01:02:03

03:02:01

02:03:04

03:02:04

Eva

01:02:03

03:02:01

02:03:04

03:02:04

04:03:02

02:03:04

Meanwhile I start to read GA help, trying to understand some basic concepts. Thank you so much, I really appreciate your help! 

Highlighted

You could build a custom report to dig down on an hourly basis... Here is one that I cooked up quickly as an example:

224159_pastedImage_1.png

This allows you to select the course you want data for, then click on the user's id (though you could do User Name instead) and then it will tell you what hour (0-23) they were logged doing things in that particular course.

View solution in original post

Highlighted
Community Coach
Community Coach

Hello john.sun@insightacademy.ca‌...

I thought that I would check in with you because there hasn't been any new activity in this particular discussion topic since the last week of March.  Have you had a chance to review the latest response from jperkins@instructure.com‌ on March 25th?  Has your original question been fully answered, or are you still looking for some help with your question?  If any of the above responses has helped to answer your question, please mark one of them as "Correct".  However, if you are still looking for some assistance from members of the Canvas Community, please let us know that by posting a message below.  For now, I'm going to mark your question as "Assumed Answered" because there hasn't been any new activity in this thread for quite a while.  Please note that won't prevent you or others from posting additional questions/comments below that are related to your initial question.  I hope that's okay with you.  Looking forward to hearing from you soon!

Highlighted

My problem was fully solved and I just marked Jeremy's reply as "Correct". Thank you Jeremy for the great help!

Highlighted
Community Member

Hello,

This is what my professor wants. How do I see how many hours I have logged?

"Attendance is taken as you are logged in to the course completing class work and making entries in response to assignments/activities. Students should be logged in to the Canvas class environment a minimum of two hours per week to receive full attendance points."

I looked on the people page but didn't have any luck.

Thanks,

David

Highlighted

david_weiland1@my.vcccd.edu, are you a student? If so, I do not believe this information is available to students--at least, not through the Canvas UI--and suspect your professor will be the one collecting this data and making the determination of whether students will or will not receive full attendance points. You might want to contact your professor directly for clarification of this course requirement.

Highlighted
Community Member

Thanks Stefanie for the quick reply! I have posted a discussion thread in my online class too. Thanks, David

Top Kudoed Authors
Labels