From c5ae3d4589a71c3f3b9f622c7b67a04277269cde Mon Sep 17 00:00:00 2001 From: prathamesh Date: Tue, 4 Oct 2016 16:57:25 +0530 Subject: Edit Question Paper Feature. Can edit question paper. For creating new and editing existing question paper, same UI and view is used. Ajax previously used for creation is removed. Not necessary as post request handles the same. Removed unnecessary js. --- yaksh/templates/manage.html | 6 + yaksh/templates/yaksh/add_quiz.html | 2 +- yaksh/templates/yaksh/ajax_questions.html | 31 ----- yaksh/templates/yaksh/courses.html | 25 ++-- yaksh/templates/yaksh/design_questionpaper.html | 178 ++++++++++++++---------- 5 files changed, 131 insertions(+), 111 deletions(-) delete mode 100644 yaksh/templates/yaksh/ajax_questions.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 63c0ea7..f4c524e 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -46,6 +46,12 @@ +
+
+ {% block new_manage %} + {% endblock %} +
+
{% block manage %} diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index 5a0bee4..1c73e12 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -20,7 +20,7 @@ -
+
diff --git a/yaksh/templates/yaksh/ajax_questions.html b/yaksh/templates/yaksh/ajax_questions.html deleted file mode 100644 index e343f9b..0000000 --- a/yaksh/templates/yaksh/ajax_questions.html +++ /dev/null @@ -1,31 +0,0 @@ -
- {% if questions %} - - Select All - {% endif %} -
    - - {% for question in questions %} -
  • - -
  • - {% endfor %} -
-
- -
- -
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 43f323b..dcf9af5 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -18,11 +18,10 @@ {% if user != course.creator %}

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

{% endif %} -
-
+

Course {% if course.active %} @@ -35,7 +34,7 @@

{% if user == course.creator %}

-
+
Teacher(s) Added to {{ course }}
{% if course.get_teachers %}
@@ -65,12 +64,23 @@

Add Teacher

{% endif %} -
-

Quiz(zes)

+
{% if course.get_quizzes %} - {% for quiz in course.get_quizzes %} +

Quiz(zes)

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

Question Paper(s)

+ {% for quiz in course.get_quizzes %} + {% if quiz.questionpaper_set.get %} + Question Paper for {{ quiz.description }}
+ {% else %} +

No Question Paper + +

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

No quiz

@@ -79,7 +89,6 @@

-


diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html index 2aa169b..435de83 100644 --- a/yaksh/templates/yaksh/design_questionpaper.html +++ b/yaksh/templates/yaksh/design_questionpaper.html @@ -1,12 +1,12 @@ {% extends "manage.html" %} -{% block subtitle %}Design Question Paper{% endblock %} +{% block title %} Design Question Paper {% endblock title %} + +{% block subtitle %} Design Question Paper {% endblock %} {% block css %} - - - - + + {% endblock %} -{% block script %} - - - - - +{% block script %} + + + + {% endblock %} -{% block manage %} - +{% block new_manage %} +
+ + {% csrf_token %} +
Manual mode to design the {{lang}} Question Paper

  • @@ -46,42 +48,62 @@ select
- {% csrf_token %}
-

Total Marks: 0

+

Total Marks: {{ qpaper.total_marks }}

Please select Question type and Marks
-
- {{ form.question_type }} -
-
- {{ form.marks }} -
-
-
-
+
+ {{ filter_form.question_type }} +
+
+ {{ filter_form.marks }} +


-
-
+

Select questions to add:

+ {% if state == "fixed" or state == "None" %} +
    + {% for question in questions %} +
  • + +
  • + {% endfor %} +
+ {% endif %}
- Add to paper +

+
-
+

Fixed questions currently in paper:

+
    + {% for question in fixed_questions %} +
  • + +
  • + {% endfor %} +
+
+
@@ -89,25 +111,66 @@ select -
-
-
+

Select questions to add to the pool:

+ {% if state == "random" %} + +
    + {% for question in questions %} +
  • + +
  • + {% endfor %} +
+ {% endif %}
- Add to paper +

+
-
+

Pool of questions currently in paper:

+
    + {% for random_set in random_sets %} +
  • + +
  • + {% for question in random_set.questions.all %} +
  • + +
  • + {% endfor %} + {% endfor %} +
+
+
@@ -124,11 +187,10 @@ select
Almost finished creating your question paper


- - +
< Previous @@ -139,44 +201,18 @@ select
-
- - - - - -
- {% endblock %} +{% block manage %} +{% endblock %} -- cgit