@require_authorized_admin
@dynamic_settings
def add_facility_student(request, ds):
 if (request.is_teacher and (not ds['facility'].teacher_can_create_students)):
  return HttpResponseForbidden()
 title = _('Add a new learner')
 return _facility_user(request, new_user=True, title=title)

@ require_authorized_admin @ dynamic_settings def add_facility_student ( request , ds ) : if ( request . is_teacher and ( not ds [ 'facility' ] . teacher_can_create_students ) ) : return HttpResponseForbidden ( ) title = _ ( 'Add a new learner' ) return _facility_user ( request , new_user = True , title = title )
admins and coaches can add students if central .