summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2016-03-23 11:14:47 +0530
committeradityacp2016-04-15 13:57:44 +0530
commit234cf831861045796a7bcf4e08a46b0c38016f75 (patch)
tree4af3e5a066b3aee420d60eef4fcc5e7a67fdc037 /yaksh/templates
parent97bdb23fbacc3e625beb96efdf58431f42604a81 (diff)
downloadonline_test-234cf831861045796a7bcf4e08a46b0c38016f75.tar.gz
online_test-234cf831861045796a7bcf4e08a46b0c38016f75.tar.bz2
online_test-234cf831861045796a7bcf4e08a46b0c38016f75.zip
EditProfile, ChangePassword, StudentsEnrollment facility
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/manage.html2
-rw-r--r--yaksh/templates/registration/password_change_done.html16
-rw-r--r--yaksh/templates/registration/password_change_form.html18
-rw-r--r--yaksh/templates/user.html2
-rw-r--r--yaksh/templates/yaksh/course_detail.html31
-rw-r--r--yaksh/templates/yaksh/editprofile.html21
-rw-r--r--yaksh/templates/yaksh/password_changed.html15
-rw-r--r--yaksh/templates/yaksh/profile_updated.html15
-rw-r--r--yaksh/templates/yaksh/view_profile.html48
9 files changed, 165 insertions, 3 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html
index 11e2187..a10291b 100644
--- a/yaksh/templates/manage.html
+++ b/yaksh/templates/manage.html
@@ -30,6 +30,8 @@
<li><a href="{{ URL_ROOT }}/exam/manage/gradeuser">Grade User</a></li>
<li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li>
<li><a href="{{ URL_ROOT }}/exam/manage/courses">Courses</a></li>
+<li><a href="{{ URL_ROOT }}/exam/manage/viewprofile">My Profile</a></li>
+<li><a href="{{ URL_ROOT }}/exam/changepassword">Change Password</a></li>
</ul>
<ul style="float:right;">
<li><strong><a style='cursor:pointer' onClick='location.replace("{{URL_ROOT}}/exam/complete/");'>Log out</a></strong></li>
diff --git a/yaksh/templates/registration/password_change_done.html b/yaksh/templates/registration/password_change_done.html
new file mode 100644
index 0000000..fef07d1
--- /dev/null
+++ b/yaksh/templates/registration/password_change_done.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+
+{% block title %}Password change successful{% endblock %}
+{% block pagetitle %}Online Test {% endblock %}
+{% block script %}
+<script type="text/javascript">
+ window.setTimeout(function()
+ {
+ location.href="{{ URL_ROOT }}/exam/"
+ }, 2000);
+</script>
+{% endblock %}
+{% block content %}
+<h3>Your password has been changed successfully.</h3>
+<h4>Redirecting ...</h4>
+{% endblock %} \ No newline at end of file
diff --git a/yaksh/templates/registration/password_change_form.html b/yaksh/templates/registration/password_change_form.html
new file mode 100644
index 0000000..48292f8
--- /dev/null
+++ b/yaksh/templates/registration/password_change_form.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+<!DOCTYPE html>
+{% block title %} Change Password {% endblock %}
+
+{% block pagetitle %} Online Test {% endblock %}
+
+{% block content %}
+<form action="" method="post" >
+ {% csrf_token %}
+ <center>
+ <table class=span1>
+ {{ form }}
+ </table>
+ </center>
+ <center><button class="btn" type="submit">Change Password</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/");'>Cancel</button></center>
+</form>
+{% endblock content %}
diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html
index 00151d2..b3931cf 100644
--- a/yaksh/templates/user.html
+++ b/yaksh/templates/user.html
@@ -30,6 +30,8 @@
<ul>
<li><a href="{{ URL_ROOT }}/exam/quizzes">Quizzes</a></li>
<li><a href="{{ URL_ROOT }}/exam/results">Results</a></li>
+ <li><a href="{{ URL_ROOT }}/exam/viewprofile">My Profile</a></li>
+ <li><a href="{{ URL_ROOT }}/exam/changepassword">Change Password</a></li>
</ul>
<ul style="float:right;">
<li><strong><a style='cursor:pointer' onClick='location.replace("{{URL_ROOT}}/exam/complete/");'>Log out</a></strong></li>
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index ed56585..2e17035 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -7,21 +7,44 @@
{% block css %}
<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/course.css" />
{% endblock %}
-
+{% block script %}
+<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.4.2.min.js"></script>
+<script>
+$(document).ready(function(){
+$(".checkall").click( function(){
+ if($(this).attr("checked")) {
+ $("#enroll-all input:checkbox").each(function(index, element) {
+ $(this).attr('checked', true);
+ });
+ }
+ else {
+ $("#enroll-all input:checkbox").each(function(index, element) {
+ $(this).attr('checked', false);
+ });
+ }
+ });
+});
+</script>
+{% endblock %}
{% block manage %}
<div class="row">
<div class="span6 wrap">
<center><b><u>Requests</u></b></center><br>
+ <form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}" method="post">
+ {% csrf_token %}
+ <input type="checkbox" class="checkall"/><font size="2">Enroll all</font>
+ <div id="enroll-all">
{% for request in course.get_requests %}
<div class="well">
<div class="row">
- <div class="span3" style="padding-top:10px">
- {{ request.username }}
+ <div class="span3" style="padding-top:10px">
+ <input type="checkbox" name="check" value="{{ request.id }}"></input>&nbsp;&nbsp;<a href="#" data-toggle="tooltip" title=" Institute: {{ request.profile.institute }}&#013;Department: {{ request.profile.department}}&#013;Roll Number: {{ request.profile.roll_number }}">{{ request.username }}</a><br>
</div>
<a class="btn success" href="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/{{ request.id }}/"> Enroll </a> <a class="btn danger" href="{{URL_ROOT}}/exam/manage/reject/{{ course.id }}/{{ request.id }}/"> Reject </a>
</div>
</div>
{% endfor %}
+ </div>
</div>
<div class="span6 wrap">
<center><b><u>Rejected</u></b></center><br>
@@ -38,6 +61,8 @@
</div>
</div>
<br>
+<button class="btn" type="submit" name='enroll' value='enroll'>Enroll</button>
+</form>
<div class="row">
<div class="span6 offset4 wrap">
<center><b><u>Enrolled</u></b></center><br>
diff --git a/yaksh/templates/yaksh/editprofile.html b/yaksh/templates/yaksh/editprofile.html
new file mode 100644
index 0000000..b4cf037
--- /dev/null
+++ b/yaksh/templates/yaksh/editprofile.html
@@ -0,0 +1,21 @@
+{% extends "base.html" %}
+
+{% block title %} Edit Profile {% endblock %}
+
+{% block pagetitle %} Online Test {% endblock %}
+{% block formtitle %} Please fill in the following details {% endblock %}
+
+{% block content %}
+
+<form action="" method="post" >
+ {% csrf_token %}
+ <center>
+ <table class=span1>
+ {{ form.as_table }}
+ </table>
+ </center>
+ <center><button class="btn" type="submit">Edit Profile</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/");'>Cancel</button> </center>
+</form>
+
+{% endblock content %}
diff --git a/yaksh/templates/yaksh/password_changed.html b/yaksh/templates/yaksh/password_changed.html
new file mode 100644
index 0000000..cce2d53
--- /dev/null
+++ b/yaksh/templates/yaksh/password_changed.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+<!DOCTYPE html>
+{% block title %} Profile {% endblock %}
+
+{% block pagetitle %} Online Test {% endblock %}
+
+{% block script %}
+<script>
+ window.setTimeout(function(){ location.href="{{ URL_ROOT }}/exam/" }, 2000);
+</script>
+{% endblock script %}
+{% block content %}
+<h3>Your Password is changed {{ user.first_name }}</h3>
+<h3>Redirecting...</h3>
+{% endblock content %}
diff --git a/yaksh/templates/yaksh/profile_updated.html b/yaksh/templates/yaksh/profile_updated.html
new file mode 100644
index 0000000..6ccf177
--- /dev/null
+++ b/yaksh/templates/yaksh/profile_updated.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+<!DOCTYPE html>
+{% block title %} Profile {% endblock %}
+
+{% block pagetitle %} Online Test {% endblock %}
+
+{% block script %}
+<script>
+ window.setTimeout(function(){ location.href="{{ URL_ROOT }}/exam/" }, 2000);
+</script>
+{% endblock script %}
+{% block content %}
+<h3>Your Profile is changed {{ user.first_name }}</h3>
+<h3>Redirecting...</h3>
+{% endblock content %}
diff --git a/yaksh/templates/yaksh/view_profile.html b/yaksh/templates/yaksh/view_profile.html
new file mode 100644
index 0000000..27bc5da
--- /dev/null
+++ b/yaksh/templates/yaksh/view_profile.html
@@ -0,0 +1,48 @@
+{% extends "base.html" %}
+
+{% block title %} View Profile {% endblock %}
+
+{% block pagetitle %} Online Test {% endblock %}
+{% block css %}
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/base.css" />
+{% endblock %}
+{% block content %}
+<ul>
+ <a href={{ URL_ROOT }}/exam/manage/editprofile>Edit Profile</a>
+ <a href={{ URL_ROOT }}/exam/>Back to Home</a>
+</ul>
+
+ <table width="398" border="0" align="center" cellpadding="0">
+ <tr>
+ <td height="26" colspan="2"><h2>Your Profile Information</h2> </td>
+ </tr>
+ <tr>
+ <td width="82" valign="top"><h3>Firstname:</h3></td>
+ <td width="165" valign="top"><h4>{{ user.first_name }}</h4></td>
+ </tr>
+ <tr>
+ <td valign="top"><h3>Lastname:</h3></td>
+ <td valign="top"><h4>{{ user.last_name }}</h4></td>
+ </tr>
+ <tr>
+ <td valign="top"><h3>Email:</h3><h3></td>
+ <td valign="top"><h4>{{ user.email }}</h4></td>
+ </tr>
+ <tr>
+ <td valign="top"><h3>Institute:</h3></td>
+ <td valign="top"><h4>{{ user.profile.institute }}</h4></td>
+ </tr>
+ <tr>
+ <td valign="top"><h3>Department:</h3></td>
+ <td valign="top"><h4>{{ user.profile.department }}</h4></td>
+ </tr>
+ <tr>
+ <td valign="top"><h3>Roll Number:</h3></td>
+ <td valign="top"><h4>{{ user.profile.roll_number }}</h4></td>
+ </tr>
+ <tr>
+ <td valign="top"><h3>Position:</h3></td>
+ <td valign="top"><h4>{{ user.profile.position }}</h4></td>
+ </tr>
+</table>
+{% endblock %}