That did it!
I actually got it to work by hiding the elements for 'student'.
Here is my code inside of the condition you provided above. :
if (document.URL.indexOf('courses') > -1 && ENV.current_user_roles.indexOf('student') > -1) {
$('div#left-side nav ul#section-tabs').append('<li class="section"><a class="collaborations" href="https://www.samuelmerritt.edu/online_faculty_resources">Faculty Resources</a></li>');
hide(document.querySelectorAll('.target1'));
function hide (elements) {
elements = elements.length ? elements : [elements];
for (var index = 0; index < elements.length; index++) {
elements[index].style.display = 'none';
}
}
}
Any div with the class 'target1' will be hidden for students.