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 Canvas set to drop the lowest quiz score, however, my students can only barely tell that the grade text is slightly grey when dropped. Can it have a tag like the "missing" and "exempt" ones in the student gradebook?
My Canvas shell has three different sections that all meet at different times throughout the week. I need to be able to batch edit assignment due dates by section, but right now Canvas can't filter by section for batch edit. My only option is now to manually (tediously) edit due dates for each assignment individually.
Morning! One of the more frustrating aspects of Canvas are groups and the issues that show up when copying courses that have them. But now we have yet another issue. Most recently we have had instances where people mark an assignment/discussion as a group assignment but then do not link the discussion or assignment to any…
So, we have encountered a few assignments where the Speedgrader presents the teacher with the "Empty Course" page, even though the course is not empty. I have discovered two New Quizzes in the same course where this has occurred, despite multiple students being assigned (at Module level, which passes the permission down to…
A teacher has expressed concerns with the recent update. Exact concern is as follows: "My Canvas has been acting glitchy since the last "update." For instance, when I grade essays the highlight and cursor tools do not always work. I have to try highlighting several times,or come back later to finish. It's told me I "ran…