From fe6c5c3b561c514fa328807fb8a571a620e438cf Mon Sep 17 00:00:00 2001 From: prathamesh Date: Thu, 12 Jan 2017 18:20:38 +0530 Subject: Exam interface improved --- yaksh/python_assertion_evaluator.py | 2 +- yaksh/static/yaksh/css/dashboard.css | 17 ++-- yaksh/templates/base.html | 3 +- yaksh/templates/exam.html | 78 +++++++++++++++++ yaksh/templates/user.html | 2 +- yaksh/templates/yaksh/question.html | 163 ++++++++++++----------------------- 6 files changed, 149 insertions(+), 116 deletions(-) create mode 100644 yaksh/templates/exam.html (limited to 'yaksh') diff --git a/yaksh/python_assertion_evaluator.py b/yaksh/python_assertion_evaluator.py index 749a6ec..8ff88b4 100644 --- a/yaksh/python_assertion_evaluator.py +++ b/yaksh/python_assertion_evaluator.py @@ -77,7 +77,7 @@ class PythonAssertionEvaluator(BaseEvaluator): fname, lineno, func, text = info[-1] text = str(self.test_case) err = "Expected Test Case:\n{0}\n" \ - "Error - {1} {2} in: {3}\n".format( + "Error - {1} {2} in:\n {3}\n".format( self.test_case, type.__name__, str(value), diff --git a/yaksh/static/yaksh/css/dashboard.css b/yaksh/static/yaksh/css/dashboard.css index bf76ec6..3049ef0 100644 --- a/yaksh/static/yaksh/css/dashboard.css +++ b/yaksh/static/yaksh/css/dashboard.css @@ -4,7 +4,7 @@ /* Move down content because we have a fixed navbar that is 50px tall */ body { - padding-top: 50px; + padding-top:30px; } @@ -68,17 +68,21 @@ body { */ .main { - padding: 20px; + padding: 0px; } @media (min-width: 768px) { .main { - padding-right: 40px; - padding-left: 40px; + padding-right: 0px; + padding-left: 0px; } } -.main .page-header { +.main { margin-top: 0; } +.header { + margin: 30px 0 15px; + border-bottom: 1px solid #eee; +} /* @@ -99,3 +103,6 @@ body { display: inline-block; border-radius: 50%; } +.sidebar-right { + float: right; +} diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html index b2560e8..35c6976 100644 --- a/yaksh/templates/base.html +++ b/yaksh/templates/base.html @@ -18,6 +18,7 @@ + {% block meta %} @@ -39,7 +40,7 @@ {% endblock %}
- -
- -{% endblock %} -{% block pagetitle %} Yaksh Online Test {% endblock pagetitle %} +{% block pagetitle %} {{ paper.question_paper.quiz.description }} {% endblock pagetitle %} {% block css %} + + {% endblock %} {% block script %} @@ -95,43 +88,52 @@ function call_skip(url) form.submit(); } + {% endblock script %} {% block onload %} onload="updateTime();" {% endblock %} -{% block content %} -
-
- -
-
-

{{ paper.questions_left }} question(s) left in {{ paper.question_paper.quiz.description }}

-
-
-
- {% csrf_token %} - -
-
- -
+{% block main %}

{% csrf_token %} @@ -200,13 +202,13 @@ function call_skip(url) {% endif %} {% if question.type == "code" %}
-
-

Program:

+
+

Write your program below:

- +

{% endif %} @@ -223,28 +225,10 @@ function call_skip(url) {% endif %}
- {% if question.type == "code" %} -
- + +{% endblock main %} - -{% endblock content %} -- cgit