I recently had an assignment where my teacher gave me a good comment. I replied back saying "Thank You!" but I would now like to delete my comment. Is there any way to do so? Thanks in advance!
@jham18 , I did a little testing and it looks like students are not able to delete comments. If you'd really like the comment to be deleted, you can contact your Instructor and your Instructor has the ability to delete comments.
Hope this helps!
UPDATE: THIS SOLUTION NO LONGER WORKS
After some testing, it appears Canvas has revoked the right for students to delete or edit comments using the API. I've tried both PUT and DELETE for /api/v1/courses/*/assignments/*/submissions/*/comments and I've tried DELETE for the internal api /submission_comments/* that is used by speedgrader. Neither work when acting as a student. If someone wants to continue fiddling with the original solution, I'll leave it here.
OLD COMMENT
While it's true Canvas hasn't created an interface for deleting comments, students DO have the access rights to delete comments, they're just missing a button to do it. If you are a student and would like to delete a comment without reaching out to your teacher, here are the steps you should follow.
1. Open Canvas in Chrome and navigate to the submission page where you can see your comment you'd like to delete.
2. Open the Chrome console (ctrl + shift + i)
3. Paste this code into the console and run it (press enter)
$.delete = function (url, data) {return $.ajax({url: url,data: data,type: 'DELETE'});}$(".comment_list div.comment").each(function() {let el = $(this);let id = el.attr("id");if (id !== undefined) {let userName = el.find(".author_name").text().trim();if (userName == ENV.current_user.display_name.trim()) {console.log(userName);let commentId = id.replace("submission_comment_", "");console.log(commentId);el.css("position", "relative");let button = $(`x`);button.click(function() {let url = `/api/v1${window.location.pathname}/comments/${commentId}`$.delete(url);el.remove();});el.append(button);}}});
4. Click the X that appears by your comment.
update 10/26/2023 - fixed an issue where it doesn't show the x on some assignments.
If it still doesn't show up, you can try this. It strips out the check to see if the comment is written by you. This means you'll get an x on every comment, but only the ones written by you will work. The rest will throw an error.
$.delete = function (url, data) { return $.ajax({ url: url, data: data, type: 'DELETE' }); } $(".comment_list div.comment").each(function() { let el = $(this); let id = el.attr("id"); if (id !== undefined) { let commentId = id.replace("submission_comment_", ""); console.log(commentId); el.css("position", "relative"); let button = $(`<span style="position: absolute; top: 0; right: 0; color: #888;">x</span>`); button.click(function() { let url = `/api/v1${window.location.pathname}/comments/${commentId}` $.delete(url); el.remove(); }); el.append(button); } });
It didnt work for me can u help?
im trying to delete this comment. its a file by the way
i'm not sure there's a way to delete a file like that. I'd need more context to try to help.
the file would have to be attached to a particular comment i think, so figure out which comment it is and then delete it.
per my first post: This version doesn't give you an X, it just deletes.
I have used Blackboard, Moodle, and now work at a Canvas university. When grading quiz items. I want the ability to view all of the students' responses to a single item at once. This could allow consistency in grading and speed up the grading process. This functionality has been available in Moodle for over 10 years.
Has anyone ever encountered this error in the Admin Analytics Student section?
My class policy is that late assignments can be accepted at professor discretion, but they will have a 50% penalty. This is a gate you pass through once, and there are no further penalties. If it's late, you simply get 50% deducted from whatever the score was. This happens regardless of whether it's 5 hours late or 5 weeks…
Teachers often assume that because an assignment is a groupassignment, they will automatically grade it per group via SpeedGrader. With the option “Grade students individually”, they think they’re simply assigning the group grade to each individual student — without realizing that this option actually requires them to…
Hi There, We are in the process of transitioning to Canvas this year and were wanting to connect with any other MYP schools to see how you setup Assignment and grading under your modules. Or you could guide us to any resources you may have.