Fix: List only projects from one course

This commit is contained in:
Tim Schubert 2018-05-02 16:27:31 +02:00
parent 4117a92353
commit 9ff0cdb41b
2 changed files with 11 additions and 10 deletions

View file

@ -242,16 +242,15 @@ def plagiates(gl, conf, args):
def list_projects(gl, conf, args):
for course in conf['courses']:
groups = gl.groups.list(search=course.name)
if len(groups) == 0:
pass
group = groups[0]
if group.path != args.course[0]:
pass
for project in group.projects.list(all=True):
project = gl.projects.get(project.id)
print(project.ssh_clone_url)
groups = gl.groups.list(search=args.course)
print(groups)
if len(groups) == 0:
pass
for g in groups:
if (g.name == args.course):
for project in g.projects.list(all=True):
project = gl.projects.get(project.id)
print(project.ssh_url_to_repo)
def parseconf(conf):