Hiding "Remove from Course" option

Jump to solution
Community Champion

Hello everyone,

We have run into a situation with running enrollments via API where Teachers have the ability to remove a student from a course in the People area. When enrollments are run using SIS, Teachers do not have the ability as the "Remove from Course" option is hidden from view. Here's an example of what a Teacher currently sees because of our API enrollment method:

Screen Shot 2016-10-25 at 9.01.16 AM.png

What we would like to do (other than disabling the permission for "Add/Remove students for the course" because there is a need for manually adding/removing) is to use Javascript to hide "Remove from Course". However, this is proving tricky as the ID value for it is different per user. Right now, I can use (as an example).....


...to hide "Remove from Course" on a per user basis. The value "ui-id-X" is assigned by the system, so I am not sure how I would write it to grab all the IDs and hide when the caret is clicked. Any thoughts for this rookie?



1 Solution

Mystery solved - we now have a function to handle this now and didn't need to touch a single priv or rethink out enrollments via API. I am happy to share it with you offline. Props to the IC team for assisting to get this working right.

View solution in original post