diff options
author | prathamesh | 2018-01-02 16:46:52 +0530 |
---|---|---|
committer | prathamesh | 2018-01-02 16:46:52 +0530 |
commit | e14514e01052fb36cd9f14675cbe7ca940945a34 (patch) | |
tree | 994f3d5dd6d8c4f3614d3b1a655c91caa7426dcf /yaksh/templates | |
parent | 7fe8e17438b8e67e7290f11ddcd29cda3953921b (diff) | |
download | online_test-e14514e01052fb36cd9f14675cbe7ca940945a34.tar.gz online_test-e14514e01052fb36cd9f14675cbe7ca940945a34.tar.bz2 online_test-e14514e01052fb36cd9f14675cbe7ca940945a34.zip |
Allowed user to skip and view solution if the answer is correct.
Added solution attribute to the Question model.
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_question.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 9 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 17 |
3 files changed, 26 insertions, 2 deletions
diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index c294d9a..4ec9bee 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -24,6 +24,8 @@ <tr><td><strong>Rendered: </strong><td><p id='my'></p> <tr><td>Description: <td>{{ qform.description}} {{qform.description.errors}} <tr><td>Tags: <td>{{ qform.tags }} + <tr><td><strong>Rendered Solution: </strong><td><p id='rend_solution'></p> + <tr><td>Solution: <td>{{ qform.solution }} <tr><td>Snippet: <td>{{ qform.snippet }} <tr><td>Minimum Time(in minutes):<td> {{ qform.min_time }} <tr><td>Partial Grading: <td>{{ qform.partial_grading }} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index a06ee7e..a41c8c3 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -151,8 +151,13 @@ <ul class="inputs-list"> <li> {% if unit.learning_type == "quiz" %} - <a href="{{URL_ROOT}}/exam/manage/addquiz/{{unit.quiz.id}}/{{course.id}}"> - {{unit.quiz.description}}</a> + {% if unit.quiz.is_exercise %} + <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{unit.quiz.id}}/{{course.id}}"> + {{unit.quiz.description}}</a> + {% else %} + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{unit.quiz.id}}/{{course.id}}"> + {{unit.quiz.description}}</a> + {% endif %} {% else %} <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{unit.lesson.id}}/{{course.id}}"> {{unit.lesson.name}}</a> diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 978d226..c9a5211 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -192,6 +192,23 @@ function call_skip(url) <h5><a href="{{f_name.file.url}}">{{f_name.file.name}}</a></h5> {% endfor %} {% endif %} + + {% if quiz.is_exercise %} + {% if question.solution %} + <h4><u> Solution by teacher</u></h4> + {% else %} + <h4><u> No solution provided by teacher </u></h4> + {% endif%} + {% if can_skip %} + <div id="solution"> + <font size=3 face=arial> {{ question.solution|safe }} </font> + </div> + {% else %} + <div id="solution" style="display:none"> + <font size=3 face=arial> {{ question.solution|safe }} </font> + </div> + {% endif %} + {% endif %} </div> <div class="panel-body"> {% if question.type == "mcq" %} |