Skip to content
Snippets Groups Projects
Commit 4ef45e3e authored by tuhe's avatar tuhe
Browse files

Viewing of remote results

parent 82ef0e8c
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,6 @@ def gather_upload_to_campusnet(report, output_dir=None, token_include_plaintext_
s = f.read()
from unitgrade.utils import checkout_remote_results
results = checkout_remote_results(report.remote_url, s.strip())
if results['html'] is None:
print("""Oy! I failed to download the verified results.
......@@ -137,7 +136,7 @@ for more information about what happened to your evaluation. Please don't contac
print("These scores are based on our internal tests.")
print("To see all your results, visit:")
print(">", results['url'])
print("Your total score was", results['total'])
print("Your total score was", results['score'])
sys.exit()
# import tabulate
# print( tabulate.tabulate(df, showindex=False) )
......
......@@ -4,37 +4,30 @@ import shutil
import numpy as np
import glob
import subprocess
import tempfile
def make_dummies(zip_file_path="zip1.zip", n_handins=3, screwups=4, student_base_dir=None, student_grade_file=None, instructor_base_dir=None):
# I am dum-dum.
dir = os.path.dirname(__file__)
import tempfile
# tmp = tempfile.tempdir
with tempfile.TemporaryDirectory() as tmp:
# tmp = dir + "/tmp"
if os.path.isdir(tmp):
shutil.rmtree(tmp)
os.mkdir(tmp)
print("Working in directory", tmp)
# now we got a temp dir.
# Deploy to this dir and create handins. Turn it all into a .zip file and return it.
np.random.seed(42)
manifests = {}
def copy_and_mutate():
if os.path.isdir(tmp + "/students"):
shutil.rmtree(tmp + "/students")
shutil.copytree(student_base_dir, tmp + "/students",dirs_exist_ok=True)
# Copy instructor files over and mutate.
for file in glob.glob(student_base_dir +"/**/*.py"):
# print(file)
rel = os.path.relpath(file, student_base_dir)
with open(tmp +"/students/"+rel, 'r') as f:
st_f = f.read()
......@@ -96,17 +89,3 @@ def make_dummies(zip_file_path="zip1.zip", n_handins=3, screwups=4, student_base
shutil.make_archive(zip_file_path[:-4], 'zip', tmp + "/zip", '')
return zip_file_path, manifests
# zipfolder('zip1', tmp + "/zip/"+handin_folder) # insert your variables here
# sys.exit()
#
# import zipfile
#
# with zipfile.ZipFile(zip_file_path, 'w') as zip:
# zip.
#
#
# a = 234
# pass
\ No newline at end of file
__version__ = "0.1.55"
__version__ = "0.1.56"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment