From c27bc87afd68266da59af6e7f2b3b8cc8db13fad Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 10 Jun 2020 11:56:49 +0530 Subject: Allow moderator to hide test cases from the user --- yaksh/grader.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'yaksh/grader.py') diff --git a/yaksh/grader.py b/yaksh/grader.py index c1be493..c0d81fa 100644 --- a/yaksh/grader.py +++ b/yaksh/grader.py @@ -143,6 +143,9 @@ class Grader(object): test_case_instance.compile_code() eval_result = test_case_instance.check_code() test_case_success, err, mark_fraction = eval_result + if not isinstance(err, dict): + err = prettify_exceptions('Error', err) + err['hidden'] = test_case_instance.hidden if test_case_success: weight += mark_fraction * test_case_instance.weight else: -- cgit