Adjust teacher permissions:

* Hide non-public exercises and proxy exercises
* Hide average working time value on statistic page
* Add hint about filter to submission page for teachers
* Hide display name from feedback page
This commit is contained in:
Sebastian Serth
2020-09-07 18:31:45 +02:00
parent 8b087e897c
commit afafe0c218
8 changed files with 12 additions and 6 deletions

View File

@ -4,7 +4,7 @@ class ExercisePolicy < AdminOrAuthorPolicy
end
[:show?, :feedback?, :requests_for_comments?, :statistics?].each do |action|
define_method(action) { admin? || teacher? }
define_method(action) { admin? || teacher_in_study_group? || teacher? && @record.public? || author? }
end
def study_group_dashboard?