diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/course_modules.html | 16 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 11 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 16 | ||||
-rw-r--r-- | yaksh/templates/yaksh/quit.html | 10 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 10 |
5 files changed, 43 insertions, 20 deletions
diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html index 8e6f5a6..fad1be0 100644 --- a/yaksh/templates/yaksh/course_modules.html +++ b/yaksh/templates/yaksh/course_modules.html @@ -31,7 +31,7 @@ </span> <span class="glyphicon glyphicon-chevron-up" id="learning_units{{module.id}}{{course.id}}_up" style="display: none;"></span> <a data-toggle="collapse" data-target="#learning_units{{module.id}}{{course.id}}" onclick="view_unit('learning_units{{module.id}}{{course.id}}');"> - View Lessons/Quizzes</a> + View Lessons/Quizzes/Exercises</a> </td> <td> {% get_module_status user module course as module_status %} @@ -56,7 +56,7 @@ <div id="learning_units{{module.id}}{{course.id}}" class="collapse"> <table class="table"> <tr> - <th>Lesson/Quiz</th> + <th>Lesson/Quiz/Exercise</th> <th>Status</th> <th>Type</th> <th>View AnswerPaper</th> @@ -85,7 +85,15 @@ {% endif %} </td> <td> - {{unit.type|title}} + {% if unit.type == "quiz" %} + {% if unit.quiz.is_exercise %} + Exercise + {% else %} + Quiz + {% endif %} + {% else %} + Lesson + {% endif %} </td> <td> {% if unit.type == "quiz" %} @@ -109,4 +117,4 @@ {% else %} <h3> No lectures found </h3> {% endif %} -{% endblock %}
\ No newline at end of file +{% endblock %} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 2456433..b6b9f7e 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -151,7 +151,7 @@ {% for unit in module.get_learning_units %} <ul class="inputs-list"> <li> - {% if unit.learning_type == "quiz" %} + {% if unit.type == "quiz" %} {% if unit.quiz.is_exercise %} <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{unit.quiz.id}}/{{course.id}}"> {{unit.quiz.description}}</a> @@ -288,8 +288,13 @@ <ul class="inputs-list"> <li> {% if unit.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 fe5917c..b7251ad 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -199,20 +199,18 @@ question_type = "{{ question.type }}" {% 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 %} + {% if question.solution %} + <h4><u> Solution by teacher</u></h4> + {% else %} + <h4><u> No solution provided by teacher </u></h4> + {% endif%} + <font size=3 face=arial> {{ question.solution|safe }} </font> + </div> {% endif %} </div> <div class="panel-body"> diff --git a/yaksh/templates/yaksh/quit.html b/yaksh/templates/yaksh/quit.html index 78a9b47..ee72026 100644 --- a/yaksh/templates/yaksh/quit.html +++ b/yaksh/templates/yaksh/quit.html @@ -28,9 +28,13 @@ width="80" alt="YAKSH"></img> {% endblock %} {% endfor %} </table></center> - <center><h4>Your current answers are saved.</h4></center> - <center><h4> Are you sure you wish to quit the exam?</h4></center> - <center><h4> Be sure, as you won't be able to restart this exam.</h4></center> + {% if paper.question_paper.quiz.is_exercise %} + <center><h4> Are you sure you wish to quit the Exercise?</h4></center> + {% else %} + <center><h4>Your current answers are saved.</h4></center> + <center><h4> Are you sure you wish to quit the exam?</h4></center> + <center><h4> Be sure, as you won't be able to restart this exam.</h4></center> + {% endif %} <form action="{{URL_ROOT}}/exam/complete/{{ paper.attempt_number }}/{{module_id}}/{{ paper.question_paper.id }}/{{course_id}}/" method="post"> {% csrf_token %} <center> diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index 5f899e3..410b578 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -11,13 +11,21 @@ {% block main %} {% if not data.papers %} + {% if quiz.is_exercise %} + <p><b> You have not attempted the Exercise {{ quiz.description }} </b></p> + {% else %} <p><b> You have not attempted the quiz {{ quiz.description }} </b></p> + {% endif %} {% else %} {% for paper in data.papers %} {% if forloop.counter == 2 and data.questionpaperid %} <U><h2> Previous attempts </h2></U> {% endif %} - <h2> Quiz: {{ paper.question_paper.quiz.description }} </h2> + {% if quiz.is_exercise %} + <h2> Exercise: {{ paper.question_paper.quiz.description }} </h2> + {% else %} + <h2> Quiz: {{ paper.question_paper.quiz.description }} </h2> + {% endif %} <p> Attempt Number: {{ paper.attempt_number }}<br/> |