How could an instructor receive an immediate notification once all of one student's assignments are graded?

Jump to solution
cthiriot
Community Member

Hello,

An edge case if you're looking to brainstorm 🤔

The story

I'm the Canvas admin at a competency-based technical college, where students are self-paced in each Canvas course. For example:

  • Student A is in Module 1
  • Student B is in Module 10
  • Student C is in Module 3

Consider Student D. She is enrolled in a course with 10 lab assignments.

Student D (SD) completed the lab assignments out of order due to the availability of equipment in the lab. Her last remaining assignment is Lab 2.

SD's course ends on Friday. She submits Lab 2 on Friday afternoon.

Our instructor--naturally facing a flurry of other Friday submissions--grades Lab 2, but does not recognize that this is SD's final submission in the course. It is not clear to the instructor that they must now go to the SIS and manually complete the student in the course.

What I tried

  1. We have some software that could pull a report and send notifications from Canvas Data 2. However, the 4-hour-or-under data freshness would not work for our instructor in this case.
  2. I recommended a Canvas quiz with at least 1 course reflection essay question at the end of the course. Students would fill this out after submitting their final lab, notifying instructors to ensure the course is completed for the student. This still adds a little bit of time and the possibility for user error.

The question

Can you think of a more immediate way for an instructor to be notified (e.g., confetti, bullhorn) that Student D has submitted all their assignments in the course?

Thanks much!

Labels (2)
0 Likes
1 Solution
James
Community Champion

@cthiriot 

There are several things here that have been addressed before, but I'll try to pull them together from memory rather than finding those other places. Maybe what I write will spark inspiration on search terms.

Here's how we did something similar. Over ten years ago, we set up a student Canvas orientation that the students had to complete. Once they completed their final assessment, they were moved out of the orientation and into their real classes. The students were supposed to click an LTI I had set up to notify our system that they had completed the course. Of course, students would fail to invoke the LTI tool so we needed another way to check that they had completed the course. I wrote a script that would use the API to go out and check the completion status of the final quiz along with the score (they had to get at least 80%) and processed things for them. After a while, we just removed the LTI and ended up scanning that assignment, letting them know that there might take up to an hour before they got into their next course (it ran every 20 minutes, but we didn't want students freaking out if it didn't happen right away).

For us, the orientation was a single course and there was no way that they could take the final until they had completed everything else. We used submitted_since in the request to only get those that were graded.

For you, there are many courses and different assignments and you don't want to check all of them. There's not a single assignment that signifies the end of a course.

Thankfully, Canvas has modules that can signify completion and we can check those.

If you create a module or multiple modules that contains all of the assignments that must be completed, then you could check the module progress using the Get user progress API endpoint. This returns a CourseProgress object that contains a completed_at date, which is when the user completed the course or null if they haven't completed all the modules yet. Completion of the course is determined by whether all of the modules with requirements have been completed. That call gives the total number of requirements and the number of completed requirements, so you could prompt the instructor ahead of time with an email "SD is about to complete the course".

This requires that you poll every student in every class. What you might do is run it overnight and maintain a local database of student progress status and then use it to identify students that are nearing completion to poll just those students every hour (or whatever acceptable time frame you have) throughout the day.

A better way would be to use GraphQL. Under the usersConnection, you have courseProgression > requirements. It has a completionPercentage flag.

query courseProgress($courseId: ID!, $c1: String) {
  course(id: $courseId) {
    _id
    name
    usersConnection(
      after: $c1
      first: 100
      filter: {enrollmentStates: active, enrollmentTypes: StudentEnrollment}
    ) {
      nodes {
        _id
        sisId
        sortableName
        courseProgression {
          requirements {
            completionPercentage
          }
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }
    }
  }
}

You would pass it a variables object with the courseId and c1. c1 is used for pagination and is initially null. Upon subsequent requests, you would use the endCursor from the previous request. If you don't have more than 100 students, you may not need to use the pagination.

You would need to go through and filter the results to see which students were at 100 for the completionPercentage property.

You would still need to query each course, but it's not one request per course instead of one request per student. The progress request is not fast, even for GraphQL. I have 321 requirements in my course because I'm using badging but only 20 students in the class I tested it with. It took about 7.5 seconds to fetch and that was with a request I had already made once so it may have been more the first time. You should have fewer modules but more students, but it's probably the number of requirements that slow it down more than the number of students.

You could use terms or accounts to get more than one course at a time, but you will definitely need to use pagination. It will probably be simpler to just iterate through all of your courses.

Depending on what you do with the student once they're done, you may need to keep track of when they completed it. If you conclude their enrollments then (not verified) you should stop getting them in the report

Another possibility is to set up Canvas Live Events and watch the course_completed event. They recommend using Amazon's AWS SQS queue, but if you have a reliable connection, you can have events sent directly to your servers and bypass having to poll the SQS queue. Live events are a best-effort attempt, so you still need polling as a fallback, but it could be once a day.

View solution in original post