diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/quizzes_user.html | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html index c34138f..4559e09 100644 --- a/yaksh/templates/yaksh/quizzes_user.html +++ b/yaksh/templates/yaksh/quizzes_user.html @@ -1,21 +1,26 @@ {% extends "user.html" %} {% block pagetitle %} {{ title }} {% endblock %} {% block main %} -<div class="row well"> - <form action="{{ URL_ROOT }}/exam/quizzes/" method="post" id="custom-search-form" class="form-search form-horizontal pull-right"> - {% csrf_token %} - <div class="col-md-12"> - <div class="input-group"> - <span class="input-group-addon" id="basic-addon1">Search Course</span> - <input type="text" name="course_code" class="form-control" placeholder="Course Code"> - <span class="input-group-btn"> - <button class="btn btn-default" type="submit">Search</button> - <button class="btn btn-default" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/quizzes/");'>Cancel</button> - </span> - </div> + {% 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 pull-right"> + {% csrf_token %} + <div class="col-md-12"> + <div class="input-group"> + <span class="input-group-addon" id="basic-addon1">Search Course</span> + <input type="text" name="course_code" class="form-control" placeholder="Course Code"> + <span class="input-group-btn"> + <button class="btn btn-default" type="submit">Search</button> + <button class="btn btn-default" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/quizzes/");'>Cancel</button> + </span> + </div> + </div> + </form> </div> - </form> -</div> + {% endif %} +{% if not courses %} +No Courses to display +{% endif %} {% for course in courses %} <div class="row well"> <div class="col-md-12"> @@ -24,6 +29,8 @@ <h4><b><u> {{ course.name }} by {{ course.creator.get_full_name }}</u></b></h4> </div> <div class="col-md-4"> + {% if course.hidden %}<span class="label label-info">Hidden</span> + {% endif %} {% if user in course.requests.all %} <span class="label label-warning">Request Pending </span> {% elif user in course.rejected.all %}<span class="label label-danger">Request Rejected</span> {% elif user in course.students.all %}<span class="label label-info">Enrolled</span> |