diff options
author | Prabhu Ramachandran | 2018-03-21 18:38:06 +0530 |
---|---|---|
committer | GitHub | 2018-03-21 18:38:06 +0530 |
commit | 4b356aa2f6097cd0f46292218f31ded18b631e53 (patch) | |
tree | 35f7ea09a2464eab2ef185209b7296a63af3f605 /yaksh/templates | |
parent | 30d8671a7c46505561f885e463f60cd04a61a76a (diff) | |
parent | 88fbad3f08dfcf8d139f8bc572860469c64e3104 (diff) | |
download | online_test-4b356aa2f6097cd0f46292218f31ded18b631e53.tar.gz online_test-4b356aa2f6097cd0f46292218f31ded18b631e53.tar.bz2 online_test-4b356aa2f6097cd0f46292218f31ded18b631e53.zip |
Merge pull request #456 from ankitjavalkar/preview-qp
Preview QuestionPaper as an HTML
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 3 | ||||
-rw-r--r-- | yaksh/templates/yaksh/preview_questionpaper.html | 42 |
2 files changed, 45 insertions, 0 deletions
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 78d21bf..dabf8eb 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -368,6 +368,9 @@ {% if quiz.questionpaper_set.get %} <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/"> Question Paper for {{ quiz.description }}</a> + <a href="{{URL_ROOT}}/exam/manage/preview_questionpaper/{{quiz.questionpaper_set.get.id}}" class="btn btn-primary active btn-xs" target="_blank"> + View + </a> <br> {% else %} <p>No Question Paper diff --git a/yaksh/templates/yaksh/preview_questionpaper.html b/yaksh/templates/yaksh/preview_questionpaper.html new file mode 100644 index 0000000..123218f --- /dev/null +++ b/yaksh/templates/yaksh/preview_questionpaper.html @@ -0,0 +1,42 @@ +{% extends "base.html" %} + +{% block pagetitle %} Quiz: {{ paper.quiz.description }} {% endblock pagetitle %} + +{% block content %} +<div class="well"> + <div class="col-md-12"> + <div class="col-md-6">Maximum Mark(s): {{ paper.total_marks }}</div> + <div class="col-md-6"><span class="pull-right">Total Time: {{ paper.quiz.duration }} minutes</span></div> + </div> +</div> +<div class="panel panel-default"> + <div class="panel-heading">Instructions</div> + <div class="panel-body" id="instructions"> + {{ paper.quiz.instructions|safe }} + </div> +</div> +{% for question in questions %} + <div class="panel panel-info"> + <div class="panel-heading"> + <strong> {{forloop.counter}}. {{ question.summary }} + <span class="marks pull-right"> Mark(s): {{ question.points }} </span> + </strong> + </div> + <div class="panel-body"> + <h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong> + <br/><b>Answer:</b><br/> + {% if question.type == "code" %} + <div class="well">{{ question.snippet }}<br/></div> + {% endif %} + {% if question.type == "mcq" or question.type == "mcc" %} + <h5> <u>Choices:</u></h5> + {% for testcase in question.get_test_cases %} + <br/><strong> + {{ forloop.counter }}. {{ testcase.options|safe }}</strong> + {% endfor %} + {% endif %} + + </div> + </div> +{% endfor %} +{% endblock %} |