The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
At our institution, we would like to remove access to certain buttons for instructors, like Reset Course Content, but keep them for admins. Is this possible?
depyperr, in order to reach the target audience I'm moving your question to the Canvas Admins group space. Hope that's ok!
depyperr,
We have done things like this in the past with custom javascript, but it needs to be maintained and changed as the code base and interface changes. I believe there are Feature Requests out there related to items like this.
Robbie
Robbie,
Is there any documentation out there on how I may accomplish this in JavaScript?
I'm not sure about documentation on how to do it yourself, but we talked with our CSM and he took care of hiding buttons like that for us. Not sure exactly what he did, but we've never had to update it or do anything special for it to work.
If the CSM can do it that would be ideal, as the Javascript method only works in the desktop version, not on the app.
However, I was able to do it like this (replace the selector with whatever you want):
if ($.inArray('admin', ENV.current_user_roles) == -1){
$('a.delete_course_link').css('display','none');
}else{
$('a.delete_course_link' ).css('outline','1px solid red');
}
This gives the admins a red box around the hidden items to help keep track of what a user can see.
Our CSM hid a few things for students using a JS override, but as admins, we are unable to see the buttons that we hid in firefox. I wouldn't recommend using this method to disable things unless you REALLY need to. It doesn't really solve the issue of not being able to turn off these sorts of things for students or teachers.
I would say that this is probably another item that should be added to this feature idea:
I agree that bad things can happen when instructors have access to the reset course button...
@millerjm , it's strange that you couldn't see everything in Firefox. We've never had any problem seeing things at the admin level in any browser.
@kona , My co-workers are also noticing weirdness in firefox. Support's response is to simply use Chrome. ![]()
That's not real helpful. ![]()
Bob,
I've seen this done quite a bit. If you're looking to do it still, I'd recommend checking out this repository of content on Github. There are some Javascript specific scripts that have already been written to do things based off of roles in Canvas. Good luck looking through and let us know what more you find!
depyperr,
We are giving the Canvas Admins area a little bit of love (especially questions that are really, really old) and just want to check in with you. This will also bring this question new attention.
Were you able to find an answer to your question? I am going to go ahead and mark this question as answered because there hasn't been any more activity in a while so I assume that you have the information that you need. If you still have a question about this or if you have information that you would like to share with the community, by all means, please do come back and leave a comment. Also, if this question has been answered by one of the previous replies, please feel free to mark that answer as correct.
Robbie
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.