Allow teachers to access internal users and manage them in their study groups

This commit is contained in:
Sebastian Serth
2022-09-22 17:55:10 +02:00
committed by Sebastian Serth
parent e3018c1847
commit 0e7c38657f
11 changed files with 45 additions and 22 deletions

View File

@ -11,13 +11,10 @@ class StudyGroupsController < ApplicationController
authorize!
end
def show
@search = @study_group.external_users.ransack(params[:q])
end
def show; end
def edit
@search = @study_group.external_users.ransack(params[:q])
@members = StudyGroupMembership.where(user: @search.result, study_group: @study_group)
@members = StudyGroupMembership.where(user: @study_group.users, study_group: @study_group).includes(:user)
end
def update