def _manage_users(request, course_key):
 user_perms = get_user_permissions(request.user, course_key)
 if (not (user_perms & STUDIO_VIEW_USERS)):
  raise PermissionDenied()
 course_module = modulestore().get_course(course_key)
 instructors = set(CourseInstructorRole(course_key).users_with_role())
 staff = set(CourseStaffRole(course_key).users_with_role()).union(instructors)
 formatted_users = []
 for user in instructors:
  formatted_users.append(user_with_role(user, 'instructor'))
 for user in (staff - instructors):
  formatted_users.append(user_with_role(user, 'staff'))
 return render_to_response('manage_users.html', {'context_course': course_module, 'show_transfer_ownership_hint': ((request.user in instructors) and (len(instructors) == 1)), 'users': formatted_users, 'allow_actions': bool((user_perms & STUDIO_EDIT_ROLES))})

def _manage_users ( request , course_key ) : user_perms = get_user_permissions ( request . user , course_key ) if ( not ( user_perms & STUDIO_VIEW_USERS ) ) : raise PermissionDenied ( ) course_module = modulestore ( ) . get_course ( course_key ) instructors = set ( CourseInstructorRole ( course_key ) . users_with_role ( ) ) staff = set ( CourseStaffRole ( course_key ) . users_with_role ( ) ) . union ( instructors ) formatted_users = [ ] for user in instructors : formatted_users . append ( user_with_role ( user , 'instructor' ) ) for user in ( staff - instructors ) : formatted_users . append ( user_with_role ( user , 'staff' ) ) return render_to_response ( 'manage_users.html' , { 'context_course' : course_module , 'show_transfer_ownership_hint' : ( ( request . user in instructors ) and ( len ( instructors ) == 1 ) ) , 'users' : formatted_users , 'allow_actions' : bool ( ( user_perms & STUDIO_EDIT_ROLES ) ) } )
this view will return all cms users who are editors for the specified course .