From e436ec35a4086a16208e30e1384ca0ebc8082570 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Mon, 19 Dec 2016 06:35:00 +0530 Subject: change in add question interface --- yaksh/templates/yaksh/add_question.html | 69 +++++++++++++++++++------- yaksh/templates/yaksh/new_question.html | 86 --------------------------------- 2 files changed, 51 insertions(+), 104 deletions(-) delete mode 100644 yaksh/templates/yaksh/new_question.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index e1b05fe..91c7de4 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -13,20 +13,20 @@ {% block onload %} onload='javascript:textareaformat();' {% endblock %} {% block content %} -
+ {% csrf_token %}
-
Summary: {{ form.summary }}{{ form.summary.errors }} -
Language: {{form.language}}{{form.language.errors}} -
Type: {{ form.type }}{{form.type.errors}} -
Points:{{form.points }}{{ form.points.errors }} +
Summary: {{ qform.summary }}{{ qform.summary.errors }} +
Language: {{qform.language}}{{qform.language.errors}} +
Type: {{ qform.type }}{{qform.type.errors}} +
Points:{{qform.points }}{{ qform.points.errors }}
Rendered:

-
Description: {{ form.description}} {{form.description.errors}} -
Tags: {{ form.tags }} -
Snippet: {{ form.snippet }} -
Partial Grading: {{ form.partial_grading }} -
Test Case Type: {{ form.test_case_type }}{{ form.test_case_type.errors }} -
File: {{ upload_form.file_field }}{{ upload_form.file_field.errors }} +
Description: {{ qform.description}} {{qform.description.errors}} +
Tags: {{ qform.tags }} +
Snippet: {{ qform.snippet }} +
Partial Grading: {{ qform.partial_grading }} +
Test Case Type: {{ qform.test_case_type }}{{ qform.test_case_type.errors }} +
File: {{ fileform.file_field }}{{ fileform.file_field.errors }} {% if uploaded_files %}
Uploaded files:
Check on delete to delete files, extract to extract files and hide to hide files from student(if required)
{% for file in uploaded_files %} @@ -36,22 +36,55 @@ {% if file.hide %} show{% else %} hide{% endif %}
{{ file.file.name }} -
{% endfor %}{% endif %} +
- {{ test_case_formset.management_form }} + {{ standardformset.management_form }} + + {% for stdform in standardformset %} + + {% endfor %} - {% for form in test_case_formset %} - +
+
+ {{ stdioformset.management_form }} + {% for ioform in stdioformset %} + {% endfor %}
+
+ {{ mcqformset.management_form }} - + {% for mcqform in mcqformset %} + + {% endfor %} +
+
+ {{ hookformset.management_form }} + + {% for hookform in hookformset %} + + {% endfor %} +
+

- +
diff --git a/yaksh/templates/yaksh/new_question.html b/yaksh/templates/yaksh/new_question.html deleted file mode 100644 index 9e6f239..0000000 --- a/yaksh/templates/yaksh/new_question.html +++ /dev/null @@ -1,86 +0,0 @@ -{% extends "manage.html" %} - -{% block pagetitle %} Add Question {% endblock pagetitle %} - -{% block css %} - -{% endblock %} - -{% block script %} - -{% endblock %} - -{% block onload %} onload='javascript:textareaformat();' {% endblock %} - -{% block content %} - - {% csrf_token %} - {{ qform.as_p}} - {% if uploaded_files %}
Uploaded files:
Check on delete to delete files, - extract to extract files and hide to hide files from student(if required)
- {% for file in uploaded_files %} -  delete  - {% if file.extract %} dont extract{% else %} - extract{% endif %}   - {% if file.hide %} show{% else %} - hide{% endif %}
- {{ file.file.name }} -
- {% endfor %}{% endif %} -
- {{ standardformset.management_form }} - - {% for stdform in standardformset %} - - {% endfor %} - -
-
-
- {{ stdioformset.management_form }} - {% for ioform in stdioformset %} - - {% endfor %} - -
-
-
- {{ mcqformset.management_form }} - - {% for mcqform in mcqformset %} - - {% endfor %} -
-
-
- {{ hookformset.management_form }} - - {% for hookform in hookformset %} - - {% endfor %} -
-
-

- - -
- - - -
- -{% endblock %} -- cgit