Add ProgrammingGroup & ProgrammingGroupMembership
* User can create programming group with other users for exercise * Submission is shared in a group * Also adjust specs
This commit is contained in:

committed by
Sebastian Serth

parent
0234414bae
commit
319c3ab3b4
@ -23,6 +23,15 @@ class ApplicationController < ActionController::Base
|
||||
@current_user ||= find_or_login_current_user&.store_current_study_group_id(session[:study_group_id])
|
||||
end
|
||||
|
||||
def current_contributor
|
||||
@current_contributor ||= if session[:pg_id]
|
||||
current_user.programming_groups.find(session[:pg_id])
|
||||
else
|
||||
current_user
|
||||
end
|
||||
end
|
||||
helper_method :current_contributor
|
||||
|
||||
def find_or_login_current_user
|
||||
login_from_authentication_token ||
|
||||
login_from_lti_session ||
|
||||
|
Reference in New Issue
Block a user