Found this content helpful? Log in or sign up to leave a like!
View Comments in Gradebook without Sidebar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way that I can see which grades I've left comments for in the gradebook, without having to open the sidebar?
I'd like to be able look at my full gradebook and see - without clicking on individual grades one at a time - which grades have a comment and which don't.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ability to see all submissions that have comments is not available from the gradebook page.
One way is to go to your Inbox, select your course, and then choose Submission Comments. These are listed in date order and the assignment name is potentially cut-off depending on how long the course name is.
For example, the heading for one submission comment is "MATH 113 (V2,V3) - Stats (FA25) - Project 2: One Proportion Claims", but because of the width of the column, you get "MATH 113 (V2,V3) - Stats (FA25) - Projec...". At least the student names are available and it's by date, so if you know when you left comments you could relatively quickly (faster than clicking on each student one at a time in the gradebook) see which students received feedback.
If you are looking for comments on a specific assignment, then there is a way to get the list of students you've responded to.
Visit the interactive GraphQL page by adding /graphiql to the end of your dashboard URL. You will need to know the assignment ID, which can be found from the gradebook by hovering your mouse over the assignment title or by visiting the assignment page. If it is a classic quiz, you need the assignment ID not the quiz ID.
In the editor (middle section), you can paste this code.
query submissionComments($assigmentId: ID!, $c1: String) {
assignment(id: $assigmentId) {
submissionsConnection(
filter: {enrollmentTypes: StudentEnrollment}
first: 100
after: $c1
) {
nodes {
commentsConnection {
nodes {
authorVisibleName
}
}
user {
sortableName
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
Now expand the Variable section at the bottom and add a JSON object that contains the information needed to make the request. You will need to change the 12345678 to be your assignment ID.
{
"assigmentId": 12345678,
"c1": null
}
Now click the pinkish run button at the top (big button with a triangle in the middle).
In the right panel, you should get a list of all of first 100 submissions for that assignment. If your class has no more than 100 students, you have all of them. It gives up to 10 comments per assignment, so as long as the student didn't send you 10 comments before you made yours, you're okay there, too.
It will start off with data, assignment, submissionsConnection and then then nodes. Nodes is an array indicated by [ and ].
Each node will start with commentsConnection and then nodes. It will also contain a user field.
If not submission comments were made for that submission, the commentsConnection.nodes section will be empty and authorVisibleName field will not appear. Here, Nashville Tennessee received no comments on her submission.
{
"commentsConnection": {
"nodes": []
},
"user": {
"sortableName": "Tennessee, Nashville"
}
},
If there is a comment, then the commentsConnection.nodes will contain values and there will be an authorVisibleName value. That tells you who left the message. For this one, James Jones left two comments and Topeka Kansas left three comments. The user at the bottom student (here, it's Topeka Kansas).
"commentsConnection": {
"nodes": [
{
"authorVisibleName": "James Jones"
},
{
"authorVisibleName": "Topeka Kansas"
},
{
"authorVisibleName": "Topeka Kansas"
},
{
"authorVisibleName": "James Jones"
},
{
"authorVisibleName": "Topeka Kansas"
}
]
},
"user": {
"sortableName": "Kansas, Topeka"
}
What you could do is click on the right side and press Ctrl+F to open the search box (if you're a Mac user, then replace Ctrl with Cmd). Then type your name (or the name of the teacher). When it finds your name, look at the bottom of that commentsConnection to see the user that you left the comments to. Each time you press Enter, it will move to the next student.
Another way to quickly process the data is to use a JSON to CSV converter. I use the one at ConvertCSV as it runs in the browser (no information is sent to the server) and returns pretty good results. I'll explain how to use that site.
- Click in the right-most panel of the Canvas GraphIQL screen. Press Ctrl+A to select all the data and then Ctrl+C to copy all the data.
- Open the ConvertCSV web tool
- Paste your data into Step 1: Select your input using Ctrl+V
- Expand Step 2: Choose output options and select the Pivot data down instead of flattening option.
- In Step 3: Generate output, click the Convert JSON to CSV button.
- Scroll down a little to the table at the bottom.
It will contain two columns, one for "user/sortableName", which is the student's name, and one for "commentsConnection/nodes/0/authorVisible/Name", which is the person leaving the comment.
If you find your name in the second column, the name of the student you left it to is in the first column.
If you have more than 100 students, then we need to worry about pagination. Canvas will only deliver 100 results at a time.
At the bottom of the results panel in Canvas will be a pageInfo section that has two values. If hasNextPage is false, you're done. But if it is true, then the endCursor tells you where you left off. You need to take the value of the endCursor and put it in the variables section as the value for c1. That is, replace the null with the value from endCursor. Be sure to keep the quotes around the value. Then you click Run again. You repeat this whole process, including analyzing the results, until the hasNextPage is false.
A less technical way is to go to SpeedGrader and click through each student, seeing which ones have submission comments. This may take a lot of scrolling, especially if there is a rubric involved.
SpeedGrader downloads all of the information that it needs, including the comments, ahead of time and we can pull the information of there with a script. I will warn that I'm not using the enhanced rubrics or any of the SpeedGrader improvements that Canvas has made recently, so what I give you may not work.
I'm going to show how to do this in Chrome, but it should work in other browsers.
- Open SpeedGrader for your assignment.
- Open the developer tools for the browser. This is F12 for Chrome, but you can also click the right mouse button on the page and choose Inspect.
- Switch to the Network Tab and select Fetch/XHR. If there is no Fetch/XHR button, you may need to click the Filter icon to get it to show up.
- Reload the browser page.
- In the network tab, look for a request that starts with speed_grader.json. It will likely have ?assignment_id and &student_id after it. Left click on the name and it will open a new panel to the right.
- Select the Preview tab if not already selected.
- Position over the first line at the very top before the expanded view begins. Right click and choose Store as a global variable.
- In the Console at the bottom of the developer tools, you should get a line that says > temp1 and then the a repeat of the values. If it is not temp1, then you will need to change the code I'm going to give you, but it should be temp1 the first time you do this for a page.
- At the bottom of the console section, you can paste the following code, edit the author variable to be your name (and potentially the sg variable if it's not temp1) and hit enter. You'll get a list of all the students for that assignment that you've left comments to. If you don't get a list of students, you may need to click on "user messages" on the left side of the console.
(function () {
'use strict';
const sg = temp1;
const author = 'James Jones';
const studentList = [];
const students = sg.context.students;
sg.submissions
.filter(e => e.submission_comments.length > 0)
.forEach(s => {
if (s.submission_comments.some(c => c.author_name === author)) {
const student = students.find(e => e.id === s.user_id);
if (student) {
studentList.push(student.sortable_name);
}
}
});
studentList.sort((a, b) => a.localeCompare(b));
console.log(studentList.join('\n'));
})();
I used the sortable name "Kansas, Topeka", but if you would rather have their first name first, you can replace the student.sortable_name in the studentList.push() statement to be student.name instead.
The sort() function near the end puts the names into alphabetical order.
Once you get that the way you want it (with your name), I would save it somewhere to a text file so that you can re-paste. However, if you open this up with another assignment in SpeedGrader, when you get to step 9, instead of pasting, you can use the up arrow key to get back the last command.
There are ways to automate this so that you don't have to store to a global variable each time. We could construct the URL and refetch the data that SpeedGrader is getting. Depending on the size of the class, this may take a while.
With the following code, you can do these steps.
- Open SpeedGrader for your assignment.
- Open the developer tools for the browser. This is F12 for Chrome, but you can also click the right mouse button on the page and choose Inspect.
- Switch to the Console tab.
- Paste the following code, change the author to your name, and then press enter. In the future, you can just arrow up.
(function () {
'use strict';
const author = 'James Jones';
const url = `${document.location.pathname}.json${document.location.search}`;
fetch(url)
.then(res => res.json())
.then(analyzeComments);
function analyzeComments(sg) {
const studentList = [];
const students = sg.context.students;
sg.submissions
.filter(e => e.submission_comments.length > 0)
.forEach(s => {
if (s.submission_comments.some(c => c.author_name === author)) {
const student = students.find(e => e.id === s.user_id);
if (student) {
studentList.push(student.sortable_name);
}
}
});
studentList.sort((a, b) => a.localeCompare(b));
console.log(studentList.join('\n'));
}
})();
There's no error checking here, so if there is a network issue, you won't get any results.
If you wanted to put this into a userscript that automatically ran whenever SpeedGrader was loaded, that could be done fairly quickly. However, you probably use SpeedGrader more for grading than determining which students have comments.
Security experts warn against pasting anything into the developer tools that you don't understand. That's a good warning. Someone might come along and say the filter() line isn't necessary and that's true. We could have done a map() and then filter() out the empty responses. There are various ways to accomplish this, but I'm not even sure if it meets your need so I didn't want to spend a lot of time working on it. I originally had the filter() line in there because I just wanted to see if I could accurately detect which submissions had comments.
Throughout all of this, I hope that you don't have two students with the same name. If so, then we need to get into IDs to distinguish the students. I was just going for quick and human-friendly rather than a robust solution.