diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_exercise.html | 46 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_quiz.html | 43 |
2 files changed, 58 insertions, 31 deletions
diff --git a/yaksh/templates/yaksh/add_exercise.html b/yaksh/templates/yaksh/add_exercise.html index dac35d4..77e3ee8 100644 --- a/yaksh/templates/yaksh/add_exercise.html +++ b/yaksh/templates/yaksh/add_exercise.html @@ -14,17 +14,41 @@ {% block content %} <form name=frm id=frm action="" method="post" > - {% csrf_token %} - <center> - <table class="span1 table"> - {{ form.as_table }} - </table> - <br/><br/> - </center> + {% csrf_token %} + <center> + <table class="span1 table"> + {{ form.as_table }} + </table> + <br/><br/> + </center> + <center><button class="btn" type="submit" id="submit" name="save_exercise"> Save + </button> - <center><button class="btn" type="submit" id="submit" name="questionpaper"> Save - </button> - - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> + <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> </form> +{% if exercise and course_id %} + {% if exercise.questionpaper_set.get.id %} + <center> + <h4>You can check the quiz by attempting it in the following modes:</h4> + <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ exercise.id }}/{{exercise.questionpaper_set.get.id}}/{{course_id}}" class="btn btn-primary">View Question Paper</a> + <button class="btn" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{exercise.id}}/{{course_id}}/");'>User Mode</button> + + <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/godmode/{{exercise.id}}/{{course_id}}/");'> + God Mode</button> + <a data-toggle="collapse" data-target="#help"> + <span class="glyphicon glyphicon-info-sign">Help</span></a> + <div id="help" class="collapse"> + <br/> + <ul> + <li><b>User Mode:</b> Attempt quiz the way normal users will attempt i.e. - + <ul> + <li><i>Quiz will have the same duration as that of the original quiz.</li> + <li>Quiz won't start if the course is inactive or the quiz time has expired.</li> + <li>You will be notified about quiz prerequisites.(You can still attempt the quiz though)</i></li> + </ul> + </p> + <li> <b>God Mode:</b> Attempt quiz without any time or eligibilty constraints.</p> + </div> + {% endif %} +{% endif %} {% endblock %} diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index d3705e3..684f804 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -35,31 +35,34 @@ </form> <br> -{% if quiz_id and course_id %} +{% if quiz and course_id %} + {% if quiz.questionpaper_set.get.id %} <center> <h4>You can check the quiz by attempting it in the following modes:</h4> - <button class="btn" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{quiz_id}}/{{course_id}}/");'>User Mode</button> - - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/godmode/{{quiz_id}}/{{course_id}}/");'> - God Mode</button> + <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/{{course_id}}" class="btn btn-primary">View Question Paper</a> + <button class="btn" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{quiz.id}}/{{course_id}}/");'>User Mode</button> + + <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/godmode/{{quiz.id}}/{{course_id}}/");'> + God Mode</button> <a data-toggle="collapse" data-target="#help"> <span class="glyphicon glyphicon-info-sign">Help</span></a> - <div id="help" class="collapse"> - <br/> - <ul> - <li><b>User Mode:</b> Attempt quiz the way normal users will attempt i.e. - - <ul> - <li><i>Quiz will have the same duration as that of the original quiz.</li> - <li>Quiz won't start if the course is inactive or the quiz time has expired.</li> - <li>You will be notified about quiz prerequisites.(You can still attempt the quiz though)</i></li> - </ul> - </p> - <li> <b>God Mode:</b> Attempt quiz without any time or eligibilty constraints.</p> - </div> - {% endif %} - <style type="text/css"> + <div id="help" class="collapse"> + <br/> + <ul> + <li><b>User Mode:</b> Attempt quiz the way normal users will attempt i.e. - + <ul> + <li><i>Quiz will have the same duration as that of the original quiz.</li> + <li>Quiz won't start if the course is inactive or the quiz time has expired.</li> + <li>You will be notified about quiz prerequisites.(You can still attempt the quiz though)</i></li> + </ul> + </p> + <li> <b>God Mode:</b> Attempt quiz without any time or eligibilty constraints.</p> + </div> + {% endif %} +{% endif %} +<style type="text/css"> #rendered_text{ width: 550px; } - </style> +</style> {% endblock %} |