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/templates | |
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/templates')
-rw-r--r-- | yaksh/templates/yaksh/error_template.html | 8 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/yaksh/templates/yaksh/error_template.html b/yaksh/templates/yaksh/error_template.html index 9cfeac1..b93d2f1 100644 --- a/yaksh/templates/yaksh/error_template.html +++ b/yaksh/templates/yaksh/error_template.html @@ -13,6 +13,9 @@ <div class="card-header alert-danger">Error No. {{ forloop.counter }}</div> <div class="card-body "> <div class=""> + {% if error.hidden %} + <strong> Hidden test case failed </strong> + {% else %} {% if not error.type %} <pre><code> {{error|safe}} </code></pre> @@ -87,10 +90,11 @@ </tr> </table> {% endif %} - </div> + {% endif %} + </div> </div> </div> <br> </div> {% endfor %} -{% endif %}
\ No newline at end of file +{% endif %} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index d955192..905a111 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -159,12 +159,15 @@ <span class="badge badge-pill badge-primary">Test cases: </span> </h5> + <ul> {% for testcase in question.get_test_cases %} + {% if not testcase.hidden %} <strong> - {{ forloop.counter }}. {{ testcase }} + <li> {{ testcase }} </li> </strong> - <br> + {% endif %} {% endfor %} + </ul> {% endif %} <br> <div class="card"> @@ -230,6 +233,7 @@ <div class="card-body"> {% with ans.error_list as err %} {% for error in err %} + {% if not error.hidden %} {% if error.type == 'stdio' %} {% if error.given_input %} <table class="table table-bordered table-responsive-sm"> @@ -293,6 +297,7 @@ {% else %} <pre><code> {{error}} </code></pre> {% endif %} + {% endif %} {% endfor %} {% endwith %} {% if question.type == "code" %} |