diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_course.html | 5 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 36 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 31 | ||||
-rw-r--r-- | yaksh/templates/yaksh/lessons.html | 12 | ||||
-rw-r--r-- | yaksh/templates/yaksh/moderator_dashboard.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/modules.html | 11 | ||||
-rw-r--r-- | yaksh/templates/yaksh/monitor.html | 27 | ||||
-rw-r--r-- | yaksh/templates/yaksh/quizzes.html | 12 | ||||
-rw-r--r-- | yaksh/templates/yaksh/quizzes_user.html | 82 | ||||
-rw-r--r-- | yaksh/templates/yaksh/showquestions.html | 9 |
10 files changed, 113 insertions, 114 deletions
diff --git a/yaksh/templates/yaksh/add_course.html b/yaksh/templates/yaksh/add_course.html index 11a6497..72403ce 100644 --- a/yaksh/templates/yaksh/add_course.html +++ b/yaksh/templates/yaksh/add_course.html @@ -22,11 +22,6 @@ </a> </li> <li class="nav-item"> - <a class="nav-link" href="{% url 'yaksh:allotted_courses' %}"> - Allotted Courses - </a> - </li> - <li class="nav-item"> <a class="nav-link active" href="{% url 'yaksh:add_course' %}"> Add New Course </a> diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index de8684f..2544956 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -22,11 +22,6 @@ </a> </li> <li class="nav-item"> - <a class="nav-link {% if allotted %}active{% endif %}" href="{% url 'yaksh:allotted_courses' %}"> - Allotted Courses - </a> - </li> - <li class="nav-item"> <a class="nav-link" href="{% url 'yaksh:add_course' %}"> Add New Course </a> @@ -52,13 +47,13 @@ </div> </div> </div> - {% if not objects %} - <center> - <h2> No Courses Found </h2> - <br> - </center> - {% else %} - <div class="container"> + <div class="container"> + {% if not objects %} + <br><br> + <div class="alert alert-info"> + <center> <h3> No Courses Found </h3> </center> + </div> + {% else %} <hr> {% if messages %} {% for message in messages %} @@ -92,7 +87,18 @@ </div> <hr> <div class="row"> - <div class="col-md-6"> + <div class="col-md-5"> + {% if user.id != course.creator.id %} + <span class="badge badge-pill badge-secondary"> + Allotted Course + </span> + {% else %} + <span class="badge badge-pill badge-info"> + Created Course + </span> + {% endif %} + </div> + <div class="col-md-3"> {% if course.active %} <span class="badge badge-pill badge-success"> Active @@ -103,8 +109,8 @@ </span> {% endif %} </div> - <div class="col-md-6"> - <a href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/"> + <div class="col-md-4"> + <a href="{% url 'yaksh:toggle_course_status' course.id %}"> {% if course.active %} <i class="fa fa-toggle-on fa-2x"></i> {% else %} diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index a8472c7..e3888b8 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -76,11 +76,16 @@ $(document).ready(function() {% endfor %} </div> {% include "yaksh/paginator.html" %} +{% elif msg == 'grade' and not objects %} + <br> + <div class="alert alert-info"> + <center><h3>No courses found to grade</h3></center> + </div> {% endif %} </div> <div class="container-fluid"> <div class="row"> - {% if not objects %} + {% if status == "grade" %} {% if users %} <div id="student" class="col-md-3"> <ul class="nav nav-pills list-group"> @@ -149,7 +154,7 @@ $(document).ready(function() </div> <hr> {% if data.papers %} - {% for paper in data.papers %} + {% with data.papers.0 as paper %} <div class="card"> <div class="card-header"> Course Details @@ -159,8 +164,24 @@ $(document).ready(function() <div class="col-md-6"> <p><b>Course:</b> {{ paper.course.name }}</p> <p><b>Quiz:</b> {{ paper.question_paper.quiz.description }}</p> + </div> + <div class="col-md-6"> <p><b>Start time:</b> {{ paper.start_time }}</p> <p><b>End time:</b> {{ paper.end_time }}</p> + </div> + </div> + </div> + </div> + {% endwith %} + {% for paper in data.papers %} + <hr> + <div class="card"> + <div class="card-header"> + Scorecard + </div> + <div class="card-body"> + <div class="row"> + <div class="col-md-4"> <p><b>Status:</b> {% if paper.passed %} <span class="badge badge-pill badge-success"> Passed </span> @@ -168,16 +189,16 @@ $(document).ready(function() <span class="badge badge-pill badge-danger"> Failed </span> {% endif %} </p> - </div> - <div class="col-md-6"> <p><b>Total Marks:</b> {{ paper.question_paper.total_marks }}</p> <p><b>Marks obtained:</b> {{ paper.marks_obtained }}</p> + </div> + <div class="col-md-4"> {% if paper.percent %} <p><b>Percentage obtained:</b> {{paper.percent}}%</p> {% endif %} <p><b>Total attempts at questions:</b> {{ paper.answers.count }}</p> <p> - <b>Attempt Number:</b> + <b>Attempt Number:</b> <span class="badge badge-pill badge-info"> {{paper.attempt_number}} </span> diff --git a/yaksh/templates/yaksh/lessons.html b/yaksh/templates/yaksh/lessons.html index 6bdc762..0146a6b 100644 --- a/yaksh/templates/yaksh/lessons.html +++ b/yaksh/templates/yaksh/lessons.html @@ -12,11 +12,6 @@ </a> </li> <li class="nav-item"> - <a class="nav-link {% if allotted %}active{% endif %}" href="{% url 'yaksh:allotted_courses' %}"> - Allotted Courses - </a> - </li> - <li class="nav-item"> <a class="nav-link" href="{% url 'yaksh:add_course' %}"> Add New Course </a> @@ -42,15 +37,16 @@ </div> </div> </div> -<br> <div class="container"> + <hr> <a href="{% url 'yaksh:edit_lesson' %}" class="btn btn-primary btn-lg"> <i class="fa fa-plus-circle"></i> Add new Lesson </a> {% if not lessons %} <br><br> - <center><h4> No new Lessons added</h4></center> - <br><br> + <div class="alert alert-info"> + <center><h3> No new Lessons added</h3></center> + </div> {% else %} <center><h3> Lessons </h3></center> <table id="course-details" class="table table-bordered table-responsive-sm"> diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html index 5d0de7b..b2d38b0 100644 --- a/yaksh/templates/yaksh/moderator_dashboard.html +++ b/yaksh/templates/yaksh/moderator_dashboard.html @@ -34,7 +34,7 @@ {% with objects as courses %} <br> {% if not courses %} - <div class="alert alert-secondary"> + <div class="alert alert-info"> No Courses found. Add a new course or Create demo course </div> {% else %} diff --git a/yaksh/templates/yaksh/modules.html b/yaksh/templates/yaksh/modules.html index 4edbf7d..4fafbf1 100644 --- a/yaksh/templates/yaksh/modules.html +++ b/yaksh/templates/yaksh/modules.html @@ -13,11 +13,6 @@ </a> </li> <li class="nav-item"> - <a class="nav-link {% if allotted %}active{% endif %}" href="{% url 'yaksh:allotted_courses' %}"> - Allotted Courses - </a> - </li> - <li class="nav-item"> <a class="nav-link" href="{% url 'yaksh:add_course' %}"> Add New Course </a> @@ -43,14 +38,16 @@ </div> </div> </div> -<br> <div class="container"> + <hr> <a href="{% url 'yaksh:add_module' %}" class="btn btn-primary btn-lg"> <i class="fa fa-plus-circle"></i> Add new Module </a> {% if not modules %} - <center><h4> No new learning modules added</h4></center> <br><br> + <div class="alert alert-info"> + <center><h3> No new learning modules added</h3></center> + </div> {% else %} <center><h3> Learning Modules </h3></center> <table class="table table-bordered table-responsive-sm"> diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html index 51ca73e..cf6888c 100644 --- a/yaksh/templates/yaksh/monitor.html +++ b/yaksh/templates/yaksh/monitor.html @@ -2,7 +2,7 @@ {% load custom_filters %} {% load static %} {% block title %} Monitor {% endblock %} -{% block pagetitle %} {{ msg }} {% endblock pagetitle %} +{% block pagetitle %} Monitor {% endblock pagetitle %} {% block meta %} <meta http-equiv="refresh" content="30"/> {% endblock meta %} @@ -87,8 +87,13 @@ $(document).ready(function() {% endfor %} </div> {% include "yaksh/paginator.html" %} - {% endif %} + {% elif msg == 'Monitor' and not objects %} + <br> + <div class="alert alert-info"> + <center><h3>No courses to monitor</h3></center> + </div> + {% endif %} {# ############################################################### #} {# This is rendered when we are just viewing exam/monitor/quiz_num #} {% if msg != "Monitor" %} @@ -176,7 +181,7 @@ $(document).ready(function() <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> - <h3 class="modal-title">Uncheck unwanted columns</h3> + <h3 class="modal-title">Download CSV for {{quiz.description}} </h3> <button type="button" class="close" data-dismiss="modal"> <i class="fa fa-close"></i> </button> @@ -184,13 +189,15 @@ $(document).ready(function() <form action="{% url 'yaksh:download_quiz_csv' course.id quiz.id %}" method="post"> {% csrf_token %} <div class="modal-body"> + <b>Uncheck unwanted columns</b> + <br> {% for field in csv_fields %} <div class="form-check form-check-inline"> <label class="form-check-label"> <input class="form-check-input" name="csv_fields" type="checkbox" value="{{ field }}" checked> {{ field }} </label> - <br> </div> + <br> {% endfor %} <b>Select Attempt Number: Default latest attempt</b> <select class="form-control" name = "attempt_number"> @@ -204,7 +211,9 @@ $(document).ready(function() </select> </div> <div class="modal-footer"> - <button type="submit" class="btn btn-primary"> Download <span class="glyphicon glyphicon-save"></span></button> + <button type="submit" class="btn btn-success"> + <span class="fa fa-save"></span> Download + </button> <button type="button" class="btn btn-secondary" data-dismiss="modal"> Close </button> @@ -214,7 +223,13 @@ $(document).ready(function() </div> </div> {% else %} - <p> No answer papers found for {{ quiz.description }}</p> + <div class="col-md-12"> + <div class="alert alert-warning"> + <center> + <h4>No Users Found for {{ quiz.description }}</h4> + </center> + </div> + </div> {% endif %} {# if papers #} {% else %} <h4>No Quiz Found</h4> diff --git a/yaksh/templates/yaksh/quizzes.html b/yaksh/templates/yaksh/quizzes.html index d42716c..7e53d31 100644 --- a/yaksh/templates/yaksh/quizzes.html +++ b/yaksh/templates/yaksh/quizzes.html @@ -13,11 +13,6 @@ </a> </li> <li class="nav-item"> - <a class="nav-link {% if allotted %}active{% endif %}" href="{% url 'yaksh:allotted_courses' %}"> - Allotted Courses - </a> - </li> - <li class="nav-item"> <a class="nav-link" href="{% url 'yaksh:add_course' %}"> Add New Course </a> @@ -43,8 +38,8 @@ </div> </div> </div> -<br> <div class="container"> + <hr> <a href="{% url 'yaksh:add_quiz' %}" class="btn btn-primary btn-lg"> <i class="fa fa-plus-circle"></i> Add New Quiz </a> @@ -53,8 +48,9 @@ </a> {% if not quizzes %} <br><br> - <center><h4> No new Quiz added</h4></center> - <br><br> + <div class="alert alert-info"> + <center><h3> No new Quiz added</h3></center> + </div> {% else %} <center><h3> Quizzes </h3></center> <table class="table table-bordered table-responsive-sm"> diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html index 1a708ef..7771954 100644 --- a/yaksh/templates/yaksh/quizzes_user.html +++ b/yaksh/templates/yaksh/quizzes_user.html @@ -7,56 +7,32 @@ {% block main %} <div class="container"> - {% block navtab %} - {% if 'Enrolled Courses' not in title%} - <div class="container"> - <div class="nav nav-pills"> - <li class="nav-item" > - <a class="active nav-link" href="{% url 'yaksh:quizlist_user' %}"> - All Courses - </a> - </li> - <li class="nav-item"> - <a class="nav-link" href="{% url 'yaksh:quizlist_user' 'enrolled' %}"> - Enrolled Courses - </a> - </li> - </div> - </div> - <hr> - <div class="row justify-content-center"> - <div class="col-md-8"> - <form action="{% url 'yaksh:quizlist_user' %}" method="post" id="custom-search-form" > - {% csrf_token %} - <div class="col-md-12"> - <div class="input-group"> - <input type="text" name="course_code" class="form-control" type="search" placeholder="Enter course code to search"> - <span class="input-group-append"> - <button class="btn btn-outline-primary" type="submit"><i class="fa fa-search"></i> Search</button> - </span> - </div> - </div> - </form> + <center> + <h2>All Courses</h2> + </center> + <hr> + <div class="row justify-content-center"> + <div class="col-md-8"> + <form action="{% url 'yaksh:quizlist_user' %}" method="post" id="custom-search-form" > + {% csrf_token %} + <div class="col-md-12"> + <div class="input-group"> + <input type="text" name="course_code" class="form-control" type="search" placeholder="Enter course code to search" required=""> + <span class="input-group-append"> + <button class="btn btn-outline-info" type="submit"><i class="fa fa-search"></i> Search</button> + </span> + </div> </div> - </div> - {% else %} - <div class="container"> - <div class="nav nav-pills"> - <li class="nav-item" > - <a class="nav-link" href="{% url 'yaksh:quizlist_user' %}"> - All Courses - </a> - </li> - <li class="nav-item"> - <a class="active nav-link" href="{% url 'yaksh:quizlist_user' 'enrolled' %}"> - Enrolled Courses - </a> - </li> - </div> + </form> + </div> + {% if title == "Search" %} + <div class="col-md-4"> + <a href="{% url 'yaksh:quizlist_user' %}" class="btn btn-primary"> + <i class="fa fa-times"></i> Clear search + </a> </div> - <hr> {% endif %} - {% endblock %} + </div> <br> {% if messages %} {% for message in messages %} @@ -66,18 +42,10 @@ </button> <strong>{{ message }}</strong> </div> + <br> {% endfor %} {% endif %} - <br> - {% if msg %} - <div class="alert alert-dismissible alert-warning"> - <button type="button" class="close" data-dismiss="alert"> - <i class="fa fa-close"></i> - </button> - <strong>{{ msg }}</strong> - </div> - {% endif %} - <br> + {% if not courses %} <center><div class="col-md-8 alert alert-warning" role="alert"> No Courses to display diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html index f9fac96..895c345 100644 --- a/yaksh/templates/yaksh/showquestions.html +++ b/yaksh/templates/yaksh/showquestions.html @@ -188,6 +188,11 @@ </div> </div> {% include "yaksh/paginator.html" %} + {% else %} + <br><br> + <div class="alert alert-info"> + <center><h3>No Questions created</h3></center> + </div> {% endif %} </div> <br> @@ -195,9 +200,9 @@ {% if questions %} <button class="btn btn-lg btn-primary" type="submit" name='download' value='download'><i class="fa fa-download"></i> Download Selected</button> <button class="btn btn-lg btn-primary" type="submit" name="test" value="test">Test Selected</button> + <button class="btn btn-lg btn-danger" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'> + <i class="fa fa-trash"></i> Delete Selected</button> {% endif %} - <button class="btn btn-lg btn-danger" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'> - <i class="fa fa-trash"></i> Delete Selected</button> </center> </form> </div> |