summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_detail.html103
-rw-r--r--yaksh/templates/yaksh/login.html8
-rw-r--r--yaksh/templates/yaksh/moderator_dashboard.html2
3 files changed, 97 insertions, 16 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index cd4144f..bcada42 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -6,6 +6,13 @@
{% block script %}
<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/course.js"></script>
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.5.1/js/froala_editor.min.js"></script>
+<script src="https://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
+{% endblock %}
+{% block css %}
+<link rel="stylesheet" href="https://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css">
+<link href="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.5.1/css/froala_editor.min.css" rel="stylesheet" type="text/css" />
+<link href="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.5.1/css/froala_style.min.css" rel="stylesheet" type="text/css" />
{% endblock %}
{% block content %}
<br/>
@@ -13,9 +20,17 @@
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar">
- <li><a href="#student-requests" id="request"> Requested Students </a></li>
- <li><a href="#enrolled-students" id="enroll-students"> Enrolled Students </a></li>
- <li><a href="#rejected-students" id="reject-students"> Rejected Students </a></li>
+ {% if state == 'mail'%}
+ <li><a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}/">
+ Go to Course Details</a></li>
+ {% else %}
+ <li><a href="#student-requests" id="request">
+ Requested Students </a></li>
+ <li><a href="#enrolled-students" id="enroll-students">
+ Enrolled Students </a></li>
+ <li><a href="#rejected-students" id="reject-students">
+ Rejected Students </a></li>
+ {% endif %}
<li>
<a href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/">
{% if course.active %}Deactivate Course {% else %} Activate Course {% endif %}</a>
@@ -24,16 +39,70 @@
<a href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/">
Clone Course</a>
</li>
+ <li>
+ <a href="{{URL_ROOT}}/exam/manage/send_mail/{{ course.id }}/">
+ Send Mail</a>
+ </li>
</ul>
</div>
</div>
<div class="col-md-9 col-md-offset-2 main">
<div class="row">
+ {% if message %}
+ <div class="alert alert-warning" role="alert">
+ <center>
+ <strong> {{ message }} </strong>
+ </center>
+ </div>
+ {% endif %}
+ {% if state == 'mail' %}
+ <div id="enrolled-students">
+ <center><b><u>Send Mails to Students</u></b></center><br>
+ {% if course.get_enrolled %}
+ <input type="checkbox" class="reject"/>&nbsp;<font size="2">Select all</font>
+ <div id="reject">
+ <form action="{{URL_ROOT}}/exam/manage/send_mail/{{ course.id }}/" method="post" id="send_mail_form">
+ {% csrf_token %}
+ <table class="table table-striped">
+ <th></th>
+ <th></th>
+ <th>Full Name</th>
+ <th>Email</th>
+ <th>Roll Number</th>
+ <th>Institute</th>
+ <th>Department</th>
+ {% for enrolled in course.get_enrolled %}
+ <tr>
+ <td><input type="checkbox" name="check" value="{{ enrolled.id }}"></td>
+ <td>{{ forloop.counter }}.</td>
+ <td> {{ enrolled.get_full_name|title }} </td>
+ <td> {{enrolled.email}}</td>
+ <td> {{enrolled.profile.roll_number}}</td>
+ <td> {{enrolled.profile.institute}}</td>
+ <td> {{enrolled.profile.department}}</td>
+ </tr>
+ {% endfor %}
+ </table>
+ <br>
+ <textarea name="subject" id="subject" placeholder="Email Subject" cols="50"></textarea>
+ <br><br>
+ <textarea name="body" id="email_body"></textarea><br>
+ Attachments: <input type="file" name="email_attach" multiple="">
+ <br>
+ <button class="btn btn-success" type="submit" name='send_mail' value='send_mail' id="send_mail">
+ Send Mail to Selected Students</button>
+ </div>
+ {% endif %}
+ </form>
+ </div>
+ {% else %}
<div id="student-requests">
<center><b><u>Requests</u></b></center><br>
{% if course.get_requests %}
<input type="checkbox" class="checkall"/>&nbsp;<font size="2">Select all</font>
<div id="enroll-all">
+ <form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/" method="post">
+ {% csrf_token %}
<table class="table table-striped">
<th></th>
<th></th>
@@ -43,9 +112,7 @@
<th>Institute</th>
<th>Department</th>
<th>Enroll/Reject</th>
- <form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/" method="post">
- {% csrf_token %}
- {% for request in course.get_requests %}
+ {% for request in course.get_requests %}
<tr>
<td><input type="checkbox" name="check" value="{{ request.id }}"></td>
<td>{{ forloop.counter }}.</td>
@@ -76,6 +143,8 @@
{% if course.get_enrolled %}
<input type="checkbox" class="reject"/>&nbsp;<font size="2">Select all</font>
<div id="reject">
+ <form action="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/" method="post" id="reject-form">
+ {% csrf_token %}
<table class="table table-striped">
<th></th>
<th></th>
@@ -86,9 +155,7 @@
<th>Department</th>
<th>Reject</th>
{% for enrolled in course.get_enrolled %}
- <form action="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/" method="post">
- {% csrf_token %}
- <tr>
+ <tr>
<td><input type="checkbox" name="check" value="{{ enrolled.id }}"></td>
<td>{{ forloop.counter }}.</td>
<td> {{ enrolled.get_full_name|title }} </td>
@@ -99,11 +166,12 @@
<td><a class="btn btn-danger"
href="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/{{ enrolled.id }}/">
Reject </a>
- </td>
- </tr>
+ </td>
+ </tr>
{% endfor %}
</table>
- <button class="btn btn-danger" type="submit" name='reject' value='reject'>Reject Selected</button>
+ <button class="btn btn-danger" type="submit" name='reject' value='reject'>
+ Reject Selected</button>
</div>
{% endif %}
</form>
@@ -114,6 +182,8 @@
{% if course.get_rejected %}
<input type="checkbox" class="enroll"/>&nbsp;<font size="2">Select all</font>
<div id="enroll">
+ <form action="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/" method="post">
+ {% csrf_token %}
<table class="table table-striped">
<th></th>
<th></th>
@@ -123,9 +193,7 @@
<th>Institute</th>
<th>Department</th>
<th>Enroll</th>
- {% for rejected in course.get_rejected %}
- <form action="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/" method="post">
- {% csrf_token %}
+ {% for rejected in course.get_rejected %}
<tr>
<td><input type="checkbox" name="check" value="{{ rejected.id }}"></td>
<td>{{ forloop.counter }}.</td>
@@ -149,6 +217,11 @@
{% endif %}
</form>
</div>
+ {% endif %}
</div>
</div>
+<!-- Dialog to display error message -->
+<div id="dialog" title="Alert">
+ <p id="error_msg"></p>
+</div>
{% endblock %}
diff --git a/yaksh/templates/yaksh/login.html b/yaksh/templates/yaksh/login.html
index e4b5933..f40b12f 100644
--- a/yaksh/templates/yaksh/login.html
+++ b/yaksh/templates/yaksh/login.html
@@ -36,6 +36,14 @@
<li>Scales to over 500+ simultaneous users.</li>
</ul>
</p>
+ <br/>
+ <p><b>Fork us at:</b>
+ <a class = "btn btn-social-icon btn-github"
+ href ="https://github.com/fossee/online_test">
+
+ <span class="fa fa-github" style="font-size:48px"></span>
+ </p>
+ </a>
</div>
</div>
diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html
index faccffe..c61675d 100644
--- a/yaksh/templates/yaksh/moderator_dashboard.html
+++ b/yaksh/templates/yaksh/moderator_dashboard.html
@@ -20,7 +20,7 @@
{{ paper.quiz.course.name }}
</td>
<td>
- <a href="{{URL_ROOT}}/exam/manage/monitor/{{paper.id}}/">{{ paper.quiz.description }}</a>
+ <a href="{{URL_ROOT}}/exam/manage/monitor/{{ paper.quiz.id }}/">{{ paper.quiz.description }}</a>
</td>
<td>
{{ answer_papers|length }} user(s)