Commit 637da91c authored by alan's avatar alan
Browse files

checkin

parent 296fa5f3
......@@ -13,8 +13,7 @@ use the main labtool program.
# Command Line Interface Creation Kit
# https://click.palletsprojects.com
from codecs import ignore_errors
from glob import glob1
import click
import logging
import logging.handlers
......@@ -50,6 +49,10 @@ def show_lab_summary(course, lab, user, email, tblfmt):
"course and lab is specified, user is optional"
#labnames = courses.load_labnames(course)
labname = f"lab{lab:02d}"
if 'gl' not in globals():
gl = GitLab()
projects = gl.search_all_projects(course, owned=False)
now = datetime.now(tz=dateutil.tz.tzlocal())
echo(f"loading {labname} for {course}")
......@@ -161,14 +164,9 @@ def show_lab_summary(course, lab, user, email, tblfmt):
else:
if user is None:
lazy_table.stream(list_lab_info(),
n_rows=len(projects),
headers="keys", tablefmt=tblfmt)
else:
lazy_table.stream(list_lab_info(), headers="keys", tablefmt=tblfmt)
if len(ungraded) > 0:
print (tabulate(list_lab_info(), headers="keys", tablefmt=tblfmt))
if len(ungraded) == 0:
print("All work is graded!")
else:
print("UNGRADED: ", ", ".join(ungraded))
......@@ -182,6 +180,8 @@ def get_grade(course,username, labname):
def show_course_summary(course, user, email, tblfmt):
"NO lab is specified, show COURSE summary"
labnames = sorted(courses.load_labnames(course))
if 'gl' not in globals():
gl = GitLab()
projects = gl.search_all_projects(course, owned=False)
now = datetime.now(tz=dateutil.tz.tzlocal())
echo(f"loading labs for {course}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment