blob: b896081336c18ce167f723f7b82e49436b5b4f06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{% extends "manage.html" %}
{% block subtitle %}Add Question{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/question_quiz.css" type="text/css" />
<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/autotaggit.css" />
{% endblock %}
{% block script %}
<script type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.4.2.min.js"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/add_question.js"></script>
{% endblock %}
{% block onload %} onload='javascript:textareaformat();' {% endblock %}
{% block manage %}
<form action="" method="post" name=frm onSubmit="return autosubmit();">
{% csrf_token %}
<center><table class=span1>
<tr><td>Summary: <td>{{ form.summary }}{{ form.summary.errors }}
<tr><td> Language: <td> {{form.language}}{{form.language.errors}}
<tr><td> Active: <td> {{ form.active }}{{form.active.errors}} Type: {{ form.type }}{{form.type.errors}}
<tr><td>Points:<td><button class="btn-mini" type="button" onClick="increase(frm);">+</button>{{ form.points }}<button class="btn-mini" type="button" onClick="decrease(frm);">-</button>{{ form.points.errors }}
<tr><td><strong>Rendered: </strong><td><p id='my'></p>
<tr><td>Description: <td>{{ form.description}} {{form.description.errors}}
<tr><td>Snippet: <td>{{ form.snippet }}{{ form.snippet.errors }}</td></tD></td></tr>
<tr><td>Tags: <td>{{ form.tags }}
<tr><td id='label_option'>Options: <td>{{ form.options }} {{form.options.errors}}
<tr><td id='label_solution'>Test: <td>{{ form.test }} {{form.test.errors}}
<tr><td id='label_ref_code_path'>Reference Code Path: <td>{{ form.ref_code_path }} {{form.ref_code_path.errors}}
<form method="post" action="">
{% if formset%}
{{ formset.management_form }}
{% for form in formset %}
{{ form }}
{% endfor %}
{% endif %}
</form>
</table></center>
<center><button class="btn" type="submit" name="add_test">Add Test Case</button>
<button class="btn" type="submit" name="delete_test">Remove Test Case</button>
</center><br>
<center><button class="btn" type="submit" name="save_question">Save</button>
<button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/questions/");'>Cancel</button> </center>
</form>
{% endblock %}
|