Merge pull request #7 from timschubert/fix/subgroups

Fix/subgroups
This commit is contained in:
Tim Schubert 2018-10-17 11:28:31 +02:00 committed by GitHub
commit c7ba178f03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -54,7 +54,7 @@ Next, since there is currently no API available to export a list of participants
This list may of course change from time to time, so make sure to re-run the script regularly. This list may of course change from time to time, so make sure to re-run the script regularly.
``` ```
$ abgabesystem users -s <students.csv> -b <LDAP base domain> -p main $ abgabesystem users -c <course> -s <students.csv> -b <LDAP base domain> -p main
``` ```
Now create a fork of this repository inside the namespace of the course. Now create a fork of this repository inside the namespace of the course.

View file

@ -3,7 +3,7 @@ import logging as log
from gitlab import DEVELOPER_ACCESS from gitlab import DEVELOPER_ACCESS
from gitlab.exceptions import GitlabError, GitlabCreateError from gitlab.exceptions import GitlabError, GitlabCreateError
from .students import enrolled_students from .students import enrolled_students
from .course import InvalidCourse from .course import InvalidCourse, create_solutions_group
def create_tag(project, tag, ref): def create_tag(project, tag, ref):
@ -144,7 +144,7 @@ def setup_projects(gl, course, deploy_key):
solutions = gl.groups.get(group.id) solutions = gl.groups.get(group.id)
if solutions is None: if solutions is None:
raise InvalidCourse("No solutions subgroup") solutions = create_solutions_group(gl, course)
reference_project = None reference_project = None
reference_projects = solutions.projects.list(search='solutions') reference_projects = solutions.projects.list(search='solutions')

View file

@ -137,7 +137,7 @@ def get_student_group(gl, course_name):
students_group = gl.groups.get(g.id) students_group = gl.groups.get(g.id)
if students_group is None: if students_group is None:
raise MissingStudentsGroup() students_group = create_students_group(gl, course)
return students_group return students_group