Skip to content
Snippets Groups Projects
Commit 0be2f9e1 authored by Tue Herlau's avatar Tue Herlau
Browse files

2021 coming up

parent 9e5b2b63
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
......@@ -48,7 +48,7 @@ parser.add_argument('--passall', action="store_true", help='Automatically pass
# const=sum, default=max,
# help='sum the integers (default: find the max)')
def evaluate_report_student(report, question=None, qitem=None, unmute=None):
def evaluate_report_student(report, question=None, qitem=None, unmute=None, passall=None):
args = parser.parse_args()
if question is None and args.q is not None:
question = args.q
......@@ -61,8 +61,10 @@ def evaluate_report_student(report, question=None, qitem=None, unmute=None):
if unmute is None:
unmute = args.unmute
results, table_data = evaluate_report(report, question=question, qitem=qitem, verbose=False, passall=args.passall, show_expected=args.showexpected, show_computed=args.showcomputed,unmute=unmute)
if passall is None:
passall = args.passall
print(args.unmute, unmute)
results, table_data = evaluate_report(report, question=question, qitem=qitem, verbose=False, passall=passall, show_expected=args.showexpected, show_computed=args.showcomputed,unmute=unmute)
if question is None:
print("Provisional evaluation")
......@@ -128,15 +130,18 @@ def evaluate_report(report, question=None, qitem=None, passall=False, verbose=Fa
if not hidden:
print(ss, end="")
sys.stdout.flush()
from timeit import timeit
timeit()
(current, possible) = item.get_points(show_expected=show_expected, show_computed=show_computed,unmute=unmute, passall=passall)
q_[j] = {'w': iw, 'possible': possible, 'obtained': current, 'hidden': hidden, 'computed': str(item._computed_answer)}
tsecs = np.round(timeit(), 2)
# q.possible += possible * iw
# q.obtained += current * iw
if not hidden:
if current == possible:
print(f"PASS")
else:
print(f"*** FAILED")
ss = "PASS" if current == possible else "*** FAILED"
ss += " ("+ str(tsecs) + " seconds)"
print(ss)
ws, possible, obtained = upack(q_)
possible = int(ws @ possible)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment