From 979ce81f0a275a22a4e9ca875c7f5c36dab7d44a Mon Sep 17 00:00:00 2001 From: prathamesh Date: Fri, 12 Aug 2016 14:59:46 +0530 Subject: Removed for loop from the question template. Once the code question is correct, user must see the message Correct Output for two seconds and then url redirection. But since this was written in a for loop, so multiple requests almost simultaneously were sent by a single user. This caused the server to go down. For now removed for loop. --- yaksh/templates/yaksh/question.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 2d52009..73d851a 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -89,9 +89,7 @@ function call_skip(url) {% if paper.questions_left %} window.setTimeout(function() { - {% for qid in paper.questions.all %} - location.href="{{ URL_ROOT }}/exam/{{ qid.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" - {% endfor %} + location.href="{{ URL_ROOT }}/exam/{{ paper.current_question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" }, 2000); {% else %} window.setTimeout(function() -- cgit From 23ce8a47eeacba027ca35d6f0bcbd3ff78692913 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Fri, 19 Aug 2016 10:58:44 +0530 Subject: - Modify admin.py to include Course model - Modify user.html and complete.html to include id for html elements --- yaksh/templates/user.html | 2 +- yaksh/templates/yaksh/complete.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html index 4074656..009dd2f 100644 --- a/yaksh/templates/user.html +++ b/yaksh/templates/user.html @@ -34,7 +34,7 @@
  • Change Password
  • diff --git a/yaksh/templates/yaksh/complete.html b/yaksh/templates/yaksh/complete.html index 07cbf3a..98adf9b 100644 --- a/yaksh/templates/yaksh/complete.html +++ b/yaksh/templates/yaksh/complete.html @@ -29,5 +29,5 @@

    Good bye!

    {{message}}


    You may now close the browser.


    -
    Login Again
    +
    Login Again
    {% endblock content %} -- cgit From b259e65bbadc62a9368238e778af5c205b32f5f6 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 8 Aug 2016 16:07:25 +0530 Subject: made UI changes to courses page and teacher can add another teacher --- yaksh/templates/yaksh/addteacher.html | 11 +++++- yaksh/templates/yaksh/courses.html | 74 ++++++++++++++++++++++++++++++++--- 2 files changed, 79 insertions(+), 6 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/addteacher.html b/yaksh/templates/yaksh/addteacher.html index 7e04f71..2ab107b 100644 --- a/yaksh/templates/yaksh/addteacher.html +++ b/yaksh/templates/yaksh/addteacher.html @@ -18,6 +18,13 @@

    + +{% if message %} +
    + Sorry! {{message}} +
    +{% endif %} +
    {% csrf_token %} {% if success == True %} @@ -57,7 +64,9 @@ {% if status == True %}
    -
    Teacher(s) Added

    +
    + Congrats! Following Teachers have been added: +
    {% if teachers_added %} {% for teacher in teachers_added %}
    diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 06c848c..1c68472 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -9,15 +9,12 @@ {% endblock %} {% block manage %} -View Allotted Courses
    + {% if not courses %}

    No new Courses added

    {% else %}

    Course(s) Added

    {% for course in courses %} - {% if user != course.creator %} -

    {{course.creator.get_full_name}} added you to this course

    - {% endif %}
    @@ -79,7 +76,74 @@


    {% endfor %} + {% endif %} + +{% if allotted_courses %} +

    Course(s) Allotted

    + + {% for course in allotted_courses %} +
    +
    +
    +
    +

    + Course + {% if course.active %} + Active + {% else %} + Closed + {% endif %} +

    + {{ course.name }} +

    +
    +
    +
    Course Creator
    + {{course.creator}} +
    Teacher(s) Added to {{ course }}
    + {% if course.get_teachers %} +
    + + {% csrf_token %} + {% for teacher in course.get_teachers %} +
    +
    +
    +  {{ teacher.get_full_name }} +
    +
    +
    + {% endfor %} + +
    + {% else %} +
    No Teacher(s) Added
    + {% endif %} + +
    +
    +
    + +
    +

    Quiz(zes)

    + {% if course.get_quizzes %} + {% for quiz in course.get_quizzes %} + {{ quiz.description }}
    + {% endfor %} + {% else %} +

    No quiz

    + {% endif %} +
    +
    +
    +
    +

    + {% endfor %} +{% endif %} + {% if courses or allotted_courses %} -{% endif %} +{% endif %} {% endblock %} -- cgit From 29c50ad458de008b0672d0f2b1c64278a963850c Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Tue, 9 Aug 2016 11:32:19 +0530 Subject: changed search_teacher function to exclude course creator --- yaksh/templates/yaksh/addteacher.html | 11 +---------- yaksh/templates/yaksh/courses.html | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/addteacher.html b/yaksh/templates/yaksh/addteacher.html index 2ab107b..6722a52 100644 --- a/yaksh/templates/yaksh/addteacher.html +++ b/yaksh/templates/yaksh/addteacher.html @@ -19,12 +19,6 @@


    -{% if message %} -
    - Sorry! {{message}} -
    -{% endif %} -
    {% csrf_token %} {% if success == True %} @@ -63,10 +57,7 @@
    {% if status == True %}
    -
    -
    - Congrats! Following Teachers have been added: -
    +
    {% if teachers_added %} {% for teacher in teachers_added %}
    diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 1c68472..5e2266c 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -11,9 +11,9 @@ {% block manage %} {% if not courses %} -

    No new Courses added

    +

    No new Courses created

    {% else %} -

    Course(s) Added

    +

    Course(s) Created

    {% for course in courses %}
    -- cgit From 5d49a64d11d6a6868c74bf9a22bb7cc0fa7b8c6b Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 29 Aug 2016 13:53:41 +0530 Subject: changed template; modified search_teacher, add_teacher and remove_teachers view functions --- yaksh/templates/yaksh/courses.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 5e2266c..42f49d1 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -141,9 +141,11 @@


    {% endfor %} +{% else %} +

    No new Courses allotted

    {% endif %} + {% if courses or allotted_courses %} - {% endif %} {% endblock %} -- cgit From 45cfca69a8af52fb838de48706ed5e4ddc1b1042 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Mon, 29 Aug 2016 17:37:23 +0530 Subject: Answer saved again after correctly submitted, fixed. Removed javascript that makes user wait for 2 seconds when the code question is correct. All the other html elements are accessible by user during the wait. This also caused the duplicate save during the wait, as they can skip at that point and the answer is saved again. Added a check that if question is already answered then do not save it. This also resolves the monitor(use data) page problem of showing marks obtained zero even when it is correct. Removed skipped answers from the monitor page. --- yaksh/templates/yaksh/question.html | 21 +++++++-------------- yaksh/templates/yaksh/user_data.html | 10 +++++++--- 2 files changed, 14 insertions(+), 17 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 73d851a..9a0f899 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -85,19 +85,6 @@ function call_skip(url) form.action = url form.submit(); } - {% if error_message == 'Correct Output'%} - {% if paper.questions_left %} - window.setTimeout(function() - { - location.href="{{ URL_ROOT }}/exam/{{ paper.current_question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" - }, 2000); - {% else %} - window.setTimeout(function() - { - location.href="{{ URL_ROOT }}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" - }, 2000); - {% endif %} - {% endif %} {% endblock script %} @@ -165,11 +152,17 @@ function call_skip(url) {% if question.type == "mcq" %} + {% if error_message %} +

    {{ error_message }}

    + {% endif %} {% for test_case in test_cases %} {{ test_case.options }}
    {% endfor %} {% endif %} {% if question.type == "mcc" %} + {% if error_message %} +

    {{ error_message }}

    + {% endif %} {% for test_case in test_cases %} {{ test_case.options }}
    @@ -188,7 +181,7 @@ function call_skip(url) {% endif %} - {% if question.type == "mcq" or question.type == "mcc "%} + {% if question.type == "mcq" or question.type == "mcc"%}
       {% elif question.type == "upload" %}
       diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 04544f9..2e7db50 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -56,11 +56,15 @@ User IP address: {{ paper.user_ip }}

    Student answer: {{ answers.0 }}

    {% else %}{# non-mcq questions #} -
     
    -{% for answer in answers %}################################################################################
    +{% for answer in answers %}
    +{% if not answer.skipped %}
    +
    +###############################################################################
     {{ answer.answer.strip }}
     # Autocheck: {{ answer.error }}
    -{% endfor %}
    +
    +{% endif %} +{% endfor %} {% endif %} {% with answers|last as answer %}

    Marks: {{answer.marks}}

    -- cgit