diff options
author | prathamesh | 2020-06-10 11:56:49 +0530 |
---|---|---|
committer | prathamesh | 2020-06-10 11:56:49 +0530 |
commit | c27bc87afd68266da59af6e7f2b3b8cc8db13fad (patch) | |
tree | 9075a0019cbba086f4bdefb54346b259d8580cb6 /yaksh/grader.py | |
parent | 73dc8f6820c6c86fd8e70a68456ca2e541801bde (diff) | |
download | online_test-c27bc87afd68266da59af6e7f2b3b8cc8db13fad.tar.gz online_test-c27bc87afd68266da59af6e7f2b3b8cc8db13fad.tar.bz2 online_test-c27bc87afd68266da59af6e7f2b3b8cc8db13fad.zip |
Allow moderator to hide test cases from the user
Diffstat (limited to 'yaksh/grader.py')
-rw-r--r-- | yaksh/grader.py | 3 |
1 files changed, 3 insertions, 0 deletions
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: |