From 2943099f08a0ee2559f59a1f2d43d03cefd6e1b8 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 8 Jan 2018 15:15:53 +0530 Subject: Add instructions for demo quiz --- yaksh/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaksh/models.py b/yaksh/models.py index 2f616cf..6622067 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -330,7 +330,7 @@ class Quiz(models.Model): duration=30, active=True, attempts_allowed=-1, time_between_attempts=0, description='Yaksh Demo quiz', pass_criteria=0, - creator=user + creator=user, instructions="This is a demo quiz." ) return demo_quiz -- cgit From 01b4eaa6543c333a2a09748701301f286b14f50c Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 8 Jan 2018 15:45:22 +0530 Subject: Fix assignment upload question --- yaksh/static/yaksh/js/requesthandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaksh/static/yaksh/js/requesthandler.js b/yaksh/static/yaksh/js/requesthandler.js index f98ab12..e6048b2 100644 --- a/yaksh/static/yaksh/js/requesthandler.js +++ b/yaksh/static/yaksh/js/requesthandler.js @@ -164,7 +164,7 @@ if (question_type == 'upload' || question_type == 'code') { var data = $(this).serializeArray(); } else if (question_type == "upload"){ - var data = new FormData(getElementById("code")); + var data = new FormData(document.getElementById("code")); } ajax_check_code($(this).attr("action"), "POST", "html", data, null) e.preventDefault(); // To stop the default form submission. -- cgit From cc956355f8ddb13e9430f6e41ab183eebc848530 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 8 Jan 2018 16:57:42 +0530 Subject: Allow access to previous completed questions in exercises --- yaksh/templates/exam.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index ce1d3b8..012adbe 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -60,6 +60,10 @@ {% else %} {% if qid.id == question.id %}
  • {{ forloop.counter }}
  • + {% elif qid in paper.get_questions_answered %} +
  • {{ forloop.counter }}
  • {% else %}
  • {{ forloop.counter }}
  • {% endif %} -- cgit From f0fafed7ba0002369f528a901d9e5590f5bd3bea Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 8 Jan 2018 17:29:23 +0530 Subject: Separate solution div from question description div --- yaksh/static/yaksh/js/requesthandler.js | 4 +++- yaksh/templates/yaksh/question.html | 38 ++++++++++++++++----------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/yaksh/static/yaksh/js/requesthandler.js b/yaksh/static/yaksh/js/requesthandler.js index e6048b2..ec2391a 100644 --- a/yaksh/static/yaksh/js/requesthandler.js +++ b/yaksh/static/yaksh/js/requesthandler.js @@ -37,7 +37,9 @@ function unlock_screen() { } function show_solution() { - document.getElementById("solution").style.display = "block"; + var solution = document.getElementById("solution"); + solution.style.display = "block"; + solution.className ="well well-sm"; document.getElementById("skip_ex").style.visibility = "visible"; } diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index b7251ad..c7e6efb 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -144,21 +144,6 @@ question_type = "{{ question.type }}" {% endblock %} {% block main %} -

    - {% if notification %} - {% if question.type == "code" %} - - {% else %} - - {% endif %} - {% else %} - - {% endif %}
    {% csrf_token %} @@ -197,22 +182,20 @@ question_type = "{{ question.type }}"
    {{f_name.file.name}}
    {% endfor %} {% endif %} - + +
    {% if quiz.is_exercise %} {% if can_skip %} -
    +
    {% else %} {% endif %} -
    {% if question.type == "mcq" %} {% for test_case in test_cases %} @@ -304,6 +287,21 @@ question_type = "{{ question.type }}"

    +

    + {% if notification %} + {% if question.type == "code" %} + + {% else %} + + {% endif %} + {% else %} + + {% endif %} {% if question.type == 'code' or question.type == 'upload' %}
    {% endif %} -- cgit