Showing results for 
Search instead for 
Did you mean: 
Community Member

Remove "delete course" permission from teacher

Jump to solution

I am the Canvas admin at my institution. I have had two recent incidents where teachers abruptly deleted their courses from Canvas. How do I remove the "delete course" permission from the teacher role?

15 Replies
Community Member

Bill Gibson -  I don't think much is permanent.  You can restore a deleted course by clicking on Admin Tools in your admin dashboard.

I too think the delete course should be a permission.   I also think the un-delete button should be a link in teachers navigation instead of a URL trick.

I check my custom CSS/JS in beta after each release because they are just that...custom. I agree that the GUI should have controls through permissions to restrict/allow, but since that's not an option I go with some quick JS to hide buttons with serious implications. All comes down to how conservative or liberal your institution is with controls.

Community Member

"Note: Deleting a course is a permission enabled by your admin. If you do not see this button, you do not have permission to delete your course."  [ How do I permanently delete my course? ]

I don't think it is a "conservative or liberal" issue.  If you provide a button for your users, and label it as, "Hey Stupid! Don't press this button or the World will end,"  eventually, you will have someone call you up, or email you, letting you know they pressed the button by mistake.  And, they will admit, "Yes, they read the button."

Learner II

Below is the code that I wrote to hide a number of things from faculty such as: the start and end date so they don't go changing the dates after we set them, breaking tools like Dropout Detective; hiding the conclude button, so they don't conclude courses where students still have incompletes to finish; hiding the public course setting after many instructors have made their course public in the intent to publish it for their students.

I know the code that Shane posted was only one line (inside of the if statement), but I've found that it is a good practice to have your javascript check which page the user is viewing before running. This way anything inside won't need to run at all when the user isn't on the page where the changes are needed and the code will run a little faster. Shane's code is not only running on every page, but it is also running for students, every time they look at any page. I run the role setup code at the start of my js file so that I have access to the role variable wherever I need it.

/* role setup */

var leng = ENV['current_user_roles'].length - 1

var role = ENV['current_user_roles'][leng];

if ((window.location.href.indexOf("details") > 0 || window.location.href.indexOf("settings") > 0) && role == "teacher") {





        $("a:contains('Conclude this Course')").hide();


Very nice! Yea..what he said...  :smileylaugh:

Hi!  We used your code to hide the following from the teacher role:

Manually add sections, conclude the course, reset course content, view the course status, and delete this course.

We really appreciate having these options as we do need teachers to able to cross list their sections together manually, but we didn't want them to do all these thing!

We did have an odd thing pop up this term, though.  A teacher in a course added some sections manually, which messes up our enrollments, and confuses the students as they have 2 sections named the same thing, but only one is the genuine section from our SIS. 

In our research as to how this was happening, we found that the teachers who could manually add sections had an observer role in another course. If we changed their role in the other course, the buttons was hidden from them. When we changed their role in that other course back to observer, they could see the buttons (all except delete this course).  Who would have thought that the observer role, which has no access to settings, would impact how our code work when that same person was in the teacher role?  Anyway, we added observer to the list to hide these buttons from and now we are good to go!  Just thought I would note that for others using this fantastic work around!  Hoping that Canvas will on day make all these granular permissions we can select from the teacher role!