Add role checks for ProgrammingGroup

So far, a programming group is always considered to be a learner. While we could, technically, consider it to be a teacher or an admin if all members have this role, this behaviour might have unintended side effects.
This commit is contained in:
Sebastian Serth
2023-10-29 22:09:24 +01:00
parent cc3d8f3fcc
commit 6ba567a903

View File

@ -28,6 +28,18 @@ class ProgrammingGroup < ApplicationRecord
false
end
def learner?
true
end
def teacher?
false
end
def admin?
false
end
def self.parent_resource
Exercise
end