Allow platform admins and internal users to switch their current study group

This commit is contained in:
Sebastian Serth
2022-09-20 00:12:46 +02:00
committed by Sebastian Serth
parent 2e3480a068
commit ac3dc8d30f
12 changed files with 94 additions and 21 deletions

View File

@ -891,8 +891,16 @@ de:
history: Punkteverlauf
percentage: Prozentzahl
siblings: Dazugehörige Abgaben
study_groups:
set_as_current:
success: Die Lerngruppe wurde erfolgreich gewechselt.
users:
platform_admin: Plattform Administrator
show:
current_study_group: Aktuelle Lerngruppe
set_as_current_study_group: Als aktuelle Lerngruppe setzen
study_groups: Lerngruppen
no_groups: Diese Person ist keiner Lerngruppe zugeordnet oder Sie sind nicht berechtigt, die Lerngruppen einzusehen.
will_paginate:
next_label: 'Nächste Seite →'
page_gap: '…'

View File

@ -891,8 +891,16 @@ en:
history: Score History
percentage: Percentage
siblings: Associated Submissions
study_groups:
set_as_current:
success: The study group has been switched successfully.
users:
platform_admin: Platform Admin
show:
current_study_group: Current Study Group
set_as_current_study_group: Set as Current Study Group
study_groups: Study Groups
no_groups: This user is either not part of any group or you do not have the necessary permissions to view them.
will_paginate:
next_label: 'Next Page →'
page_gap: '…'

View File

@ -160,7 +160,11 @@ Rails.application.routes.draw do
end
end
resources :study_groups, only: %i[index show edit destroy update]
resources :study_groups, only: %i[index show edit destroy update] do
member do
post :set_as_current
end
end
resources :events, only: [:create]