summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorankitjavalkar2018-07-05 17:46:00 +0530
committerankitjavalkar2018-07-13 13:00:35 +0530
commit69a07a92309105b289f4d08957729bda68727bf2 (patch)
tree085e152ce20dc050f7144e4e958788c03f972184 /yaksh/templates
parent26ca38c6243eaa1d94bca68481eb60b2276ab7b2 (diff)
downloadonline_test-69a07a92309105b289f4d08957729bda68727bf2.tar.gz
online_test-69a07a92309105b289f4d08957729bda68727bf2.tar.bz2
online_test-69a07a92309105b289f4d08957729bda68727bf2.zip
- Add buttons to Moderator and Student templates
- Modify _add_to_moderator function to _toggle_moderator_function in order to allow addition and removal of moderator group link
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/moderator_dashboard.html5
-rw-r--r--yaksh/templates/yaksh/quizzes_user.html7
-rw-r--r--yaksh/templates/yaksh/view_profile.html1
3 files changed, 11 insertions, 2 deletions
diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html
index 17a4924..c848074 100644
--- a/yaksh/templates/yaksh/moderator_dashboard.html
+++ b/yaksh/templates/yaksh/moderator_dashboard.html
@@ -8,7 +8,10 @@
{% block content %}
-<center><h4>List of quizzes! Click on the given links to have a look at answer papers for a quiz.</h4></center>
+<center><h4 class="pull-left">List of quizzes! Click on the given links to have a look at answer papers for a quiz.</h4></center>
+<a href="{{URL_ROOT}}/exam/toggle_moderator/" class="btn btn-primary pull-right">
+ Switch To Student
+</a>
<table class="table table-bordered">
<th>Courses</th>
<th>Quizzes</th>
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html
index 78cdc48..68044da 100644
--- a/yaksh/templates/yaksh/quizzes_user.html
+++ b/yaksh/templates/yaksh/quizzes_user.html
@@ -7,6 +7,13 @@
<center>{{ msg }}</center>
</div>
{% endif %}
+ {% if user.profile.is_moderator %}
+ <div class="row">
+ <a href="{{URL_ROOT}}/exam/toggle_moderator/" class="btn btn-primary pull-right" style="margin-top: 20px; margin-bottom: 20px;">
+ Switch To Moderator
+ </a>
+ </div>
+ {% endif %}
{% if 'Enrolled Courses' not in title%}
<div class="row well">
<form action="{{ URL_ROOT }}/exam/quizzes/" method="post" id="custom-search-form" class="form-search form-horizontal">
diff --git a/yaksh/templates/yaksh/view_profile.html b/yaksh/templates/yaksh/view_profile.html
index 1b75e6e..ce95226 100644
--- a/yaksh/templates/yaksh/view_profile.html
+++ b/yaksh/templates/yaksh/view_profile.html
@@ -37,5 +37,4 @@
</tr>
</table>
<a class="btn btn-primary pull-right" href="{{ URL_ROOT }}/exam/editprofile/">Edit Profile</a>
- <a class="btn btn-primary pull-left" href="{{ URL_ROOT }}/exam/toggle_moderator/">Toggle Moderator Role</a>
{% endblock %}