diff options
author | maheshgudi | 2016-08-08 16:07:25 +0530 |
---|---|---|
committer | maheshgudi | 2016-08-29 14:03:05 +0530 |
commit | b259e65bbadc62a9368238e778af5c205b32f5f6 (patch) | |
tree | c446ca55fa38294993b679e4874ff4edfd45f10b /yaksh/templates | |
parent | 9a9eb0d9d73cea1bdc6f8ff38631eb4bb664813b (diff) | |
download | online_test-b259e65bbadc62a9368238e778af5c205b32f5f6.tar.gz online_test-b259e65bbadc62a9368238e778af5c205b32f5f6.tar.bz2 online_test-b259e65bbadc62a9368238e778af5c205b32f5f6.zip |
made UI changes to courses page and teacher can add another teacher
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/addteacher.html | 11 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 74 |
2 files changed, 79 insertions, 6 deletions
diff --git a/yaksh/templates/yaksh/addteacher.html b/yaksh/templates/yaksh/addteacher.html index 7e04f71..2ab107b 100644 --- a/yaksh/templates/yaksh/addteacher.html +++ b/yaksh/templates/yaksh/addteacher.html @@ -18,6 +18,13 @@ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses");'>Cancel</button> </center></form> </div> <br><br> + +{% if message %} +<div class="alert alert-danger"> + <strong>Sorry!</strong> {{message}} +</div> +{% endif %} + <form action="{{ URL_ROOT }}/exam/manage/addteacher/{{ course.id }}/" method="post"> {% csrf_token %} {% if success == True %} @@ -57,7 +64,9 @@ {% if status == True %} <div class="row"> <div class="span6 offset4 wrap"> - <center><b><u>Teacher(s) Added</u></b></center><br> + <div class="alert alert-success"> + <strong>Congrats!</strong> Following Teachers have been added: +</div> {% if teachers_added %} {% for teacher in teachers_added %} <div class="well"> diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 06c848c..1c68472 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -9,15 +9,12 @@ {% endblock %} {% block manage %} -<a href="{{URL_ROOT}}/exam/manage/allotted_course/">View Allotted Courses</a><br> + {% if not courses %} <center><h4> No new Courses added </h4></center> {% else %} <center><h3> Course(s) Added</h3></center> {% for course in courses %} - {% if user != course.creator %} - <h4> {{course.creator.get_full_name}} added you to this course</h4> - {% endif %} <div class="row show-grid"> <div class="span14"> <div class="row"> @@ -79,7 +76,74 @@ </div> <br><br> {% endfor %} + {% endif %} + +{% if allotted_courses %} + <center><h3> Course(s) Allotted </h3></center> + + {% for course in allotted_courses %} + <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></br> + <div class="row"> + <div class="span6 wrap"> + <center><b><u> Course Creator</u></b></center> + {{course.creator}} + <center><b><u>Teacher(s) Added to {{ course }}</u></b></center> + {% if course.get_teachers %} + <div align="left"> + <form action="{{URL_ROOT}}/exam/manage/remove_teachers/{{ course.id }}/" method="post"> + {% csrf_token %} + {% for teacher in course.get_teachers %} + <div class="well"> + <div class="row"> + <div class="span3" style="width: auto;"> + <input type="checkbox" name="remove" value="{{ teacher.id }}"> {{ teacher.get_full_name }} + </div> + </div> + </div> + {% endfor %} + <button class="btn success" type="submit">Remove Selected</button> + </div> + {% else %} + <center><b>No Teacher(s) Added</b></center> + {% endif %} + </form> + </div> + </div> + </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 %} + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }}</a><br> + {% endfor %} + {% else %} + <p><b>No quiz </b></p> + {% endif %} + </div> + </div> + </div> + </div> + <br><br> + {% endfor %} +{% endif %} + {% if courses or allotted_courses %} <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 %} +{% endif %} {% endblock %} |