Skip to content
Snippets Groups Projects
Commit 4163888f authored by Jakob Dieterle's avatar Jakob Dieterle
Browse files

group filter on studentlist now only shows assigned groups for tutors.

parent 7320fbba
No related branches found
No related tags found
1 merge request!279Resolve "Reviewers should be able to assign Exercise-Groups to Tutors"
Pipeline #216458 failed
...@@ -228,15 +228,15 @@ export default { ...@@ -228,15 +228,15 @@ export default {
return [] return []
}, },
groups () { groups () {
return Assignments.state.groups.slice().sort((a, b) => { if (Authentication.isTutor) {
const matches_a = a.name.match(/(\d+)/) return Authentication.state.user.exerciseGroups
const number_a = Number(matches_a === null ? 0 : matches_a[1]) }
else if (Authentication.isReviewer) {
const matches_b = b.name.match(/(\d+)/) return Assignments.state.groups
const number_b = Number(matches_b === null ? 0 : matches_b[1]) }
else {
return (number_a<number_b?-1:(number_a>number_b?1:0)) return []
}) }
}, },
}, },
created () { created () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment