The Instructure Community will be offline for scheduled maintenance on Tuesday, November 17, from 6 to 9 p.m. MT Learn more
Is there a way to set a default grade with a default comment? It is really takes a lot of time to have to individually copy and paste the SAME comment into each student's assignment using speedgrader such as "Good job on this assignment!" Can we get Canvas admin to add this as an option?
It doesn't seem there is an inbuilt solution, it has been requested as an idea since 2016: [Gradebook] Default Comment - Page 3 - Instructure Community - 375680
But it is possible to do that using the canvas API. Here's one script I generated (with ChatGPT's help) that does the job for Python using the canvasapi module. Note that it requires the assignment id, so if you are using a quiz, you need to get the assignment id for that quiz (different from the quiz id).
You can also select the grade to give the comment to, so you can run it once to give "Great job!!!" for a 10, then once again to give a "Great job!" for a 9, then again for "Great Job..." for an 8, and so on. It's possible to add ranges, or have a dictionary of grades to comments, but I didn't want to over complicate it.
from canvasapi import Canvas def add_comment_to_submissions(api_url, api_key, course_id, assignment_id, target_grade, comment_text): # Initialize the Canvas object canvas = Canvas(api_url, api_key) # Get the course and assignment objects course = canvas.get_course(course_id) assignment = course.get_assignment(assignment_id) # Create a dictionary mapping user IDs to student names dict_users = {} for user in course.get_users(): dict_users[user.id] = user.name # Retrieve all submissions for the assignment submissions = assignment.get_submissions() for submission in submissions: student_name = dict_users.get(submission.user_id, "Unknown") # Check if a grade exists for the submission if submission.grade is not None: try: # Convert the grade to a float for numerical comparison grade = float(submission.grade) except ValueError: print(f"Skipping {student_name}: grade '{submission.grade}' is not numeric.") continue # If the submission's grade matches the target grade condition (exact match) if grade == target_grade: print(f"Adding comment for {student_name} with grade {grade}.") # Post a comment using the "text_comment" field submission.edit(comment={"text_comment": comment_text}) else: print(f"Skipping {student_name}: grade {grade} does not match target grade {target_grade}.") else: print(f"No grade available for {student_name}; skipping.") # Example usage: if __name__ == "__main__": # Replace these values with your actual Canvas API details API_URL = "https://canvas.instructure.com" API_KEY = "your_canvas_api_key" COURSE_ID = 123456 ASSIGNMENT_ID = 654321 TARGET_GRADE = 85.0 COMMENT_TEXT = "Great job on your assignment!" add_comment_to_submissions(API_URL, API_KEY, COURSE_ID, ASSIGNMENT_ID, TARGET_GRADE, COMMENT_TEXT)
Hi @JB12345,
While not the same as using a default comment but another option besides copying and pasting, have you considered using the comment library in the SpeedGrader?
How do I use the Comment Library in SpeedGrader? - Instructure Community - 469482
-Doug
Enhance your access to articles, forums, and events—and to participate by sharing insights, engaging in discussions, and connecting with your network of edtech peers.
When uploading Storyline 360 files to Canvas. Most upload fine (the export options are now: SCORM 1.2, SCORM 2024, AICC, XAPiand cmi5, and next zip the file. I create a folder in the FILES section of Canvas and upload, expanding the zip file. I then link the story.html file to a Canvas module), but the latest one uploaded…
Hello - We have an issue where anytime a professor does a manual Relink of assignments or a Resync of Grades via the McGraw Hill Connect, it causes on overwrite in Canvas to assignments that have been configured (in Canvas) to be non-graded. Apparently the McGraw Hill rep indicated that there should be an option within the…
Has anyone successfully synced courses from Banner to a Canvas subaccount using Ellucian ILP? We are currently using Banner as our SIS and are trying to configure course-level subaccount assignments.
I am just curiousas to why there is not a field to enter a description for an outcome at the account level? Or at least edit the rating when you attach/link an account level outcome to a rubric. When you create a new criterion for a rubric, you enter a decription for a rating, but for an account level outcome.
We use a pre- post- model to measure learning which requires student-question matching from two time periods. This requires exporting quiz data to CSV to do the analysis properly. (I can get into more detail if needed.) The New Quizzes Student Analysis CSV export has repeated blocks of ItemID then columns related to that…