Skip to content

Commit

Permalink
Fixes issue where some students couldn't be removed from courses
Browse files Browse the repository at this point in the history
fixes CNVS-22845

Test Plan:
* Create a user with a sis id, create another user without a sis id
* Add both users to a course with any role
* Once added select the gear icon for both students
* They should both have the option to "Remove From Course"

Change-Id: Ia7c663ae02a1c91334e6d00614faa31c94f1ab40
Reviewed-on: https://gerrit.instructure.com/62151
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
  • Loading branch information
Dan Minkevitch authored and roor0 committed Aug 31, 2015
1 parent f9fa071 commit c856b5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ define [
json.url = "#{ENV.COURSE_ROOT_URL}/users/#{@model.get('id')}"
json.isObserver = @model.hasEnrollmentType('ObserverEnrollment')
json.isPending = @model.pending(@model.currentRole)
json.canRemoveStudents = ENV.permissions.manage_students and _.all @model.get('enrollments'), (e) -> !e.sis_course_id
json.canEditSections = not _.isEmpty @model.sectionEditableEnrollments()
json.canLinkStudents = json.isObserver && !ENV.course.concluded
json.canViewLoginIdColumn = ENV.permissions.manage_admin_users or ENV.permissions.manage_students
Expand Down
4 changes: 2 additions & 2 deletions app/views/jst/courses/roster/rosterUser.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
<li><a href="#" data-event="editSections"><i class="icon-edit"></i> {{#t "links.edit_sections"}}Edit Sections{{/t}}</a></li>
{{/if}}
<li><a href="{{url}}"><i class="icon-user"></i> {{#t "links.user_details"}}User Details{{/t}}</a></li>
{{#unless sis_user_id }}
{{#if canRemoveStudents}}
<li class="ui-menu-item"><hr /></li>
<li><a href="#" data-event="removeFromCourse"><i class="icon-trash"></i> {{#t "links.remove_from_course"}}Remove From Course{{/t}}</a></li>
{{/unless}}
{{/if}}
</ul>
</div>
{{/if}}
Expand Down

0 comments on commit c856b5f

Please sign in to comment.