diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/addteacher.html | 57 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_detail.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 5 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/viewcourse.html | 51 |
5 files changed, 116 insertions, 1 deletions
diff --git a/yaksh/templates/yaksh/addteacher.html b/yaksh/templates/yaksh/addteacher.html new file mode 100644 index 0000000..0ebbbbd --- /dev/null +++ b/yaksh/templates/yaksh/addteacher.html @@ -0,0 +1,57 @@ +{% extends "manage.html" %} + +{% block title %} Add teacher {% endblock title %} +{% block subtitle %} {{ course.name }} {% endblock %} + +{% block css %} +<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/course.css" /> +{% endblock %} + +{% block manage %} +<center><h3>Add Teachers for this course</h3><br></center> +<center><h3>Search teacher with username, firstname, lastname, email</h3><br></center> +<div align="center"> + <form action="{{ URL_ROOT }}/exam/manage/searchteacher/{{ course.id }}/" method="post"> + {% csrf_token %} + Search Teacher: <input type="text" name="uname" style="height: 25px; padding: 0px"><br><br> + <center><button class="btn" type="submit">Search</button> + <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses");'>Cancel</button> </center></form> +</div> +<br><br> +<form action="{{ URL_ROOT }}/exam/manage/addteacher/{{ course.id }}/" method="post"> +{% csrf_token %} +{% if success == True %} + {% if teachers|length == 1 or teachers|length == 0%} + <center><h3>No results found</h3></center> + {% else %} + <center><b><u>Search Results</u></b></center><br> + <table> + <th></th> + <th>First Name</th> + <th>Last Name</th> + <th>Email</th> + <th>Institute</th> + <th>Department</th> + <th>Position</th> + {% for teacher in teachers %} + {% if teacher != user %} + <tr> + <td><input type="checkbox" name="check" value="{{ teacher.id }}"></td> + <td>{{ teacher.first_name }}</td> + <td>{{ teacher.last_name }}</td> + <td>{{ teacher.email }}</td> + <td>{{ teacher.profile.institute }}</td> + <td>{{ teacher.profile.department }}</td> + <td>{{ teacher.profile.position }}</td> + </tr> + {% endif %} + {% endfor %} + </table> + <button class="btn" type="submit">Add</button> + {% endif %} +{% endif %} +</form> +{% if status == True %} +<center><h3>Added Teacher(s) to this course</h3></center> +{% endif %} +{% endblock %}
\ No newline at end of file diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 7169667..44fab21 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -11,6 +11,7 @@ <script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/course.js"></script> {% endblock %} {% block manage %} +{% for course in courses %} <div class="row"> <div class="span6 wrap"> <center><b><u>Requests</u></b></center><br> @@ -88,4 +89,5 @@ <div class="pull-right"> <a class="btn primary" href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/">{% if course.active %}Deactivate Course {% else %} Activate Course {% endif %}</a> </div> +{% endfor %} {% endblock %} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index f8f8273..245c3cb 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -9,9 +9,11 @@ {% endblock %} {% block manage %} +<a href="{{URL_ROOT}}/exam/manage/viewcourse/">View Allotted Courses</a><br> {% if not courses %} <center><h5> You have not created any courses </h5></center> {% else %} +<center><h3> Course(s) created by you </h3></center> {% for course in courses %} <div class="row show-grid"> <div class="span14"> @@ -29,6 +31,9 @@ </br> </div> <div class="span6"> + <p><b><a href="{{URL_ROOT}}/exam/manage/searchteacher/{{course.id}}/">Add Teacher</a></b></p> + </div> + <div class="span6"> <p><b><u>Quiz(zes)</u></b></p> {% if course.get_quizzes %} {% for quiz in course.get_quizzes %} diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 3350763..22be3ed 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -82,7 +82,7 @@ User IP address: {{ paper.user_ip }} <a href="{{URL_ROOT}}/exam/manage/monitor/">Monitor quiz</a> {% else %} {% with data.papers.0 as paper %} -<a href="{{URL_ROOT}}/exam/manage/monitor/{{paper.quiz.id}}/">Monitor quiz</a> +<a href="{{URL_ROOT}}/exam/manage/monitor/{{paper.question_paper.id}}/">Monitor quiz</a> {% endwith %} {% endif %} diff --git a/yaksh/templates/yaksh/viewcourse.html b/yaksh/templates/yaksh/viewcourse.html new file mode 100644 index 0000000..a3ef3e6 --- /dev/null +++ b/yaksh/templates/yaksh/viewcourse.html @@ -0,0 +1,51 @@ +{% extends "manage.html" %}
+
+{% block title %} Courses {% endblock title %}
+
+{% block subtitle %} Courses {% endblock %}
+
+{% block css %}
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/course.css" />
+{% endblock %}
+
+{% block manage %}
+<center><h3> Course(s) Allotted </h3></center><br>
+{% if not courses %}
+ <center><h3> You are not added to any course(s) </h3></center>
+{% else %}
+{% for course in courses %}
+<h4>{{ course.creator.get_full_name }} added you to this course</h4>
+<div class="row show-grid">
+ <div class="span14">
+ <div class="row">
+ <div class="span6">
+ <p>
+ <b><u>Course</u></b>
+ {% if course.active %}
+ <span class="label success">Active</span>
+ {% else %}
+ <span class="label important">Closed</span>
+ {% endif %}
+ </p>
+ <a href="{{URL_ROOT}}/exam/manage/course_detail/{{ course.id }}/">{{ course.name }}</a>
+ </br>
+ </div>
+ <div class="span6">
+ <p><b><u>Quiz(zes)</u></b></p>
+ {% if course.get_quizzes %}
+ {% for quiz in course.get_quizzes %}
+ <a href="{{URL_ROOT}}/exam/manage/addquiz/{{ quiz.id }}/">{{ quiz.description }}</a><br>
+ {% endfor %}
+ {% else %}
+ <p><b>No quiz </b>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ </div>
+ <br><br>
+{% endfor %}
+<button class="btn primary" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/add_course");'>Add New Course</button>
+<button class="btn primary" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz");'>Add New Quiz</button>
+{% endif %}
+{% endblock %}
|