diff --git a/src/coursebox/core/projects.py b/src/coursebox/core/projects.py index e9285a098e7432b18a424281971d40ea3c0a7d16..f34d500e4c32a76e7fb105e837fa509f0ee04b73 100644 --- a/src/coursebox/core/projects.py +++ b/src/coursebox/core/projects.py @@ -168,14 +168,23 @@ def handle_projects(verbose=False, gather_main_xlsx_file=True, plagiarism_check= ins_email = v[0]['email'] nags.append((name, ins_email, nlines)) Nerrors = sum([n[-1] for n in nags]) + err = [] + serrors = None if Nerrors > 0: - print("\n> %i errors. These instructors have parse errors (.txt)" % sum([n[-1] for n in nags])) - print("; ".join([email for (_, email, _) in nags])) - print(", ".join([name.capitalize() for (name, _, _) in nags])) - print("TA/Errors: " + ", ".join(["%s:%i" % (name.capitalize(), lines) for (name, _, lines) in nags])) - print("---") + err.append("\n> %i errors. These instructors have parse errors (.txt)" % sum([n[-1] for n in nags])) + err.append("; ".join([email for (_, email, _) in nags])) + err.append(", ".join([name.capitalize() for (name, _, _) in nags])) + err.append("TA/Errors: " + ", ".join(["%s:%i" % (name.capitalize(), lines) for (name, _, lines) in nags])) + err.append("---") + + serrors = "\n".join(err) + print(serrors) + else: print("No parse errors found") + return serrors + + def compute_error_files(info, paths):