Fixup: Lost change

This commit is contained in:
Tim Schubert 2018-09-20 16:35:46 +02:00
parent 758ed3b931
commit 8c4c557ae0

View file

@ -26,14 +26,16 @@ def enroll_students(gl, args):
def projects(gl, args): def projects(gl, args):
"""Creates the projects for all course participants """Creates the projects for all course participants
""" """
groups = gl.groups.list(search=args.course) course = None
if len(groups) == 0 and groups[0].name == args.course: for g in gl.groups.list(search=args.course):
log.warn('This group does not exist') if g.name == args.course:
course = g
if course is None:
log.warn('The course does not exist')
else: else:
group = groups[0] with open(args.deploy_key, 'r') as key:
with open(args.deploy_key, 'r') as key, open(args.students, encoding='iso8859') as students_csv:
key = key.read() key = key.read()
setup_projects(gl, group, students_csv, key) setup_projects(gl, course, key)
def deadline(gl, args): def deadline(gl, args):