Custom JS to hide Import Course link for Teachers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello fellow Canvas users. I have a kind of unique question. My school is transitioning the majority of course courses from a previous LMS we have used to Canvas which we have had for a number of years.
In this move we'd like to control who and what can be imported into a course so minimize the amount of cleanup our instructional design team needs to do so we would like to hide the Import Course Content button on the Course settings page.
I believe we can do this by adding a JS file to our theme but I'm not exactly sure what JS I should generate. I have found some samples on the forums but I'm a JS noob and I don't know very much. Any help would be most appreciated!
Original I found
$(document).ready(function(){
if($.inArray('admin',ENV['current_user_roles']) == -1) {
$(".AddExternalToolButton").hide();
console.log ('hide Add App button')
}
});
My guess as to my desired goal
$(document).ready(function(){
if($.inArray('admin',ENV['current_user_roles']) == -1) {
$(".ImportcoursecontentButton").hide();
console.log ('hide Add App button')
}
});