diff options
Diffstat (limited to 'yaksh')
47 files changed, 2765 insertions, 1961 deletions
diff --git a/yaksh/templates/404.html b/yaksh/templates/404.html index d4777f2..f8dc1d0 100644 --- a/yaksh/templates/404.html +++ b/yaksh/templates/404.html @@ -1,6 +1,13 @@ {% extends "base.html" %} -{% block pagetitle %} <h2>Yaksh</h2> {% endblock %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} {% block content %} <center> @@ -8,6 +15,6 @@ It seems that you have encountered an error <br> Please contact your administrator <br><br> -<div class="alert alert-danger">Error Message:- {{exception}}</div> +<div class="alert alert-danger animated flash col-md-8">Error Message:- {{exception}}</div> </center> {% endblock %} diff --git a/yaksh/templates/500.html b/yaksh/templates/500.html index d02721f..b3bf710 100644 --- a/yaksh/templates/500.html +++ b/yaksh/templates/500.html @@ -1,7 +1,18 @@ {% extends "base.html" %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} {% block content %} +<br><br> +<center> Internal Server error.<br /> This event will be reported.<br /> Sorry for the inconvinience. +</center> {% endblock %} diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html index 08c4f70..7570b05 100644 --- a/yaksh/templates/base.html +++ b/yaksh/templates/base.html @@ -14,11 +14,13 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" href="apple-touch-icon.png"> + <!--<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">--> + <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/bootstrap.min.css"> + + <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/yakshcustom.css" type="text/css" /> + <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/animate.min.css" type="text/css" /> <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/font-awesome.css" type="text/css" /> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/theme.css" type="text/css" /> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/sticky-footer.css" type="text/css" /> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/ontop.css" type="text/css" /> @@ -30,40 +32,45 @@ {% block css %} {% endblock %} - <script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.9.1.min.js"></script> - <script src="{{ URL_ROOT }}/static/yaksh/js/bootstrap.min.js"></script> + + <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> --> + <!--<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>--> + + <script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/jquery-3.3.1.min.js"></script> + <script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/bootstrap.min.js"></script> + <script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/wow.min.js"></script> + + <script> + new WOW().init(); + </script> {% block script %} {% endblock %} + </script> </head> -<body {% block onload %} {% endblock %}> +<body {% block onload %} {% endblock %} class="yaksh"> + <div id="ontop"> <div id="state"> - Checking... - </div> - </div> + Checking...<img src="{{ URL_ROOT }}/static/yaksh/images/check_answer.gif"/> + </div></div> + + + {% block nav %} {% endblock %} - <div class="container"> + <div class="content"> <div class="header"> <h3><center>{% block pagetitle %}{% endblock pagetitle %}</center></h2> </div> - {% block content %} - {% endblock %} - </div> - </div> - <div class="container"> - <footer class="footer" id="footer_div"> - <div class="logged_user_info" align="center" > - {% block info %} - {% endblock %} - </div> - <div class="container"> - <p align="center">Developed by FOSSEE group, IIT Bombay</p> + {% block content %} + {% endblock %} </div> - </footer> - </div> + + + {% block footer %} + {% endblock %} </body> </html> diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index 012adbe..e6b4154 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -1,86 +1,147 @@ {% extends "base.html" %} {% load custom_filters %} -{% block css%} - <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> -{% endblock %} + + + + +{% load custom_filters %} {% block nav %} - <nav class="navbar navbar-fixed-top navbar-inverse"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="navbar-brand" href="#"> - <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH" style="margin-top: -3px; margin-left:-15px"> +<div class="container-fluid yakshnav"> + <nav class="navbar fixed-top navbar-expand-lg yakshheading yakshnav"> + <div class="container"> + <button class="navbar-toggler navbar-dark" type="button" data-toggle="collapse" data-target="#myNavbar" aria-controls="myNavbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon" style="color: white"></span> + </button> + <a class="navbar-brand"> + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH" style="margin-top: -3px; margin-left:-15px"> </img> - </a> - </div> - <div class= "collapse navbar-collapse" id="navbar"> - <form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.attempt_number }}/{{module.id}}/{{ paper.question_paper.id }}/{{course.id}}/" method="post" class="pull-right"> - {% csrf_token %} - <ul class="nav navbar-nav navbar"> - <li style="padding: 10px"><button class="btn btn-danger btn-sm" type="submit" name="quit"> + </a> + <div class="collapse navbar-collapse col-md-6" id="myNavbar"> + <div class="nav nav-pills nav-fill ml-auto"> + <span class="time-div nav-item" id="time_left" ></span> + <form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.attempt_number }}/{{module.id}}/{{ paper.question_paper.id }}/{{course.id}}/" method="post" class="ml-auto"> + {% csrf_token %} + <span class="nav-item"><button class="nav-link btn-danger" type="submit" name="quit"> {% if paper.questions_unanswered.all %} Quit {{ quiz_type }} {% else %} Finish {{ quiz_type }} {% endif %} - <span class="glyphicon glyphicon-off"></span></button></li> - </ul> - </form> - <div class="time-div" id="time_left"></div> - </div><!-- /.navbar --> - </div><!-- /.container --> - </nav><!-- /.navbar --> + <span class="fa fa-power-off"></span></button></span> + </form> + + </div> + </div><!-- /.navbar --> + </div><!-- /.container --> + </nav><!-- /.navbar --> +</div> {% endblock %} {% block content %} <div class="container-fluid"> - <div class="col-sm-3 col-md-2 sidebar"> - <p> Question Navigator </p> - <ul class="pagination pagination-sm"> - {% for qid in paper.get_all_ordered_questions %} + <div class="row"> + <!-- Side bar --> + <div class="col-md-3 yakshlabel collapse" id="sidebar"> + <center> + <b class="yakshheading">{{course.name}}</b><br> + {{ paper.question_paper.quiz.description }}</h4> + <hr> + </center> + <div class="yakshwell"> + <p class="text-center">Question Navigator</p> + <div> + {% for qid in paper.get_all_ordered_questions %} {%if paper.question_paper.quiz.allow_skip %} {% if qid in paper.get_questions_unanswered %} {% if qid.id == question.id %} - <li class="active"><a style="width:25%" href="#"data-toggle="tooltip" + <a class="active btn btn-outline-success " href="#"data-toggle="tooltip" title="{{ qid.description|striptags }}" - onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')">{{ forloop.counter }}</a></li> + onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')">{{ forloop.counter }}</a> {% else %} - <li><a style="width:25%" href="#" data-toggle="tooltip" title="{{ qid.description|striptags }}" - onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')">{{ forloop.counter }}</a></li> + <a class=" btn btn-outline-success " href="#" data-toggle="tooltip" title="{{ qid.description|striptags }}" + onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')">{{ forloop.counter }}</a> {% endif %} {% endif %} {% if qid in paper.get_questions_answered %} - <li><a style="background-color:#B4B8BA; width:25%" href="#" data-toggle="tooltip" + <a class=" btn btn-outline-success " style="background-color:#B4B8BA;" href="#" data-toggle="tooltip" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')" - title="{{ qid.description }}">{{ forloop.counter }}</a></li> + title="{{ qid.description }}">{{ forloop.counter }}</a> {% endif %} {% else %} {% if qid.id == question.id %} - <li class="active"><a style="width:25%" data-toggle="tooltip" title="{{ qid.description|striptags }}">{{ forloop.counter }}</a></li> + <a class="active btn btn-outline-success " data-toggle="tooltip" title="{{ qid.description|striptags }}">{{ forloop.counter }}</a> {% elif qid in paper.get_questions_answered %} - <li><a style="background-color:#B4B8BA; width:25%" href="#" data-toggle="tooltip" + <a class=" btn btn-outline-success " style="background-color:#B4B8BA;" href="#" data-toggle="tooltip" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')" - title="{{ qid.description }}">{{ forloop.counter }}</a></li> + title="{{ qid.description }}">{{ forloop.counter }}</a> {% else %} - <li class="disabled"><a style="width:25%" data-toggle="tooltip" title="{{ qid.description|striptags }}">{{ forloop.counter }}</a></li> + <a class="disabled btn btn-outline-success " data-toggle="tooltip" title="{{ qid.description|striptags }}">{{ forloop.counter }}</a> {% endif %} {% endif %} {% endfor %} - </ul> - <p>Question(s) left: <b>{{ paper.questions_left }}</b></p> - <br><br><br> - {% block learning_units %} - {% endblock %} - </div> - <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> - <div class="row"> - {% block main %} - {% endblock %} + </div> + <br> + <p class="text-center">Question(s) left: <b>{{ paper.questions_left }}</b></p> + </div> + <br> + <div class=""> + <div class=""> + <div class=""> + {% for types in question_types %} + {% get_questions_by_type paper.get_all_ordered_questions types as questions_by_type %} + {% if types == "mcq" %} Single Correct Choice + {% elif types == "mcc" %} Multiple Correct Choice + {% elif types == "code" %} Programming + {% elif types == "upload" %} Assignment Upload + {% elif types == "integer" %} Integer Blanks + {% elif types == "string" %} String Blanks + {% elif types == "float" %} Float Blanks + {% elif types == "arrange" %} Arranging Options + {% endif %} + ---> + <b> {% for question in questions_by_type %} {{question.id}} {%endfor%} </b> + <br> + {%endfor%} + </div> </div> + </div> + <!-- View Slides button + + <p class="text-center"> <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}" class="btn btn-success text-center">View Modules</a><br>(Recommended:<br> Open in new window)</p>--> + + </div> <!--end of sidebar --> + <a href="#sidebar" data-toggle="collapse" id="sidebaricon"><i class="fa fa-navicon fa-lg"></i></a> + + <main class="col" id="sidebarbody"> + <div class="container-fluid yakshwell"> + + {% block main %} + {% endblock %} </div> - </div> + </main> + </div> +</div> + +{% endblock %} +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshsidebarfooter text-center"> + <div class="row justify-content-center"> + <div class="col-sm-5 "> + {% if user %} + {% block info %} + <b>{{user.get_full_name|title}}</b> with Roll no. <b>{{user.profile.roll_number}}</b> is logged in as <b>{{user.username}}</b> + {% endblock %} + {% endif %} + </div> + <div class="col-sm-2"> + | + </div> + <div class="col-sm-4 text-left"> + <b>Any Queries?</b> Email : info@fossee.in + </div> + </div> + </footer> + <!--footer end--> {% endblock %} + diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 2889905..a7eb187 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -1,36 +1,44 @@ {% extends "base.html" %} {% block nav %} -<nav class="navbar navbar-fixed-top navbar-inverse"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="navbar-brand navbar-left" href="{{ URL_ROOT }}/exam/manage/"> - <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH" style="margin-top: -3px; margin-left:-15px"></img> - </a> - </div> - <div id="navbar" class="collapse navbar-collapse"> - <ul class="nav navbar-nav navbar-right"> - <li><a href="{{ URL_ROOT }}/exam/manage/questions">Questions</a></li> - <li><a href="{{ URL_ROOT }}/exam/manage/courses">Courses</a></li> - <li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li> - <li><a href="{{ URL_ROOT }}/exam/manage/gradeuser">Grade User</a></li> - <li><a href="{{ url_root }}/exam/manage/grader"> Regrade </a></li> - <li><a href="{{ URL_ROOT }}/exam/reset/changepassword">Change Password</a></li> - <li><a href="{{ URL_ROOT }}/exam/viewprofile"> {{ user.get_full_name.title }} </a></li> - <li><a href="{{URL_ROOT}}/exam/logout/" id="logout">Logout</a></li> - </ul> - </div><!-- /.navbar --> - </div><!-- /.container --> - </nav><!-- /.navbar --> +<div class="container-fluid yakshnav"> +<nav class="navbar fixed-top navbar-expand-lg yakshheading yakshnav"> + <div class="container"> + <button class="navbar-toggler navbar-dark" type="button" data-toggle="collapse" data-target="#myNavbar" aria-controls="myNavbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon" style="color: white"></span> + </button> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/"> + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH" style="margin-top: -3px; margin-left:-15px"> + </img> + </a> + <div class="collapse navbar-collapse" id="myNavbar"> + <ul class="nav nav-pills ml-auto"> + <li class="nav-item"><a class="nav-link" href="{{ URL_ROOT }}/exam/manage/questions">Questions</a></li> + <li class="nav-item"><a class="nav-link" href="{{ URL_ROOT }}/exam/manage/courses">Courses</a></li> + <li class="nav-item"><a class="nav-link" href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li> + <li class="nav-item"><a class="nav-link" href="{{ URL_ROOT }}/exam/manage/gradeuser">Grade User</a></li> + <li class="nav-item"><a class="nav-link" href="{{ url_root }}/exam/manage/grader"> Regrade </a></li> + <li class="nav-item dropdown"> + <a class="dropdown-toggle nav-link" data-toggle="dropdown" href="#"> {{user.get_full_name|title}}</a> + <div class="dropdown-menu"> + <a class="dropdown-item" href="{{ URL_ROOT }}/exam/viewprofile/"><i class="fa fa-user"></i> My Profile</a> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="{{ URL_ROOT }}/exam/reset/changepassword/"><i class="fa fa-key"></i> Change Password</a> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="{{URL_ROOT}}/exam/logout/"><i class="fa fa-sign-out"></i> Logout</a> + </div> + </ul> + </div> + </div> +</nav> +</div> + + + <!-- iframe div for video embed --> <div id="iframe_div" style="display: none;"> - <div style="width: 640px; height: 480px; position: relative;"> - <iframe id="video_frame" width="640" height="480" frameborder="0" allowfullscreen> + <div class="embed-responsive embed-responsive-16by9" style=" position: relative;"> + <iframe class="embed-responsive-item" id="video_frame" width="800" height="500" allowfullscreen> </iframe> <div style="width: 80px; height: 80px; position: absolute; opacity: 0; right: 0px; top: 0px;"> </div> @@ -40,7 +48,7 @@ <!-- Dialog to video embed --> <div id="dialog_iframe" title="Embed Video URL" style="display: none;"> - <label>Enter Url:</label> + <label>Enter embed url:</label> <input id="url" name="url" type="text" required="true"> <input type="button" id="submit_info" name="submit_info" class="btn" value="Submit" /> <div id="error_div" style="display: none;"> @@ -60,6 +68,30 @@ {% endblock %} {% block content %} +<div class="container"> {% block main %} {% endblock %} +</div> +{% endblock %} + +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshfooter text-center "> + <div class="row justify-content-center"> + <div class="col-sm-5 "> + {% if user %} + {% block info %} + <b>{{user.get_full_name|title}}</b> with Roll no. <b>{{user.profile.roll_number}}</b> is logged in as <b>{{user.username}}</b> + {% endblock %} + {% endif %} + </div> + <div class="col-sm-2"> + | + </div> + <div class="col-sm-4 text-left"> + <b>Any Queries?</b> Email : info@fossee.in + </div> + </div> + </footer> + <!--footer end--> {% endblock %} diff --git a/yaksh/templates/registration/password_change_done.html b/yaksh/templates/registration/password_change_done.html index 14df20c..bac19fa 100644 --- a/yaksh/templates/registration/password_change_done.html +++ b/yaksh/templates/registration/password_change_done.html @@ -1,6 +1,12 @@ {% extends "base.html" %} - -{% block pagetitle %}Password change successful{% endblock %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} {% block script %} <script type="text/javascript"> window.setTimeout(function() @@ -10,6 +16,12 @@ </script> {% endblock %} {% block content %} -<h3>Your password has been changed successfully.</h3> -<h4>Redirecting ...</h4> +<div class="row align-items-center"> + <div class="col"> + <h3>Your password has been changed successfully.</h3> + <h4>Redirecting ...</h4> + </div> + + <div class="col"><img src="{{ URL_ROOT }}/static/yaksh/images/profile_change.gif/"></div> +</div> {% endblock %} diff --git a/yaksh/templates/registration/password_reset_complete.html b/yaksh/templates/registration/password_reset_complete.html index 0c1bae2..bc9245f 100644 --- a/yaksh/templates/registration/password_reset_complete.html +++ b/yaksh/templates/registration/password_reset_complete.html @@ -1,6 +1,15 @@ {% extends "base.html" %} -{% block pagetitle %}Password reset complete{% endblock %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} {% block content %} +<div class="container"> <p>Your password has been reset. </p> -<p><a href="{{ login_url }}">Log in</a></p> +<p><a href="{{ login_url }}" class="btn btn-success">Log in</a></p> +</div> {% endblock %} diff --git a/yaksh/templates/registration/password_reset_confirm.html b/yaksh/templates/registration/password_reset_confirm.html index 1b0a1b7..49563ac 100644 --- a/yaksh/templates/registration/password_reset_confirm.html +++ b/yaksh/templates/registration/password_reset_confirm.html @@ -1,15 +1,24 @@ {% extends "base.html" %} -{% block pagetitle %}Reset Password{% endblock %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} {% block content %} +<center><h4>Reset Password</h4> {% if validlink %} <p>Please enter your new password twice so we can verify you typed it in correctly</p>. <form method="post"> {% csrf_token %} {{ form.as_p }} - <button class= "btn" type="submit">Submit</button> + <button class= "btn btn-success" type="submit">Submit</button> </form> {% else %} <p>This reset link is no longer valid!</p> {% endif %} +</center> {% endblock %} diff --git a/yaksh/templates/registration/password_reset_done.html b/yaksh/templates/registration/password_reset_done.html index 1ac7b60..8f259c7 100644 --- a/yaksh/templates/registration/password_reset_done.html +++ b/yaksh/templates/registration/password_reset_done.html @@ -1,3 +1,18 @@ {% extends "base.html" %} -{% block title %}Password reset successful{% endblock %} -{% block pagetitle %} Instruction for setting new password has been mailed to your registered email address {% endblock %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} + +{% block content %} +<center> +<h4>Password reset successful</h4> +<div class="alert alert-success animated flash col-md-8"> +Instruction for setting new password has been mailed to your registered email address +</div> +</center> +{% endblock %} diff --git a/yaksh/templates/registration/password_reset_form.html b/yaksh/templates/registration/password_reset_form.html index 0444584..de05df9 100644 --- a/yaksh/templates/registration/password_reset_form.html +++ b/yaksh/templates/registration/password_reset_form.html @@ -1,10 +1,21 @@ {% extends "base.html" %} -{% block pagetitle %} Email will be send to the registered email address {% endblock %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} + {% block content %} +<center> +<h4>Email will be send to the registered email address</h4> <form action="" method="post"> {% csrf_token %} {{ form }} - <button class="btn" type="submit">Request</button> - <a class="btn" href="{{URL_ROOT}}/exam/login/">Cancel</a> + <button class="btn btn-success" type="submit">Request</button> + <a class="btn btn-danger" href="{{URL_ROOT}}/exam/login/">Cancel</a> </form> +</center> {% endblock content %} diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html index 090e93d..134ba85 100644 --- a/yaksh/templates/user.html +++ b/yaksh/templates/user.html @@ -1,44 +1,62 @@ {% extends "base.html" %} -{% block css%} - <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> -{% endblock %} + {% block nav %} - <nav class="navbar navbar-fixed-top navbar-inverse"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="navbar-brand navbar-left" href="{{ URL_ROOT }}/exam/"> - <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH" style="margin-top: -3px; margin-left:-15px"> - </img> - </a> - </div> - <div class= "collapse navbar-collapse" id="navbar"> - <ul class="nav navbar-nav navbar-right"> - <li><a href="{{ URL_ROOT }}/exam/quizzes/enrolled/"> Enrolled Courses </a></li> - <li><a href="{{ URL_ROOT }}/exam/reset/changepassword"> Change Password </a></li> - <li><a href="{{ URL_ROOT }}/exam/viewprofile"> {{ user.get_full_name.title }} </a></li> - <li><a href="{{URL_ROOT}}/exam/logout/" id="logout">Logout</a></li> - </ul> - </div><!-- /.navbar --> - </div><!-- /.container --> - </nav><!-- /.navbar --> -{% endblock %} -{% block content %} -<div class="row"> - <div class="col-sm-8 col-sm-offset-3 col-md-9 col-md-offset-2 main"> - <div class="row"> - {% block main %} - {% endblock %} - </div> +<div class="container-fluid yakshnav"> +<nav class="navbar fixed-top navbar-expand-lg yakshheading yakshnav"> + <div class="container"> + <button class="navbar-toggler navbar-dark" type="button" data-toggle="collapse" data-target="#myNavbar" aria-controls="myNavbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon" style="color: white"></span> + </button> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/"> + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH" style="margin-top: -3px; margin-left:-15px"> + </img> + </a> + <div class="collapse navbar-collapse" id="myNavbar"> + <ul class="nav nav-pills ml-auto"> + <li class="nav-item"><a class="nav-link" href="{{ URL_ROOT }}/exam/"><i class="fa fa-home" style="size: 18px"></i></a></li> + <li class="nav-item dropdown"> + <a class="dropdown-toggle nav-link" data-toggle="dropdown" href="#"> {{user.get_full_name|title}}</a> + <div class="dropdown-menu"> + <a class="dropdown-item" href="{{ URL_ROOT }}/exam/viewprofile/"><i class="fa fa-user"></i> My Profile</a> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="{{ URL_ROOT }}/exam/reset/changepassword/"><i class="fa fa-key"></i> Change Password</a> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="{{URL_ROOT}}/exam/logout/"><i class="fa fa-sign-out"></i> Logout</a> + </div> + </li> + </ul> </div> + </div> +</nav> </div> {% endblock %} -{% if user %} - {% block info %} - <h5><b>{{user.get_full_name|title}}</b> with Roll no. <b>{{user.profile.roll_number}}</b> is logged in as <b>{{user.username}}</b></h5> + + +{% block content %} + {% block main %} + {% block navtab %} + {% endblock %} {% endblock %} -{% endif %} +{% endblock %} + +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshfooter text-center "> + <div class="row justify-content-center"> + <div class="col-sm-5 "> + {% if user %} + {% block info %} + <b>{{user.get_full_name|title}}</b> with Roll no. <b>{{user.profile.roll_number}}</b> is logged in as <b>{{user.username}}</b> + {% endblock %} + {% endif %} + </div> + <div class="col-sm-2"> + | + </div> + <div class="col-sm-4 text-left"> + <b>Any Queries?</b> Email : info@fossee.in + </div> + </div> + </footer> + <!--footer end--> +{% endblock %}
\ No newline at end of file diff --git a/yaksh/templates/yaksh/add_course.html b/yaksh/templates/yaksh/add_course.html index b2824d1..64cc9ff 100644 --- a/yaksh/templates/yaksh/add_course.html +++ b/yaksh/templates/yaksh/add_course.html @@ -11,10 +11,11 @@ {% endblock %} {% block content %} +<div class="yakshwell container"> <form name=frm id=frm action="" method="post" > {% csrf_token %} <center> - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> {{ form.as_table }} </table> <br/> @@ -24,7 +25,8 @@ </script> </center> - <center><button class="btn primary" type="submit" id="submit" name="questionpaper">Save</button> - <button class="btn primary" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses");'>Cancel</button> </center> + <center><button class="btn btn-success" type="submit" id="submit" name="questionpaper">Save</button> + <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses");'>Cancel</button> </center> </form> +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/add_exercise.html b/yaksh/templates/yaksh/add_exercise.html index 3a4728d..8ecf283 100644 --- a/yaksh/templates/yaksh/add_exercise.html +++ b/yaksh/templates/yaksh/add_exercise.html @@ -11,19 +11,19 @@ {% endblock %} {% block onload %} onload="javascript:test();" {% endblock %} {% block content %} - +<div class="yakshwell container"> <form name=frm id=frm action="" method="post" > {% csrf_token %} <center> - <table class="span1 table"> + <table class="span1 table table-responsive-sm"> {{ form.as_table }} </table> <br/><br/> </center> - <center><button class="btn" type="submit" id="submit" name="save_exercise"> Save + <center><button class="btn btn-success" type="submit" id="submit" name="save_exercise"> Save </button> - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> + <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> </form> {% if exercise and course_id %} {% if exercise.questionpaper_set.get.id %} @@ -50,4 +50,5 @@ </div> {% endif %} {% endif %} +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html index 2f8e733..0e1b456 100644 --- a/yaksh/templates/yaksh/add_lesson.html +++ b/yaksh/templates/yaksh/add_lesson.html @@ -14,6 +14,7 @@ {% endblock %} {% block content %} +<div class="yakshwell container"> {% if error %} <div class="alert alert-danger"> {{error}} @@ -22,20 +23,18 @@ <form name=frm id=frm action="" method="post" enctype="multipart/form-data"> {% csrf_token %} <center> - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> {{ lesson_form.as_table }} {{ lesson_file_form.as_table }} </table> </center> <br><br> {% if lesson_files %} - <div class="alert alert-success"> - <center><h4>Files added to this lesson</h4></center> + <center> + <div class="alert alert-success col-md-8 animated flash"> + <h4>Files added to this lesson</h4> </div> - <ul class="list-group"> - <strong> - Select checkbox and click Delete Files button to delete files - </strong> + </center> {% for f in lesson_files %} <li class="list-group-item"> <h4> @@ -46,40 +45,42 @@ </li> {% endfor %} {% else %} - <div class="alert alert-warning"> - <center><h4 class="alert-warning">No Files added to this lesson - </h4></center> + + <center> + <div class="alert alert-warning col-md-8 animated flash"> + <h4 class="alert-warning">No Files added to this lesson</h4> </div> + </center> {% endif %} <br><br> <center> - <button class="btn" type="submit" id="submit" name="Save"> Save + <button class="btn btn-success" type="submit" id="submit" name="Save"> Save </button> {% if lesson_files %} - <button class="btn" type="submit" id="submit" name="Delete"> Delete Files + <button class="btn btn-danger" type="submit" id="submit" name="Delete"> Delete Files </button> {% endif %} {% if course_id %} - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> + <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> {% else %} - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/all_lessons/");'>Cancel</button> + <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/all_lessons/");'>Cancel</button> {% endif %} </form> - <button class="btn" type="button" name="button" id="preview">Preview Lesson Description + <button class="btn btn-outline-primary" type="button" name="button" id="preview">Preview Lesson Description </button> - <button class="btn" type="button" name="button" id="embed"> + <button class="btn btn-outline-primary" type="button" name="button" id="embed"> Embed Video link </button> </center> <hr> - <div class="panel panel-default" id="preview_text_div" style="display: none;"> - <div class="panel-heading"> + <div class="card" id="preview_text_div" style="display: none;"> + <div class="card-heading"> <center> <h3>Description Preview</h3> </center> </div> - <div class="panel-body" id="description_body"> + <div class="card-body" id="description_body"> </div> </div> - +</div> {% endblock %}
\ No newline at end of file diff --git a/yaksh/templates/yaksh/add_module.html b/yaksh/templates/yaksh/add_module.html index 309c3e7..a9ab3b2 100644 --- a/yaksh/templates/yaksh/add_module.html +++ b/yaksh/templates/yaksh/add_module.html @@ -16,6 +16,7 @@ {% endblock %} {% block content %} +<div class="yaskhwell container"> {% if course_id %} <a href="{{URL_ROOT}}/exam/manage/courses/" class="btn btn-primary"> Back to Courses</a> @@ -28,31 +29,31 @@ {% csrf_token %} <br> <center> - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> {{ module_form.as_table }} </table> </center> <br><br> <center> - <button class="btn" type="submit" id="submit" name="Save"> + <button class="btn btn-success" type="submit" id="submit" name="Save"> Save </button> - <button class="btn" type="button" name="button" id="preview"> + <button class="btn btn-outline-primary" type="button" name="button" id="preview"> Preview Module Description </button> - <button class="btn" type="button" name="button" id="embed"> + <button class="btn btn-outline-primary" type="button" name="button" id="embed"> Embed Video link </button> </center> </form> <hr> -<div class="panel panel-default" id="preview_text_div" style="display: none;"> - <div class="panel-heading"> +<div class="card" id="preview_text_div" style="display: none;"> + <div class="card-heading"> <center> <h3>Description Preview</h3> </center> </div> - <div class="panel-body" id="description_body"> + <div class="card-body" id="description_body"> </div> </div> {% endif %} @@ -97,7 +98,7 @@ <p><u><b>Chosen Lessons and quizzes:</b></u> </p> <div id="fixed-added"> - <table id="course-details" class="table table-bordered"> + <table id="course-details" class="table table-bordered table-responsive-sm"> <tr> <th width="5%">Select</th> <th>Quiz/Lesson</th> @@ -160,4 +161,5 @@ </div> </form> {% endif %} +</div> {% endblock %}
\ No newline at end of file diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index 79c132c..692af48 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -14,9 +14,10 @@ {% block onload %} onload='javascript:textareaformat();' {% endblock %} {% block content %} +<div class="yakshwell container"> <form action="{{ URL_ROOT }}/exam/manage/addquestion/{{ question.id }}/" method="post" name=frm onSubmit="return autosubmit();" enctype="multipart/form-data"> {% csrf_token %} - <center><table class="table"> + <center><table class="table table-responsive-sm"> <tr><td>Summary: <td>{{ qform.summary }}{{ qform.summary.errors }} <tr><td> Language: <td> {{qform.language}}{{qform.language.errors}} <tr><td> Type: <td> {{ qform.type }}{{qform.type.errors}} @@ -67,9 +68,10 @@ <option value="arrangetestcase">Arrange options </option> </select></p> <center> - <button class="btn" type="submit" name="save_question">Save</button> - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/questions/");'>Back to Questions</button> - <button class="btn" type="submit" name="delete_files">Delete Selected Files</button> + <button class="btn btn-success" type="submit" name="save_question">Save</button> + <button class="btn btn-info" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/questions/");'>Back to Questions</button> + <button class="btn btn-danger" type="submit" name="delete_files">Delete Selected Files</button> </center> </form> +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index de42377..c955e65 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -13,11 +13,11 @@ {% endblock %} {% block onload %} onload="javascript:test();" {% endblock %} {% block content %} - +<div class="yakshwell container"> <form name=frm id=frm action="" method="post" > {% csrf_token %} <center> - <table class="span1 table"> + <table class="span1 table table-responsive-sm"> {{ form.as_table }} </table> <script type="text/javascript"> @@ -27,10 +27,10 @@ <br/><br/> </center> - <center><button class="btn" type="submit" id="submit" name="questionpaper"> Save + <center><button class="btn btn-success" type="submit" id="submit" name="questionpaper"> Save </button> - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> + <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> </form> <br> @@ -39,12 +39,12 @@ <center> <h4>You can check the quiz by attempting it in the following modes:</h4> <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/{{course_id}}" class="btn btn-primary">View Question Paper</a> - <button class="btn" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{quiz.id}}/{{course_id}}/");'>User Mode</button> + <button class="btn btn-outline-info" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{quiz.id}}/{{course_id}}/");'>User Mode</button> - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/godmode/{{quiz.id}}/{{course_id}}/");'> + <button class="btn btn-outline-info" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/godmode/{{quiz.id}}/{{course_id}}/");'> God Mode</button> <a data-toggle="collapse" data-target="#help"> - <span class="glyphicon glyphicon-info-sign">Help</span></a> + <span class=" text-info"><i class="fa fa-info-circle"></i> Help</span></a> <div id="help" class="collapse"> <br/> <ul> @@ -64,4 +64,5 @@ width: 550px; } </style> +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/addteacher.html b/yaksh/templates/yaksh/addteacher.html index ddc4353..fa322f3 100644 --- a/yaksh/templates/yaksh/addteacher.html +++ b/yaksh/templates/yaksh/addteacher.html @@ -4,14 +4,15 @@ {% block subtitle %} {{ course.name }} {% endblock %} {% block content %} +<div class="yakshwell container"> <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> + <center><button class="btn btn-info" type="submit">Search</button> + <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses");'>Cancel</button> </center></form> </div> <br><br> @@ -23,7 +24,7 @@ {% else %} <center><b><u>Search Results</u></b></center><br> <center><b>Search results does not include teachers already added</b></center><br> - <table class="table table-striped"> + <table class="table table-striped table-responsive-sm"> <th></th> <th>Username</th> <th>First Name</th> @@ -34,7 +35,7 @@ <th>Position</th> {% for teacher in teachers %} {% if teacher not in course.get_teachers %} - <tr> + <tr class="yakshgreen"> <td><input type="checkbox" name="check" value="{{ teacher.id }}"></td> <td>{{ teacher.username }}</td> <td>{{ teacher.first_name }}</td> @@ -48,7 +49,7 @@ {% endfor %} </table> </br> - <button class="btn" type="submit">Add Selected</button> + <button class="btn btn-success" type="submit">Add Selected</button> {% endif %} {% endif %} </form> @@ -71,4 +72,5 @@ </div> </div> {% endif %} +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/complete.html b/yaksh/templates/yaksh/complete.html index a3627d0..098d2da 100644 --- a/yaksh/templates/yaksh/complete.html +++ b/yaksh/templates/yaksh/complete.html @@ -1,7 +1,14 @@ {% extends "base.html" %} -{% block pagetitle %}<img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_text.png" -width="80" alt="YAKSH"></img>{% endblock %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} + {% block content %} {% if module_id and not paper.question_paper.quiz.is_trial %} <center> @@ -12,43 +19,50 @@ width="80" alt="YAKSH"></img>{% endblock %} {% endif %} {% csrf_token %} {% if paper.questions_answered.all or paper.questions_unanswered.all %} -<center><table class="table table-bordered" > - <caption> <center><h3>Submission Status</h3> </center></caption> - <thead> - <tr> - <th> Question</th> - <th> State </th> - </tr> - </thead> + <center> + <div class="alert alert-info col-md-8 animated flash"> + Note:- Please Click on the Next button to submit the quiz. Please do not close the browser without clicking Next. + </div> + <div class="col-md-8 yakshwell"> + <h3>Submission Status</h3> + <table class="table table-bordered table-responsive-sm" > + <thead> + <tr class="yakshred text-center"> + <th> Question</th> + <th> Status </th> + </tr> + </thead> - {% for question in paper.questions.all %} - <tbody> - {% if question in paper.questions_answered.all %} - <tr class="info"> - <td> {{ question.summary }} </td> - <td> Attempted </td> - {% else %} - <tr class="danger"> - <td> {{ question }} </td> - <td> Not completed </td> - {% endif %} - </tr> - </tbody> - {% endfor %} -</table></center> + {% for question in paper.questions.all %} + <tbody> + {% if question in paper.questions_answered.all %} + <tr class="table-success"> + <td> {{ question.summary }} </td> + <td> Attempted </td> + {% else %} + <tr class="table-danger"> + <td> {{ question }} </td> + <td> Not completed </td> + {% endif %} + </tr> + </tbody> + {% endfor %} + </table> + </div> + </center> {% endif %} - <center><h3>{{message}}</h3></center> + <center class="yakshwell container-fluid"><h5 class="yakshwell"><span class="alert alert-success animated flash">{{message}}</span></h5></center> <center> <br> {% if module_id and not paper.question_paper.quiz.is_trial %} {% if first_unit %} <a href="{{URL_ROOT}}/exam/next_unit/{{course_id}}/{{module_id}}/{{learning_unit.id}}/1" class="btn btn-info" id="Next"> Next - <span class="glyphicon glyphicon-chevron-right"> + <span class="fa fa-step-forward"> </span> </a> {% else %} <a href="{{URL_ROOT}}/exam/next_unit/{{course_id}}/{{module_id}}/{{learning_unit.id}}" class="btn btn-info" id="Next"> Next - <span class="glyphicon glyphicon-chevron-right"> + <span class="fa fa-step-forward"> </span> </a> {% endif %} diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 2bf725c..0fee438 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -2,7 +2,7 @@ {% load custom_filters %} {% block title %} Course Details {% endblock title %} -<div class="col-md-9 col-md-offset-6 main"> +<div class="text-center col-md-offset-2"> {% block pagetitle %} Course Details for {{ course.name|title }} {% endblock %} </div> @@ -22,310 +22,370 @@ </style> {% endblock %} {% block content %} -<br/> -<br> <div class="row"> - <div class="col-sm-3 col-md-2 sidebar"> - <ul class="nav nav-sidebar"> - {% if state == 'mail' or state == 'course_status' %} - <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/send_mail/{{ course.id }}/"> - Send Mail</a> - </li> - <li> - <a href="{{URL_ROOT}}/exam/manage/course_status/{{ course.id }}/"> - View Course Status</a> - </li> - </ul> - </div> -</div> -<div class="col-md-9 col-md-offset-2 main"> - <form id="upload_users" action="{{ URL_ROOT }}/exam/manage/upload_users/{{course.id}}/" - method="POST" enctype="multipart/form-data"> - {% csrf_token %} - <input type="file" name="csv_file" /> - <button class="btn btn-primary" type=submit> Upload Users <span class="glyphicon glyphicon-open"/></button> - </form> - <div class="alert alert-info" role="alert"> - <p> - - The uploaded csv should have headers exactly same as mentioned below:<br /> - <b>firstname, lastname, email, username, password, institute, roll_no, department, - remove</b><br /> - - Mandatory fields are <b> firstname, lastname and email. </b><br /> - - Other fields are optional. <br /> - - If username and password are not provided then - <b>Users created will have username and password same as their email</b> - </p> - <p> - <b> Click <a class="btn btn-success" href="{{ URL_ROOT }}/exam/manage/download_sample_csv/ -">here</a> to download a sample CSV, edit and upload it</b> - </p> - </div> - <div class="row"> - {% if message %} - <div class="alert alert-warning" role="alert"> - <center> - <strong> {{ message }} </strong> - </center> - </div> - {% endif %} - {% if upload_details %} - <div class="alert alert-info" role="info"> - {% for detail in upload_details %} - <strong> {{ detail }} </strong><br> - {% endfor %} + <!-- Side bar --> + <div class="col-md-3 yakshlabel collapse" id="sidebar"> + <div class="list-group"> + {% if state == 'mail' or state == 'course_status' %} + <a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}/" class="list-group-item" data-parent="#sidebar"><i class="fa fa-caret-left"></i> Go to Course Details </a> + {% else %} + <a href="#student-requests" id="request" class="list-group-item" data-parent="#sidebar"> Requested Students </a> + <a href="#enrolled-students" id="enroll-students" class="list-group-item" data-parent="#sidebar"> Enrolled Students</a> + <a href="#rejected-students" id="reject-students" class="list-group-item" data-parent="#sidebar"> Rejected Students </a> + {% endif %} + <a href="{{URL_ROOT}}/exam/manage/send_mail/{{ course.id }}/" class="list-group-item" data-parent="#sidebar"> Send Mail </a> + <a href="{{URL_ROOT}}/exam/manage/course_status/{{ course.id }}/" class="list-group-item" data-parent="#sidebar"> View Course Status </a> </div> - {% endif %} - <hr> - {% 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"/> <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"> + </div> + <a href="#sidebar" data-toggle="collapse" id="sidebaricon"><i class="fa fa-navicon fa-lg"></i></a> + <!-- End of sidebar --> + <main class="col" id="sidebarbody"> + <div class="container-fluid yakshwell"> + + <form id="upload_users" action="{{ URL_ROOT }}/exam/manage/upload_users/{{course.id}}/" + method="POST" enctype="multipart/form-data" class="yakshwell"> {% csrf_token %} - <table id="mail_table" class="tablesorter table table-striped" data-sortlist="[1,0]"> - <thead> - <th></th> - <th></th> - <th>Full Name</th> - <th>Email</th> - <th>Roll Number</th> - <th>Institute</th> - <th>Department</th> - </thead> - <tbody> - {% 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 %} - </tbody> - </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 %} + <input type="file" name="csv_file" /> + <button class="btn btn-outline-primary" type=submit> Upload Users <span class="glyphicon glyphicon-open"/></button> </form> - </div> - {% elif state == "course_status" %} - <div class="course_data"> - <input type="hidden" id="course_name" value="{{course.name}}"> - <center><h2>Course Status</h2></center> - <table class="tablesorter table table-bordered" id="course_table" data-sortlist="[0,0]"> - <thead> - <tr> - <th>Sr No.</th> - <th>Email</th> - <th>Current Unit</th> - <th>Course Completion Percentage</th> - <th>Grade</th> - </tr> - </thead> - <tbody> - {% for student, grade, percent, unit in student_details %} - <tr> - <td width="5%"> - {{forloop.counter}}. - </td> - <td width="50%"> - <a class="user_data" data-item-id="{{course.id}}+{{student.id}}" data-toggle="tooltip" title="Click to view Overall Course progress" data-placement="top"> - {% if student.email %} - {{ student.email }} + <div class="card" role="alert"> + <div class="card-body"> + <p> + - The uploaded csv should have headers exactly same as mentioned below:<br /> + <b>firstname, lastname, email, username, password, institute, roll_no, department, + remove</b><br /> + - Mandatory fields are <b> firstname, lastname and email. </b><br /> + - Other fields are optional. <br /> + - If username and password are not provided then + <b>Users created will have username and password same as their email</b> + </p> + <p> + <b> Click <a class="btn btn-success" href="{{ URL_ROOT }}/exam/manage/download_sample_csv/ + ">here</a> to download a sample CSV, edit and upload it</b> + </p> + </div> + </div> + <div class="yakshwell"> + {% if message %} + <center> + <div class="alert alert-warning animated flash col-md-8" role="alert"> + <strong> {{ message }} </strong> + </div> + </center> + {% endif %} + {% if upload_details %} + <div class="alert alert-info" role="info"> + {% for detail in upload_details %} + <strong> {{ detail }} </strong><br> + {% endfor %} + </div> + {% endif %} + + {% if state == 'mail' %} + <div id="enrolled-students" > + <center ><div class="yakshlabel"><h5>Send Mails to Students</h5></div></center><br> + {% if course.get_enrolled %} + <input type="checkbox" class="reject"/> <font class="text-info">Select all</font> + <div id="reject" class="yakshwell"> + <form action="{{URL_ROOT}}/exam/manage/send_mail/{{ course.id }}/" method="post" id="send_mail_form"> + {% csrf_token %} + <table id="mail_table" class="tablesorter table table-striped table-responsive-sm" data-sortlist="[1,0]"> + <thead> + <th></th> + <th></th> + <th>Full Name</th> + <th>Email</th> + <th>Roll Number</th> + <th>Institute</th> + <th>Department</th> + </thead> + <tbody> + {% 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 %} + </tbody> + </table> + <br> + <div class="card"> + <textarea name="subject" id="subject" placeholder="Email Subject" cols="50"></textarea> + <br><br> + <textarea name="body" id="email_body"></textarea><br> + <span class="yakshwell"> Attachments: <input type="file" name="email_attach" multiple=""></span> + <br> + </div> + <div class="text-center yakshwell"> + <button class="btn btn-success" type="submit" name='send_mail' value='send_mail' id="send_mail"> + Send Mail to Selected Students</button> + </div> + </form> + </div> + {% endif %} + </div> + {% elif state == "course_status" %} + <div class="course_data"> + + <center><div class="yakshlabel"> + <input type="hidden" id="course_name" value="{{course.name}}"> + <a href="#" class="btn btn-outline-success pull-right" id="export">Export to CSV</a><h5>Course Status</h5> + </div></center> + <div class="yakshwell"> + <table class="tablesorter table table-bordered table-responsive-sm" id="course_table" data-sortlist="[0,0]"> + <thead> + <tr class="yakshlight"> + <th>Sr No.</th> + <th>Students</th> + <th>Total</th> + <th>Grade</th> + <th colspan="{{modules|length}}">Modules</th> + </tr> + <tr> + <th scope="row"></th> + <th></th> + <th></th> + <th></th> + {% if modules %} + {% for module in modules %} + <th> + {{module.name}} + ({{module.get_learning_units|length}} Units) + <br> + <a data-target="tooltip" title="{% for unit in module.get_learning_units %}{% if unit.type == 'quiz' %}{{unit.quiz.description}}{% else %}{{unit.lesson.name}}{% endif %} / {% endfor %}" id="unit_status{{module.id}}" onmouseover="view_status('#unit_status{{module.id}}')" class="text-info"> <i class="fa fa-info-circle"></i> + View Units</a> + </th> + {% endfor %} + {% else %} + <th></th> + {% endif %} + </tr> + </thead> + <tbody> + {% for student in students %} + <tr> + <td width="5%"> + {{forloop.counter}}. + </td> + <td> + {{ student.get_full_name|title }} + </td> + <td> + {% course_completion_percent course student as c_percent %} + {{c_percent}} % + </td> + <td> + {% course_grade course student as grade %} + {{grade}} + </td> + {% if modules %} + {% for module in modules %} + <td> + {% module_completion_percent course module student as m_percent %} + {{m_percent}} % + <br> + <a data-target="tooltip" title="{% for unit in module.get_learning_units %}{% if unit.type == 'quiz' %}{{unit.quiz.description}}{% else %}{{unit.lesson.name}}{% endif %} - {% get_unit_status course module unit student as status %}{{status|title}} / {% endfor %}" id="unit_status{{module.id}}{{student.id}}" onmouseover="view_status('#unit_status{{module.id}}{{student.id}}')" class="text-info"> <i class="fa fa-info-circle"></i> + View Unit Status</a> + </td> + {% endfor %} + {% else %} + <td>-------</td> + {% endif %} + </tr> + {% endfor %} + </tbody> + </table> + </div> + </div> + {% else %} + <div id="students_enrollment"> + <div id="student-requests" class="card"> + <center><div class="yakshlabel card-heading">Requests</div></center><br> + <div class="card-body"> + {% if course.get_requests %} + <input type="checkbox" class="checkall"/> <font size="2">Select all</font> + <div id="enroll-all"> + <form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/" method="post"> + {% csrf_token %} + <table id="requested_table" class="tablesorter table table-striped table-responsive-sm" data-sortlist="[1,0]"> + <thead> + <th></th> + <th></th> + <th>Full Name</th> + <th>Email</th> + <th>Roll Number</th> + <th>Institute</th> + <th>Department</th> + <th>Enroll/Reject</th> + </thead> + <tbody> + {% for request in course.get_requests %} + <tr> + <td><input type="checkbox" name="check" value="{{ request.id }}"></td> + <td>{{ forloop.counter }}.</td> + <td>{{request.get_full_name}}</td> + <td> {{request.email}}</td> + <td> {{request.profile.roll_number}}</td> + <td> {{request.profile.institute}}</td> + <td> {{request.profile.department}}</td> + <td> + <a class="btn btn-success" + href="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/{{ request.id }}/"> + Enroll </a> + <a class="btn btn-danger" + href="{{URL_ROOT}}/exam/manage/reject/{{ course.id }}/{{ request.id }}/"> + Reject </a> + </td> + </tr> + {% endfor %} + </tbody> + </table> + <button class="btn btn-success pull-right" type="submit" name='enroll' value='enroll'>Enroll Selected</button> <br> + </form> + </div> + {% else %} + <center> + <span class="badge badge-warning"><big> No requests yet</big></span> + </center> + {% endif %} + </div> + </div> + <br> + <div id="enrolled-students" class="card"> + <center><div class="yakshlabel card-heading">Enrolled</div></center><br> + <div class="card-body"> + {% if course.get_enrolled %} + <input type="checkbox" class="reject"/> <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 id="enrolled_table" class="tablesorter table table-striped table-responsive-sm" data-sortlist="[1,0]"> + <thead> + <th></th> + <th></th> + <th>Full Name</th> + <th>Email</th> + <th>Roll Number</th> + <th>Institute</th> + <th>Department</th> + <th>Reject</th> + </thead> + <tbody> + {% 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> + <td><a class="btn btn-danger" + href="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/{{ enrolled.id }}/"> + Reject </a> + </td> + </tr> + {% endfor %} + </tbody> + </table> + <button class="btn btn-danger pull-right" type="submit" name='reject' value='reject'> + Reject Selected</button> <br> + </form> + </div> {% else %} - {{ student.get_full_name|title}} - {% endif %} - </a> - <div id="show_status_{{course.id}}_{{student.id}}" style="display: None;"> + <center> + <span class="badge badge-warning"><big> No enrolled students yet</big></span> + </center> + {% endif %} + </div> </div> - </td> - <td> - {% if unit %} - {% if unit.type == 'quiz' %} - {{unit.quiz.description}} + <br> + <div id="rejected-students" class="card"> + <center><div class="yakshlabel card-heading">Rejected</div></center><br> + <div class="card-body"> + {% if course.get_rejected %} + <input type="checkbox" class="enroll"/> <font size="2">Select all</font> + <div id="enroll"> + <form action="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/" method="post"> + {% csrf_token %} + <table id="rejected_table" class="tablesorter table table-striped table-responsive-sm" data-sortlist="[1,0]"> + <thead> + <th></th> + <th></th> + <th>Full Name</th> + <th>Email</th> + <th>Roll Number</th> + <th>Institute</th> + <th>Department</th> + <th>Enroll</th> + </thead> + <tbody> + {% for rejected in course.get_rejected %} + <tr> + <td><input type="checkbox" name="check" value="{{ rejected.id }}"></td> + <td>{{ forloop.counter }}.</td> + <td>{{rejected.get_full_name|title}}</td> + <td> {{rejected.email}}</td> + <td> {{rejected.profile.roll_number}}</td> + <td> {{rejected.profile.institute}}</td> + <td> {{rejected.profile.department}}</td> + <td> + <a class="btn btn-success" + href="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/{{ rejected.id }}/"> + Enroll </a> + </td> + </tr> + {% endfor %} + </tbody> + </table> + <br> + <button class="btn btn-success pull-right" type="submit" name='enroll' value='enroll'> + Enroll Selected</button> <br> + </form> + </div> {% else %} - {{unit.lesson.name}} - {% endif %} - {% else %} - NA - {% endif%} - </td> - <td> - {{percent}}% - </td> - <td> - {{grade}} - </td> - </tr> - {% endfor %} - </tbody> - </table> - </div> - {% else %} - <div id="students_enrollment"> - <div id="student-requests"> - <center><b><u>Requests</u></b></center><br> - {% if course.get_requests %} - <input type="checkbox" class="checkall"/> <font size="2">Select all</font> - <div id="enroll-all"> - <form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/" method="post"> - {% csrf_token %} - <table id="requested_table" class="tablesorter table table-striped" data-sortlist="[1,0]"> - <thead> - <th></th> - <th></th> - <th>Full Name</th> - <th>Email</th> - <th>Roll Number</th> - <th>Institute</th> - <th>Department</th> - <th>Enroll/Reject</th> - </thead> - <tbody> - {% for request in course.get_requests %} - <tr> - <td><input type="checkbox" name="check" value="{{ request.id }}"></td> - <td>{{ forloop.counter }}.</td> - <td>{{request.get_full_name}}</td> - <td> {{request.email}}</td> - <td> {{request.profile.roll_number}}</td> - <td> {{request.profile.institute}}</td> - <td> {{request.profile.department}}</td> - <td> - <a class="btn btn-success" - href="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/{{ request.id }}/"> - Enroll </a> - <a class="btn btn-danger" - href="{{URL_ROOT}}/exam/manage/reject/{{ course.id }}/{{ request.id }}/"> - Reject </a> - </td> - </tr> - {% endfor %} - </tbody> - </table> - <button class="btn btn-success" type="submit" name='enroll' value='enroll'>Enroll Selected</button> - </div> - {% endif %} - </form> - </div> - <br> - <div id="enrolled-students"> - <center><b><u>Enrolled</u></b></center><br> - {% if course.get_enrolled %} - <input type="checkbox" class="reject"/> <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 id="enrolled_table" class="tablesorter table table-striped" data-sortlist="[1,0]"> - <thead> - <th></th> - <th></th> - <th>Full Name</th> - <th>Email</th> - <th>Roll Number</th> - <th>Institute</th> - <th>Department</th> - <th>Reject</th> - </thead> - <tbody> - {% 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> - <td><a class="btn btn-danger" - href="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/{{ enrolled.id }}/"> - Reject </a> - </td> - </tr> - {% endfor %} - </tbody> - </table> - <button class="btn btn-danger" type="submit" name='reject' value='reject'> - Reject Selected</button> + <center> + <span class="badge badge-warning"><big> No rejected students yet</big></span> + </center> + {% endif %} + </div> + </div> + </div> + {% endif %} </div> - {% endif %} - </form> - </div> - <br> - <div id="rejected-students"> - <center><b><u>Rejected</u></b></center><br> - {% if course.get_rejected %} - <input type="checkbox" class="enroll"/> <font size="2">Select all</font> - <div id="enroll"> - <form action="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/" method="post"> - {% csrf_token %} - <table id="rejected_table" class="tablesorter table table-striped" data-sortlist="[1,0]"> - <thead> - <th></th> - <th></th> - <th>Full Name</th> - <th>Email</th> - <th>Roll Number</th> - <th>Institute</th> - <th>Department</th> - <th>Enroll</th> - </thead> - <tbody> - {% for rejected in course.get_rejected %} - <tr> - <td><input type="checkbox" name="check" value="{{ rejected.id }}"></td> - <td>{{ forloop.counter }}.</td> - <td>{{rejected.get_full_name|title}}</td> - <td> {{rejected.email}}</td> - <td> {{rejected.profile.roll_number}}</td> - <td> {{rejected.profile.institute}}</td> - <td> {{rejected.profile.department}}</td> - <td> - <a class="btn btn-success" - href="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/{{ rejected.id }}/"> - Enroll </a> - </td> - </tr> - {% endfor %} - </tbody> - </table> - <br> - <button class="btn btn-success" type="submit" name='enroll' value='enroll'> - Enroll Selected</button> + <!-- Dialog to display error message --> + <div id="dialog" title="Alert"> + <p id="error_msg"></p> </div> - {% endif %} - </form> </div> - </div> - {% endif %} - </div> + </main> </div> +{% endblock %} -<!-- Dialog to display error message --> -<div id="dialog" title="Alert"> - <p id="error_msg"></p> -</div> +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshsidebarfooter text-center"> + <div class="row justify-content-center"> + <div class="col-sm-5 "> + {% if user %} + {% block info %} + <b>{{user.get_full_name|title}}</b> with Roll no. <b>{{user.profile.roll_number}}</b> is logged in as <b>{{user.username}}</b> + {% endblock %} + {% endif %} + </div> + <div class="col-sm-2"> + | + </div> + <div class="col-sm-4 text-left"> + <b>Any Queries?</b> Email : info@fossee.in + </div> + </div> + </footer> + <!--footer end--> {% endblock %} + diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html index 5baa781..e839e8b 100644 --- a/yaksh/templates/yaksh/course_modules.html +++ b/yaksh/templates/yaksh/course_modules.html @@ -1,8 +1,8 @@ {% extends "user.html" %} {% load custom_filters %} {% block title %} Course Modules {% endblock %} -{% block pagetitle %} Curriculum for {{course}} {% endblock %} {% block script %} +<script src="{{ URL_ROOT }}/static/yaksh/js/donutpiechart.js"></script> <script> function view_unit(unit){ $("#"+unit+"_down").toggle(); @@ -11,15 +11,47 @@ </script> {% endblock %} + {% block main %} + +<div class="container"> +<div class="row justify-content-md-center yakshwell "> + <div class="col-md-10 bg-light card"> + <div class="row align-items-center"> + <div class="col h4"> {{course}} </div> + <div class="col-md-3 ml-auto yakshwell"> + <div class="row align-items-center"> + <div class="col-sm-6"> Overall + Course</br>Completion : + </div> + <div class="col-sm-5"> + <span class="progress"> + <span class="progress-bar bg-warning " role="progressbar" style="width: 50%; color: black;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50% completed</span> + </span> + </div> + </div> + </div> + </div> + </div> +</div> + +<center> +<div class=" col-md-8"> +<b>Grade: {% if grade %} {{ grade }} {% else %} Will be available once the course is complete {% endif %}</b> +</div> + + {% if msg %} - <div class="alert alert-warning" role="alert"> - <center>{{ msg }}</center> + <div class="col-md-8 alert alert-warning animated flash" role="alert"> + {{ msg }} </div> {% endif %} -<b>Grade: {% if grade %} {{ grade }} {% else %} Will be available once the course is complete {% endif %}</b> -{% if modules %} - <br><br> +</center> + +<div class="row justify-content-md-center "> +{% if learning_modules %} + <div class="col-md-10 yakshwell"> + <strong>Overall Course Progress</strong> <div class="progress"> {% if course_percentage <= 50 %} @@ -35,101 +67,125 @@ <b style="color: black;">{{course_percentage}}% Completed</b> </div> </div> - <div class="panel panel-default"> - <div class="panel panel-body"> - <table class="table"> - {% for module, percent in modules %} - <tr> - <td width="25%"> - <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}"> - {{module.name|title}}</a> - </td> - <td> - <span class="glyphicon glyphicon-chevron-down" id="learning_units{{module.id}}{{course.id}}_down"> - </span> - <span class="glyphicon glyphicon-chevron-up" id="learning_units{{module.id}}{{course.id}}_up" style="display: none;"> - </span> - <a data-toggle="collapse" data-target="#learning_units{{module.id}}{{course.id}}" onclick="view_unit('learning_units{{module.id}}{{course.id}}');"> - View Lessons/Quizzes/Exercises</a> - <div id="learning_units{{module.id}}{{course.id}}" class="collapse"> - <table class="table table-bordered"> - <tr> - <th>Lesson/Quiz/Exercise</th> - <th>Status</th> - <th>Type</th> - <th>View AnswerPaper</th> - </tr> - {% for unit in module.get_learning_units %} - <tr> - <td> - {% if unit.type == "quiz" %} - {{unit.quiz.description}} - {% else %} - {{unit.lesson.name}} - {% endif %} - </td> - <td> - {% get_unit_status course module unit user as status %} - {% if status == "completed" %} - <span class="label label-success">{{status|title}} - </span> - {% elif status == "inprogress" %} - <span class="label label-info">{{status|title}} - </span> - {% else %} - <span class="label label-warning">{{status|title}} - </span> - {% endif %} - </td> - <td> - {% if unit.type == "quiz" %} - {% if unit.quiz.is_exercise %} - Exercise - {% else %} - Quiz - {% endif %} - {% else %} - Lesson - {% endif %} - </td> - <td> - {% if unit.type == "quiz" %} - {% if unit.quiz.view_answerpaper %} - <a href="{{ URL_ROOT }}/exam/view_answerpaper/{{ unit.quiz.questionpaper_set.get.id }}/{{course.id}}"> - <i class="fa fa-eye" aria-hidden="true"></i> Can View </a> - {% else %} - <a> - <i class="fa fa-eye-slash" aria-hidden="true"> - </i> Cannot view now </a> - {% endif %} - {% else %} - ------ - {% endif %} - </td> - </tr> - {% endfor %} - </table> - </div> - </td> - <td> - <div class="progress"> - {% if percent <= 50 %} - <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%"> - {% elif percent <= 75 %} - <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%"> + + {% for module in learning_modules %} + <div class="yakshwell"> + <div class="row yakshlabel align-items-center"> + <div class="col-md-4"> + {{module.name|title}} + </div> + + <div class="col-md-1"> + <a data-toggle="collapse" data-target="#learning_units{{module.id}}{{course.id}}" onclick="view_unit('learning_units{{module.id}}{{course.id}}');"> + <div class="btn yakshred"> + <span class="fa fa-caret-down fa-2x" id="learning_units{{module.id}}{{course.id}}_down" > + </span> + <span class="fa fa-caret-right fa-2x" id="learning_units{{module.id}}{{course.id}}_up" style="display: none; "> + </span> + </div> + </a> + + </div> + <div class="col-md-5 ml-auto"> + <div class="row align-items-center justify-content-md-end"> + <div class="col-md-3"> + <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}"> + {% get_module_status user module course as module_status %} + {% if module_status == "completed" %} + <div class="btn btn-success "> + View + </div> + {% elif module_status == "inprogress" %} + <div class="btn btn-info"> + Continue + </div> + {% else %} + <div class="btn btn-danger "> + Start + </div> + {% endif %} + </a> + </div> + <div class="col-md-6"> + {% get_module_status user module course as module_status %} + {% if module_status == "completed" %} + <div class="progress"> + <div class="progress-bar bg-success" role="progressbar" style="width: 100%; color: black;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100% completed</div> + </div> + {% elif module_status == "inprogress" %} + <div class="progress"> + <div class="progress-bar bg-warning " role="progressbar" style="width: 50%; color: black;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50% completed</div> + </div> + {% else %} + <div class="progress"> + <div class="progress-bar bg-danger" role="progressbar" style="width: 1%; color: black;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0% completed</div> + </div> + {% endif %} + </div> + </div> + </div> + </div> + <div id="learning_units{{module.id}}{{course.id}}" class="collapse"> + <table class="table yakshwell"> + + {% for unit in module.get_learning_units %} + <tr> + <td> + {% if unit.type == "quiz" %} + {% if unit.quiz.is_exercise %} + <span class="fa fa-pencil"></span> + {% else %} + <span class="fa fa-puzzle-piece"></span> + {% endif %} + {% else %} + <span class="fa fa-book"></span> + {% endif %} + </td> + <td> + {% if unit.type == "quiz" %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} + </td> + + <td> + {% get_unit_status course module unit user as status %} + {% if status == "completed" %} + <span class="badge badge-success">{{status|title}} + </span> + {% elif status == "inprogress" %} + <span class="badge badge-info">{{status|title}} + </span> + {% else %} + <span class="badge badge-warning">{{status|title}} + </span> + {% endif %} + </td> + <td> + {% if unit.type == "quiz" %} + {% if unit.quiz.view_answerpaper %} + <a href="{{ URL_ROOT }}/exam/view_answerpaper/{{ unit.quiz.questionpaper_set.get.id }}/{{course.id}}" > + <i class="fa fa-eye" aria-hidden="true"></i>Answer paper</a> {% else %} - <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%"> + <a > + <i class="fa fa-eye-slash" aria-hidden="true"> + </i>Answer paper</a> {% endif %} - <b style="color: black;">{{percent}}% Completed</b> - </div> - </div> - </td> - </tr> - {% endfor %} - </table> + {% else %} + ------ + {% endif %} + </td> + </tr> + {% endfor %} + </table> + </div> </div> + {% endfor %} </div> {% else %} - <h3> No lectures found </h3> + <h3 class="alert-danger"> No lectures found </h3> {% endif %} +</div> +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 3a98792..61bde8a 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -35,467 +35,481 @@ {% endblock %} {% block content %} <div class="row"> - <div class="col-sm-3 col-md-2 sidebar"> - <ul class="nav nav-sidebar"> + <!-- Side bar --> + <div class="col-md-3 yakshlabel collapse" id="sidebar"> + <div class="nav flex-column nav-pills" role="tablist" aria-orientation="vertical"> {% if type == "courses" %} - <li><a href="#" id="link_created_courses">My Courses</a></li> - <li><a href="#" id="link_allotted_courses">Allotted Courses</a></li> - {% else %} - <li><a href="{{URL_ROOT}}/exam/manage/courses">View all Courses</a></li> + <a href="#sidebarbody" id="link_created_courses" data-toggle="pill" class="nav-link active" role="tab" aria-controls="sidebarbody" aria-selected="true" >My Courses</a> + <a href="#sidebarbody" id="link_allotted_courses" class="nav-link" data-toggle="pill" role="tab" aria-controls="sidebarbody" aria-selected="flase" > Allotted Courses</a> + {% else %} + <a href="{{URL_ROOT}}/exam/manage/courses" class="nav-link" >View all Courses</a> {% endif %} - <li> - <a href="{{URL_ROOT}}/exam/manage/add_course">Add New Course</a> - </li> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/all_quizzes/">Add/View Quizzes</a> - </li> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/all_lessons/">Add/View Lessons</a> - </li> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/all_learning_module"> - Add/View Modules</a> - </li> - <li> - <a href="{% url 'grades:grading_systems'%}"> - Add/View Grading Systems </a> - </li> - </ul> + <a href="{{URL_ROOT}}/exam/manage/add_course" class="nav-link" >Add New Course</a> + <a href="{{URL_ROOT}}/exam/manage/courses/all_quizzes/" class="nav-link" >Add/View Quizzes</a> + <a href="{{URL_ROOT}}/exam/manage/courses/all_lessons/" class="nav-link" >Add/View Lessons</a> + <a href="{{URL_ROOT}}/exam/manage/courses/all_learning_module" class="nav-link" >Add/View Modules</a> + <a href="{% url 'grades:grading_systems'%}" class="nav-link" > Add/View Grading Systems </a> + </div> </div> -</div> - -{% if type == "courses" %} -<div id="created_courses" style="display: none;"> -{% if not courses %} - <center><h4> No new Courses created </h4></center> -{% else %} -<div class="col-md-offset-2 main"> - <center><h3> Course(s) Created</h3></center> - <table id="course-details" class="table table-bordered"> - <tr> - <th>Courses</th> - <th>Modules</th> - </tr> + <a href="#sidebar" data-toggle="collapse" id="sidebaricon"><i class="fa fa-navicon fa-lg"></i></a> + <!-- End of side bar --> + <main class="tab-content col" id="sidebarbody"> + + <div class="tab-pane fade show active container-fluid yakshwell" role="tabpanel" aria-labelledby="sidebar-tab"> + + {% if type == "courses" %} + <div id="created_courses"> + {% if not courses %} + <center><h4> No new Courses created </h4></center> + {% else %} + <div class="col-md-offset-2 main"> + <center><h3 class="yakshlabel"> Course(s) Created</h3></center> + <div class="table-wrapper-2"> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr class="text-center yakshred bg-light"> + <th>Courses</th> + <th>Modules</th> + </tr> - {% for course in courses %} - <tr> - <td width="30%"> - <a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}">{{ course.name }} - </a> - {% if course.active %} - <span class="label label-success">Active</span> - {% else %} - <span class="label label-danger">Closed</span> - {% endif %} - <br><br> - <center><b><u>Teacher(s) added to {{ course }}</u></b></center> - <br> - <form action="{{URL_ROOT}}/exam/manage/remove_teachers/{{ course.id }}/" method="post"> - {% if course.get_teachers %} - <div align="left"> - {% csrf_token %} - {% for teacher in course.get_teachers %} - <div class="well"> - <div class="row"> - <div class="col-md-333" style="width: auto;"> - <input type="checkbox" name="remove" value="{{ teacher.id }}"> {{ teacher.get_full_name }} - </div> - </div> - </div> - {% endfor %} <!-- end for teachers --> - <button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Remove Selected Teachers from this course">Remove Teachers</button> - </div> - {% else %} - <center><b>No Teacher(s) added</b></center> - {% endif %} - </form> - <br><br> - <ul> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/designcourse/{{course.id}}/" data-toggle="tooltip" title="Add/Remove/Change course modules" data-placement="top"> - Design Course - </a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/edit_course/{{course.id}}">Edit Course</a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/download_course_csv/{{course.id}}">Download CSV - </a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/searchteacher/{{course.id}}/">Add Teacher</a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/"> - {% if course.active %}Deactivate Course {% else %} Activate Course {% endif %} - </a> - </li> - <br> - <li> - <a class="test" href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/" data-toggle="tooltip" title="Creates Copy of selected Course as well as its Modules, Lessons/Quizzes" data-placement="top"> - Clone Course</a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content for offline view" data-placement="top"> - Download course offline - </a> - </li> - </ul> - </td> - <td> - <table id="course-details" class="table table-bordered"> - {% if course.get_learning_modules %} - <tr> - <th>Module</th> - <th>Module Design</th> - <th>Lessons/Quizzes</th> - </tr> - {% for module in course.get_learning_modules %} - <tr> - <td> - <a href="{{URL_ROOT}}/exam/manage/courses/add_module/{{module.id}}/{{course.id}}"> - {{module.name}}</a> - </td> - <td> - <a href="{{URL_ROOT}}/exam/manage/courses/designmodule/{{module.id}}/{{course.id}}/"> - Add Quizzes/Lessons for {{module.name}} + {% for course in courses %} + <tr> + <td width="30%"> + <a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}">{{ course.name }} </a> - </td> - <td> - {% for unit in module.get_learning_units %} - <ul class="inputs-list"> + {% if course.active %} + <span class="badge badge-success">Active</span> + {% else %} + <span class="badge badge-danger">Closed</span> + {% endif %} + <br><br> + <center><b><u>Teacher(s) added to {{ course }}</u></b></center> + <br> + <form action="{{URL_ROOT}}/exam/manage/remove_teachers/{{ course.id }}/" method="post"> + {% if course.get_teachers %} + <div align="left"> + {% csrf_token %} + {% for teacher in course.get_teachers %} + <div class="well"> + <div class="row"> + <div class="col-md-333" style="width: auto;"> + <input type="checkbox" name="remove" value="{{ teacher.id }}"> {{ teacher.get_full_name }} + </div> + </div> + </div> + {% endfor %} <!-- end for teachers --> + <button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Remove Selected Teachers from this course">Remove Teachers</button> + </div> + {% else %} + <center><b>No Teacher(s) added</b></center> + {% endif %} + </form> + <br><br> + <ul> <li> - {% if unit.type == "quiz" %} - {% if unit.quiz.is_exercise %} - <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{unit.quiz.id}}/{{course.id}}"> - {{unit.quiz.description}}</a> - {% else %} - <a href="{{URL_ROOT}}/exam/manage/addquiz/{{unit.quiz.id}}/{{course.id}}"> - {{unit.quiz.description}}</a> - {% endif %} - {% else %} - <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{unit.lesson.id}}/{{course.id}}"> - {{unit.lesson.name}}</a> - {% endif %} + <a href="{{URL_ROOT}}/exam/manage/courses/designcourse/{{course.id}}/" data-toggle="tooltip" title="Add/Remove/Change course modules" data-placement="top"> + Design Course + </a> </li> - </ul> - {% endfor %} - </td> - </tr> - {% endfor %} <!-- end for modules --> - {% else %} - No learning modules - {% endif %} - </table> - </td> - </tr> - {% endfor %} <!-- end for courses --> - </table> -</div> -{% endif %} -</div> -<!-- Show Alotted courses --> -<div id="allotted_courses" style="display: none;"> -{% if not allotted_courses %} - <center><h4> No new Courses allotted</h4></center> - <br><br> -{% else %} -<div class="col-md-offset-2 main"> - <center><h3> Course(s) Allotted </h3></center> - <table id="course-details" class="table table-bordered"> - <tr> - <th>Courses</th> - <th>Modules</th> - </tr> - - {% for course in allotted_courses %} - <tr> - <td width="30%"> - <ul class="list-group"> - <a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}/">{{ course.name }}</a> - {% if course.active %} - <span class="label label-success">Active</span> - {% else %} - <span class="label label-danger">Closed</span> - {% endif %} - <br><br> - <center><b><u> Course Creator</u></b><br> - <h4>{{course.creator.get_full_name.title}}</h4> - </center><br> - <center><b><u>Teacher(s) added to {{ course }}</u></b></center> - <br> - <form action="{{URL_ROOT}}/exam/manage/remove_teachers/{{ course.id }}/" method="post"> - {% if course.get_teachers %} - <div align="left"> - {% csrf_token %} - {% for teacher in course.get_teachers %} - <div class="well"> - <div class="row"> - <div class="col-md-333" style="width: auto;"> - <input type="checkbox" name="remove" value="{{ teacher.id }}"> - {{ teacher.get_full_name }} - </div> - </div> - </div> - {% endfor %} <!-- end for teachers --> - <button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Remove Selected Teachers from this course">Remove Teachers</button> - </div> - {% else %} - <center><b>No Teacher(s) added</b></center> - {% endif %} - </form> - <br><br> - <ul> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/designcourse/{{course.id}}/">Design Course - </a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/edit_course/{{course.id}}">Edit Course</a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/download_course_csv/{{course.id}}">Download CSV - </a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/searchteacher/{{course.id}}/">Add Teacher - </a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/"> - {% if course.active %}Deactivate Course {% else %} Activate Course {% endif %} - </a> - </li> - <br> - <li> - <a class="test" href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/" data-toggle="tooltip" title="Creates Copy of selected Course as well as its Modules, Lessons/Quizzes" data-placement="top"> - Clone Course</a> - </li> - <br> - <li> - <a href="{{URL_ROOT}}/exam/manage/courses/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content for offline view" data-placement="top">Download course offline - </a> - </li> - </ul> - </td> - <td> - <table id="course-details" class="table table-bordered"> - {% if course.get_learning_modules %} - <tr> - <th>Module</th> - <th>Module Design</th> - <th>Lessons/Quizzes</th> - </tr> - {% for module in course.get_learning_modules %} - <tr> - <td> - <a href="{{URL_ROOT}}/exam/manage/courses/add_module/{{module.id}}/{{course.id}}"> - {{module.name}}</a> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/edit_course/{{course.id}}">Edit Course</a> + </li> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/courses/download_course_csv/{{course.id}}">Download CSV + </a> + </li> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/searchteacher/{{course.id}}/">Add Teacher</a> + </li> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/"> + {% if course.active %}Deactivate Course {% else %} Activate Course {% endif %} + </a> + </li> + <br> + <li> + <a class="test" href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/" data-toggle="tooltip" title="Creates Copy of selected Course as well as its Modules, Lessons/Quizzes" data-placement="top"> + Clone Course</a> + </li> + </ul> </td> <td> - <a href="{{URL_ROOT}}/exam/manage/courses/designmodule/{{module.id}}/{{course.id}}/"> - Add Quizzes/Lessons for {{module.name}} - </a> + <table id="course-details" class="table table-bordered table-responsive-sm"> + {% if course.get_learning_modules %} + <tr class="yakshlight"> + <th>Module</th> + <th>Module Design</th> + <th>Lessons/Quizzes</th> + </tr> + {% for module in course.get_learning_modules %} + <tr> + <td> + <a href="{{URL_ROOT}}/exam/manage/courses/add_module/{{module.id}}/{{course.id}}"> + {{module.name}}</a> + </td> + <td> + <a href="{{URL_ROOT}}/exam/manage/courses/designmodule/{{module.id}}/{{course.id}}/"> + Add Quizzes/Lessons for {{module.name}} + </a> + </td> + <td> + {% for unit in module.get_learning_units %} + <ul class="inputs-list"> + <li> + {% if unit.type == "quiz" %} + {% if unit.quiz.is_exercise %} + <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{unit.quiz.id}}/{{course.id}}"> + {{unit.quiz.description}}</a> + {% else %} + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{unit.quiz.id}}/{{course.id}}"> + {{unit.quiz.description}}</a> + {% endif %} + {% else %} + <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{unit.lesson.id}}/{{course.id}}"> + {{unit.lesson.name}}</a> + {% endif %} + </li> + </ul> + {% endfor %} + </td> + </tr> + {% endfor %} <!-- end for modules --> + {% else %} + No learning modules + {% endif %} + </table> </td> - <td> - {% for unit in module.get_learning_units %} - <ul class="inputs-list"> + </tr> + {% endfor %} <!-- end for courses --> + </table> + </div> + </div> + {% endif %} + </div> + + <!-- Show Alotted courses --> + <div id="allotted_courses" style="display: none;"> + {% if not allotted_courses %} + <center><h4> No new Courses allotted</h4></center> + <br><br> + {% else %} + <div class="col-md-offset-2 main"> + <center><h3> Course(s) Allotted </h3></center> + <div class="table-wrapper-2"> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr class="text-center yakshred bg-light"> + <th>Courses</th> + <th>Modules</th> + </tr> + + {% for course in allotted_courses %} + <tr> + <td width="30%"> + <ul class="list-group"> + <a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}/">{{ course.name }}</a> + {% if course.active %} + <span class="badge badge-success">Active</span> + {% else %} + <span class="badge badge-danger">Closed</span> + {% endif %} + <br><br> + <center><b><u> Course Creator</u></b><br> + <h4>{{course.creator.get_full_name.title}}</h4> + </center><br> + <center><b><u>Teacher(s) added to {{ course }}</u></b></center> + <br> + <form action="{{URL_ROOT}}/exam/manage/remove_teachers/{{ course.id }}/" method="post"> + {% if course.get_teachers %} + <div align="left"> + {% csrf_token %} + {% for teacher in course.get_teachers %} + <div class="well"> + <div class="row"> + <div class="col-md-333" style="width: auto;"> + <input type="checkbox" name="remove" value="{{ teacher.id }}"> + {{ teacher.get_full_name }} + </div> + </div> + </div> + {% endfor %} <!-- end for teachers --> + <button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Remove Selected Teachers from this course">Remove Teachers</button> + </div> + {% else %} + <center><b>No Teacher(s) added</b></center> + {% endif %} + </form> + <br><br> + <ul> <li> - {% if unit.type == "quiz" %} - {% if unit.quiz.is_exercise %} - <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{unit.quiz.id}}/{{course.id}}"> - {{unit.quiz.description}}</a> - {% else %} - <a href="{{URL_ROOT}}/exam/manage/addquiz/{{unit.quiz.id}}/{{course.id}}"> - {{unit.quiz.description}}</a> - {% endif %} - {% else %} - <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{unit.lesson.id}}/{{course.id}}"> - {{unit.lesson.name}}</a> - {% endif %} + <a href="{{URL_ROOT}}/exam/manage/courses/designcourse/{{course.id}}/">Design Course + </a> + </li> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/edit_course/{{course.id}}">Edit Course</a> </li> - </ul> - {% endfor %} + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/courses/download_course_csv/{{course.id}}">Download CSV + </a> + </li> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/searchteacher/{{course.id}}/">Add Teacher + </a> + </li> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/"> + {% if course.active %}Deactivate Course {% else %} Activate Course {% endif %} + </a> + </li> + <br> + <li> + <a class="test" href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/" data-toggle="tooltip" title="Creates Copy of selected Course as well as its Modules, Lessons/Quizzes" data-placement="top"> + Clone Course</a> + </li> + </ul> </td> - </tr> - {% endfor %} <!-- end for modules --> - {% else %} - No learning modules - {% endif %} - </table> - </td> - {% endfor %} <!-- end for courses --> - </tr> - </table> -</div> -{% endif %} -</div> -{% endif %} -<!-- End if all Courses --> - -<!-- Show all Quizzes --> -<div id="all_quizzes" > -<div class="col-md-offset-2 main"> -{% if type == "quiz" %} - <a href="{{URL_ROOT}}/exam/manage/addquiz/" class="btn btn-primary">Add New Quiz</a> - <a href="{{URL_ROOT}}/exam/manage/add_exercise/" class="btn btn-primary">Add New Exercise</a> - {% if not quizzes %} - <center><h4> No new Quiz added</h4></center> - <br><br> - {% else %} - <center><h3> Quizzes </h3></center> - <table id="course-details" class="table table-bordered"> - <tr> - <th>Sr.No</th> - <th>Quiz</th> - <th>QuestionPaper</th> - </tr> - - {% for quiz in quizzes %} - <tr> - <td>{{forloop.counter}}</td> - <td width="30%"> - <ul class="list-group"> - {% if quiz.is_exercise %} - <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{quiz.id}}/">{{ quiz.description }}</a> - {% else %} - <a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }}</a> + <td> + <table id="course-details" class="table table-bordered table-responsive-sm"> + {% if course.get_learning_modules %} + <tr class="yakshlight"> + <th>Module</th> + <th>Module Design</th> + <th>Lessons/Quizzes</th> + </tr> + {% for module in course.get_learning_modules %} + <tr> + <td> + <a href="{{URL_ROOT}}/exam/manage/courses/add_module/{{module.id}}/{{course.id}}"> + {{module.name}}</a> + </td> + <td> + <a href="{{URL_ROOT}}/exam/manage/courses/designmodule/{{module.id}}/{{course.id}}/"> + Add Quizzes/Lessons for {{module.name}} + </a> + </td> + <td> + {% for unit in module.get_learning_units %} + <ul class="inputs-list"> + <li> + {% if unit.type == "quiz" %} + {% if unit.quiz.is_exercise %} + <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{unit.quiz.id}}/{{course.id}}"> + {{unit.quiz.description}}</a> + {% else %} + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{unit.quiz.id}}/{{course.id}}"> + {{unit.quiz.description}}</a> + {% endif %} + {% else %} + <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{unit.lesson.id}}/{{course.id}}"> + {{unit.lesson.name}}</a> + {% endif %} + </li> + </ul> + {% endfor %} + </td> + </tr> + {% endfor %} <!-- end for modules --> + {% else %} + No learning modules + {% endif %} + </table> + </td> + {% endfor %} <!-- end for courses --> + </tr> + </table> + </div> + </div> {% endif %} - {% if quiz.active %} - <span class="label label-success">Active</span> - {% else %} - <span class="label label-danger">Closed</span> + </div> {% endif %} - </ul> - </td> - <td> - {% if quiz.questionpaper_set.get %} - <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/"> - Question Paper for {{ quiz.description }}</a> - <a href="{{URL_ROOT}}/exam/manage/preview_questionpaper/{{quiz.questionpaper_set.get.id}}" class="btn btn-primary active btn-xs" target="_blank"> - View - </a> - <br> - {% else %} - <p>No Question Paper - <a href="#" onClick='location.replace("{{URL_ROOT}}/exam/manage/quiz/designquestionpaper/{{ quiz.id }}/");'>Add</a> - </p> + <!-- End if all Courses --> + + <!-- Show all Quizzes --> + <div id="all_quizzes" > + <div class="col-md-offset-2 main"> + {% if type == "quiz" %} + <a href="{{URL_ROOT}}/exam/manage/addquiz/" class="btn btn-primary">Add New Quiz</a> + <a href="{{URL_ROOT}}/exam/manage/add_exercise/" class="btn btn-primary">Add New Exercise</a> + {% if not quizzes %} + <center><h4> No new Quiz added</h4></center> + <br><br> + {% else %} + <center><h3> Quizzes </h3></center> + <div class="table-wrapper-2"> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr> + <th>Sr.No</th> + <th>Quiz</th> + <th>QuestionPaper</th> + </tr> + + {% for quiz in quizzes %} + <tr> + <td>{{forloop.counter}}</td> + <td width="30%"> + + {% if quiz.is_exercise %} + <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{quiz.id}}/">{{ quiz.description }}</a> + {% else %} + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }}</a> + {% endif %} + {% if quiz.active %} + <span class="badge badge-success">Active</span> + {% else %} + <span class="badge badge-danger">Closed</span> + {% endif %} + + </td> + <td> + {% if quiz.questionpaper_set.get %} + <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/"> + Question Paper for {{ quiz.description }}</a> + <a href="{{URL_ROOT}}/exam/manage/preview_questionpaper/{{quiz.questionpaper_set.get.id}}" class="btn btn-primary active btn-xs" target="_blank"> + View + </a> + <br> + {% else %} + <p>No Question Paper + <a href="#" onClick='location.replace("{{URL_ROOT}}/exam/manage/quiz/designquestionpaper/{{ quiz.id }}/");'>Add</a> + </p> + {% endif %} + </td> + {% endfor %} <!-- end for quizzes --> + </tr> + </table> + </div> + </div> + {% endif %} {% endif %} - </td> - {% endfor %} <!-- end for quizzes --> - </tr> - </table> - </div> - {% endif %} -{% endif %} -</div> + </div> -<!-- Show all lessons --> + <!-- Show all lessons --> -<div id="all_lessons"> - <div class="col-md-offset-2 main"> -{% if type == "lesson" %} - <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/" class="btn btn-primary">Add new Lesson</a> - {% if not lessons %} - <center><h4> No new Lessons added</h4></center> - <br><br> - {% else %} - <center><h3> Lessons </h3></center> - <table id="course-details" class="table table-bordered"> - <tr> - <th>Sr.No</th> - <th>Lesson</th> - </tr> + <div id="all_lessons"> + <div class="col-md-offset-2 main"> + {% if type == "lesson" %} + <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/" class="btn btn-primary">Add new Lesson</a> + {% if not lessons %} + <center><h4> No new Lessons added</h4></center> + <br><br> + {% else %} + <center><h3> Lessons </h3></center> + <div class="table-wrapper-2"> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr> + <th>Sr.No</th> + <th>Lesson</th> + </tr> - {% for lesson in lessons %} - <tr> - <td width="2%">{{forloop.counter}}</td> - <td width="30%"> - <ul class="list-group"> - <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{lesson.id}}/"> - {{ lesson.name }}</a> - {% if lesson.active %} - <span class="label label-success">Active</span> - {% else %} - <span class="label label-danger">Closed</span> + {% for lesson in lessons %} + <tr> + <td width="2%">{{forloop.counter}}</td> + <td width="30%"> + + <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{lesson.id}}/"> + {{ lesson.name }}</a> + {% if lesson.active %} + <span class="badge badge-success">Active</span> + {% else %} + <span class="badge badge-danger">Closed</span> + {% endif %} + + </td> + {% endfor %} <!-- end for lessons --> + </tr> + </table> + </div> + </div> + {% endif %} {% endif %} - </ul> - </td> - {% endfor %} <!-- end for lessons --> - </tr> - </table> - </div> - {% endif %} -{% endif %} -</div> + </div> -<!-- Show all learning modules --> - <div class="col-md-offset-2 main"> -<div id="all_lessons"> -{% if type == "learning_module" %} - <a href="{{URL_ROOT}}/exam/manage/courses/add_module/" class="btn btn-primary"> - Add new Module</a> - {% if not learning_modules %} - <center><h4> No new learning modules added</h4></center> - <br><br> - {% else %} - <center><h3> Learning Modules </h3></center> - <table id="course-details" class="table table-bordered"> - <tr> - <th>Sr.No</th> - <th>Learning Modules</th> - <th>Design Module</th> - <th>Learning Units</th> - </tr> - {% for module in learning_modules %} - <tr> - <td width="2%">{{forloop.counter}}</td> - <td> - <a href="{{URL_ROOT}}/exam/manage/courses/add_module/{{module.id}}/"> - {{ module.name }}</a> - {% if module.active %} - <span class="label label-success">Active</span> - {% else %} - <span class="label label-danger">Closed</span> - {% endif %} - </td> - <td> - <a href="{{URL_ROOT}}/exam/manage/courses/designmodule/{{module.id}}"> - Add Quizzes/Lessons for {{module.name}} - </a> - </td> - <td> - {% if module.get_learning_units %} - {% for unit in module.get_learning_units %} - <ul class="list-group"> - {% if unit.type == 'quiz' %} - {{unit.quiz.description}} - {% else %} - {{unit.lesson.name}} - {% endif %} - </ul> - {% endfor %} <!-- end for learning units --> - {% else %} - No Learning units + <!-- Show all learning modules --> + <div class="col-md-offset-2 main"> + <div id="all_lessons"> + {% if type == "learning_module" %} + <a href="{{URL_ROOT}}/exam/manage/courses/add_module/" class="btn btn-primary"> + Add new Module</a> + {% if not learning_modules %} + <center><h4> No new learning modules added</h4></center> + <br><br> + {% else %} + <center><h3> Learning Modules </h3></center> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr> + <th>Sr.No</th> + <th>Learning Modules</th> + <th>Design Module</th> + <th>Learning Units</th> + </tr> + {% for module in learning_modules %} + <tr> + <td width="2%">{{forloop.counter}}</td> + <td> + <a href="{{URL_ROOT}}/exam/manage/courses/add_module/{{module.id}}/"> + {{ module.name }}</a> + {% if module.active %} + <span class="badge badge-success">Active</span> + {% else %} + <span class="badge badge-danger">Closed</span> + {% endif %} + </td> + <td> + <a href="{{URL_ROOT}}/exam/manage/courses/designmodule/{{module.id}}"> + Add Quizzes/Lessons for {{module.name}} + </a> + </td> + <td> + {% if module.get_learning_units %} + {% for unit in module.get_learning_units %} + <ul class="list-group"> + {% if unit.type == 'quiz' %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} + </ul> + {% endfor %} <!-- end for learning units --> + {% else %} + No Learning units + {% endif %} + </td> + {% endfor %} <!-- end for modules --> + </tr> + </table> + </div> + {% endif %} {% endif %} - </td> - {% endfor %} <!-- end for modules --> - </tr> - </table> - </div> - {% endif %} -{% endif %} + </div> + </div> + </main> </div> - +{% endblock %} +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshsidebarfooter text-center"> + <div class="row justify-content-center"> + <div class="col-sm-5 "> + {% if user %} + {% block info %} + <b>{{user.get_full_name|title}}</b> with Roll no. <b>{{user.profile.roll_number}}</b> is logged in as <b>{{user.username}}</b> + {% endblock %} + {% endif %} + </div> + <div class="col-sm-2"> + | + </div> + <div class="col-sm-4 text-left"> + <b>Any Queries?</b> Email : info@fossee.in + </div> + </div> + </footer> + <!--footer end--> {% endblock %} diff --git a/yaksh/templates/yaksh/design_course_session.html b/yaksh/templates/yaksh/design_course_session.html index 959bcdd..c2f4b2b 100644 --- a/yaksh/templates/yaksh/design_course_session.html +++ b/yaksh/templates/yaksh/design_course_session.html @@ -14,6 +14,7 @@ {% endblock %} {% block main %} +<div class="yakshwell container"> <a href="{{URL_ROOT}}/exam/manage/courses/" class="btn btn-primary"> Back to Courses </a> @@ -25,8 +26,8 @@ <div id="fixed-available-wrapper"> <p><u><b>Available Modules:</b></u></p> <div id="fixed-available"> - <table id="course-details" class="table table-bordered"> - <tr> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr class="bg-light"> <th width="2%">Select</th> <th>Modules</th> <th>Lessons/Quizzes</th> @@ -66,8 +67,8 @@ <div id="fixed-added-wrapper"> <p><u><b>Chosen Modules:</b></u></p> <div id="fixed-added"> - <table id="course-details" class="table table-bordered"> - <tr> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr class="bg-light"> <th width="5%">Select</th> <th>Module</th> <th width="20%">Order</th> @@ -122,4 +123,5 @@ </div> <!-- /.row --> </div> </form> +</div> {% endblock %}
\ No newline at end of file diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html index 7e6d5c0..791ac51 100644 --- a/yaksh/templates/yaksh/design_questionpaper.html +++ b/yaksh/templates/yaksh/design_questionpaper.html @@ -22,6 +22,7 @@ select {% endblock %} {% block content %} +<div class="yakshwell container"> <input type=hidden id="url_root" value={{ URL_ROOT }}> {% if course_id %} <form action="{{ URL_ROOT }}/exam/manage/designquestionpaper/{{ qpaper.quiz.id }}/{{ qpaper.id }}/{{course_id}}/" method="POST" id="design_q"> @@ -138,7 +139,7 @@ select </ul> </div> <br /> - <button id="remove-fixed" name="remove-fixed" class="btn small primary pull-right" type="submit"> Remove from paper</button> + <button id="remove-fixed" name="remove-fixed" class="btn btn-danger pull-right" type="submit"> Remove from paper</button> </div> </div> </div> <!-- /.row --> @@ -179,7 +180,7 @@ select {% endif %} </div> <br /><br /> - <button id="add-random" name="add-random" class="btn small primary pull-right" type="submit">Add to paper</button> + <button id="add-random" name="add-random" class="btn btn-primary pull-right" type="submit">Add to paper</button> </div> </div> <div class="col-md-6"> @@ -205,16 +206,16 @@ select </ul> </div> <br /> - <button id="remove-random" name="remove-random" class="btn small primary pull-right" type="submit"> Remove from paper</button> + <button id="remove-random" name="remove-random" class="btn btn-danger pull-right" type="submit"> Remove from paper</button> </div> </div> </div> <!-- /.row --> <br> <div class="pull-left"> - <a class="btn btn-primary" id="random-prev">< Previous</a> + <a class="btn btn-info" id="random-prev">< Previous</a> </div> <div class="pull-right"> - <a class="btn btn-primary" id="random-next">Next ></a> + <a class="btn btn-info" id="random-next">Next ></a> </div> </div> <!-- /#random-questions --> @@ -229,10 +230,10 @@ select {{ qpaper_form.shuffle_testcases }} <span>Shuffle MCQ/MCC options for each student</span> </label> <br><br> - <input class ="btn primary large" type="submit" name="save" id="save" value="Save question paper"> + <input class ="btn btn-success" type="submit" name="save" id="save" value="Save question paper"> <br> <div class="pull-left"> - <a class="btn btn-primary" id="finish-prev">< Previous</a> + <a class="btn btn-info" id="finish-prev">< Previous</a> </div> </center> </div> <!-- /#finish --> @@ -252,6 +253,7 @@ select {% endif %} }) </script> +</div> {% endblock %} {% block manage %} {% endblock %} diff --git a/yaksh/templates/yaksh/editprofile.html b/yaksh/templates/yaksh/editprofile.html index e5191ad..d654359 100644 --- a/yaksh/templates/yaksh/editprofile.html +++ b/yaksh/templates/yaksh/editprofile.html @@ -4,7 +4,7 @@ <form action="{{URL_ROOT}}/exam/editprofile/" method="post" > {% csrf_token %} <center> - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> {{ form.as_table }} </table> </center> diff --git a/yaksh/templates/yaksh/editquestionpaper.html b/yaksh/templates/yaksh/editquestionpaper.html index fa6d7d7..c91feaf 100644 --- a/yaksh/templates/yaksh/editquestionpaper.html +++ b/yaksh/templates/yaksh/editquestionpaper.html @@ -8,6 +8,7 @@ {% endblock %} {% block manage %} +<div class="yakshwell container"> <form name=frm action="" method="post"> {% csrf_token %} <p><u> Fixed Questions </u></p> @@ -23,4 +24,5 @@ {% endfor %} <br> </form> +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/error_template.html b/yaksh/templates/yaksh/error_template.html index 301020e..5530844 100644 --- a/yaksh/templates/yaksh/error_template.html +++ b/yaksh/templates/yaksh/error_template.html @@ -1,15 +1,13 @@ -{% block css%} - <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> -{% endblock %} {% load custom_filters %} {% if error_message %} +<div class="container-fluid row justify-content-center"> {% for error in error_message %} - - <div class="panel panel-danger"> - <div class="panel-heading">Error No. {{ forloop.counter }}</div> - <div class="panel-body"> - <div class="well well-sm"> +<div class="col-md-10 yakshwell"> + <div class="card "> + <div class="card-header alert-danger">Error No. {{ forloop.counter }}</div> + <div class="card-body "> + <div class=""> {% if not error.type %} <pre><code> {{error|safe}} </code></pre> @@ -18,16 +16,16 @@ {% if error.test_case %} <strong> We tried your code with the following test case:</strong> <br/></br> - <pre><code><strong style="color:#d9534f"> + <pre><code><strong class="text-danger"> {{error.test_case}} </strong></code></pre> {% endif %} <p> <b>The following error took place: </b></p> - <table class="table table-bordered" width="100%" id='assertion'> + <table class="table table-borderless border border-danger table-responsive-sm" width="100%" id='assertion'> <col width="30%"> - <tr class = "active"> + <tr class = "bg-light"> <td><b>Exception Name: </b></td> - <td><span style="color: #d9534f">{{error.exception}}</span></td> + <td><span class="text-danger">{{error.exception}}</span></td> </tr> <tr> <td><b>Exception Message: </b></td><td>{{error.message}}</td> @@ -44,16 +42,16 @@ {% elif error.type == 'stdio' %} {% if error.given_input %} - <table class="table table-bordered"> + <table class="table table-borderless table-responsive-sm"> <col width="30%"> - <tr class = "active"> + <tr class = "bg-light"> <td> For given Input value(s):</td> <td>{{error.given_input}}</td> </tr> </table> {% endif %} - <table class="table table-bordered" width="100%" id="stdio"> + <table class="table table-borderless table-responsive-sm" width="100%" id="stdio"> <col width="10%"> <col width="40%"> <col width="40%"> @@ -69,16 +67,16 @@ <td>{{expected|default:""}} </td> <td>{{user|default:""}}</td> {% if forloop.counter0 in error.error_line_numbers or not expected or not user %} - <td><span class ="glyphicon glyphicon-remove text-warning"/></td> + <td><span class ="fa fa-times text-warning"/></td> {% else %} - <td><span class ="glyphicon glyphicon-ok text-success"/></td> + <td><span class ="fa fa-check text-success"/></td> {% endif %} </tr> {% endfor %} </table> - <table width="100%" class='table table-bordered'> + <table width="100%" class="table table-borderless table-responsive-sm"> <col width="10"> - <tr class = "danger"> + <tr class = "bg-light"> <td><b>Error:</b></td> <td>{{error.error_msg}}</td> </tr> @@ -87,5 +85,7 @@ </div> </div> </div> + </div> {% endfor %} +</div> {% endif %}
\ No newline at end of file diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 2e5a403..2a22bd9 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -6,7 +6,7 @@ {% block pagetitle %} Grade User {% endblock pagetitle %} {% block content %} - +<div class="yakshwell container"> {% block script %} <script src="{{ URL_ROOT }}/static/yaksh/js/jquery.tablesorter.min.js"></script> <script src="{{ URL_ROOT }}/static/yaksh/js/mathjax/MathJax.js?config=TeX-MML-AM_CHTML"></script> @@ -20,10 +20,11 @@ $(document).ready(function() {% endblock script %} {% if course_details %} - <table id="course-details" class="table table-bordered"> - <tr> - <th>Courses</th> - <th> Quizzes </th> +<div class="table-wrapper-2"> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr class="yakshlabel yakshred text-center"> + <th><i class="fa fa-book"></i> Courses</th> + <th><i class="fa fa-puzzle-piece"></i> Quizzes </th> </tr> {% for course in course_details %} @@ -44,6 +45,7 @@ $(document).ready(function() </ul></tr> {% endfor %} </table> + </div> {% endif %} <div class="row"> @@ -51,18 +53,21 @@ $(document).ready(function() {% if users %} <div id = "student" class="col-md-2"> {% for user in users %} - <p><a href = "{{URL_ROOT}}/exam/manage/gradeuser/{{quiz_id}}/{{user.user__id}}/{{course_id}}/"> + <p><a href = "{{URL_ROOT}}/exam/manage/gradeuser/{{quiz_id}}/{{user.user__id}}/{{course_id}}/" class="btn btn-primary"> {{user.user__first_name}} {{user.user__last_name}}</a></p> {% endfor %} </div> {% else %} +<center> + <div class="alert-warning alert animated flash"> <h4>No Users Found for {{ quiz.description }}</h4> +</center> {% endif %} {% endif %} {% if has_quiz_assignments %} -<a href="{{URL_ROOT}}/exam/manage/download/quiz_assignments/{{quiz_id}}/{{course_id}}"> +<a href="{{URL_ROOT}}/exam/manage/download/quiz_assignments/{{quiz_id}}/{{course_id}}" class="btn btn-outline-info"> Download All Assignments</a> {% endif %} @@ -116,9 +121,9 @@ Status : <b style="color: red;"> Failed </b><br/> {% if paper.answers.count %} <h4> Report </h4><br> -<table class="tablesorter table table-striped table-bordered" id ='marks_table'> +<table class="tablesorter table table-striped table-bordered table-responsive-sm" id ='marks_table'> <thead> - <tr> + <tr class="yakshlabel text-center yakshred"> <th>Question Id</th> <th>Questions</th> <th>Marks Obtained</th> @@ -137,7 +142,7 @@ Status : <b style="color: red;"> Failed </b><br/> </tbody> </table> - +<div class="table-wrapper-2"> <h3> Answers </h3><br> <form name=frm id="q{{ paper.quiz.id }}_form" action="{{URL_ROOT}}/exam/manage/gradeuser/{{quiz_id}}/{{user_id}}/{{paper.attempt_number}}/{{course_id}}/" @@ -145,14 +150,14 @@ Status : <b style="color: red;"> Failed </b><br/> {% csrf_token %} {% for question, answers in paper.get_question_answers.items %} -<div class = "well well-sm"> -<div class="panel panel-info"> - <div class="panel-heading" id="question_{{question.id}}"> +<div class = "yakshlabel"> +<div class="card"> + <div class="card-heading alert-info" id="question_{{question.id}}"> <strong> Details: {{forloop.counter}}. {{ question.summary }} <span class="marks pull-right"> Mark(s): {{ question.points }} </span> </strong> </div> - <div class="panel-body"> + <div class="card-body"> <h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong> {% if question.type == "mcq" or question.type == "mcc" %} <h5> <u>Choices:</u></h5> @@ -160,7 +165,7 @@ Status : <b style="color: red;"> Failed </b><br/> {% if testcase.correct %} <br/> <strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong> - <span class="label label-success"> Correct </span> + <span class="alert alert-success"> Correct </span> {% else %} <br/><strong> {{ forloop.counter }}. {{ testcase.options|safe }}</strong> @@ -195,46 +200,51 @@ Status : <b style="color: red;"> Failed </b><br/> {% if question.type == "upload" %} {% if has_user_assignments %} <a href="{{URL_ROOT}}/exam/manage/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}/{{course_id}}"> - <div class="panel"> + <div class="btn btn-outline-info text-center"> Assignment File for {{ data.user.get_full_name.title }} </div> </a> {% with answers|last as answer%} {% if answer.answer.correct %} - <div class="panel panel-success"> - <div class="panel-heading">Correct answer</div></div> + <div class="card "> + <div class="card-heading alert-success">Correct answer</div></div> {% else %} - <div class="panel panel-danger"> - <div class="panel-heading">Incorrect Answer</div></div> + <div class="card "> + <div class="card-heading alert-danger">Incorrect Answer</div></div> {% endif %} {% endwith %} {% else %} + <center> + <div class="alert alert-warning animated flash"> <h5>No Assignment submitted by {{ data.user.get_full_name.title }}</h5> + </div> + </center> {% endif %} {% else %} {% for ans in answers %} {% if ans.answer.correct %} - <div class="panel panel-success"> - <div class="panel-heading">Correct answer: + <div class="card "> + <div class="card-heading alert-success">Correct answer: {% else %} - <div class="panel panel-danger"> - <div class="panel-heading">Error: + <div class="card "> + <div class="card-heading-heading alert-danger">Error: {% endif %} {% with ans.error_list as err %} {% for error in err %} {% if error.type == 'stdio' %} - <div class = "well well-sm"> + <div class = "card"> + <div class="card-body"> {% if error.given_input %} - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> <col width="30%"> - <tr class = "active"> + <tr class = "table-active"> <td> For given Input value(s):</td> <td>{{error.given_input}}</td> </tr> </table> {% endif %} - <table class="table table-bordered" width="100%" id="output" style="table-layout: fixed"> + <table class="table table-bordered table-responsive-sm" width="100%" id="output" style="table-layout: fixed"> <col width="10%"> <col width="40%"> <col width="40%"> @@ -250,14 +260,14 @@ Status : <b style="color: red;"> Failed </b><br/> <td>{{expected|default:""}} </td> <td>{{user|default:""}}</td> {% if forloop.counter0 in error.error_line_numbers or not expected or not user %} - <td><span class ="glyphicon glyphicon-remove text-warning"/></td> + <td><span class ="fa fa-times text-warning"/></td> {% else %} - <td><span class ="glyphicon glyphicon-ok text-success"/></td> + <td><span class ="fa fa-check text-success"/></td> {% endif %} </tr> {% endfor %} </table> - <table width="100%" class='table table-bordered'> + <table width="100%" class="table table-bordered table-responsive-sm"> <col width="10"> <tr> <td><b>Error:</b></td> @@ -265,14 +275,16 @@ Status : <b style="color: red;"> Failed </b><br/> </tr> </table> </div> + </div> {% elif error.type == 'assertion' %} {% if error.test_case %} <strong> We tried you code with the following test case:</strong><br/></br> <pre><code><strong style="color:#d9534f">{{error.test_case}}</strong></code></pre> {% endif %} <p> <b>The following error took place: </b></p> - <div class="well well-sm"> - <table class="table table-bordered" width="100%" style="table-layout: fixed"> + <div class="card"> + <div class="card-body"> + <table class="table table-bordered table-responsive-sm" width="100%" style="table-layout: fixed"> <col width="30%"> <tr class = "active"> <td><b>Exception Name: </b></td> @@ -288,7 +300,8 @@ Status : <b style="color: red;"> Failed </b><br/> {% endif %} </tr> </table> - </div> <!-- Closes well --> + </div> + </div> <!-- Closes card --> {% else %} <pre><code> {{error|safe}} </code></pre> {% endif %} @@ -296,37 +309,45 @@ Status : <b style="color: red;"> Failed </b><br/> {% endwith %} </div> - <div class="panel-body"> + <div class="card-body"> {% if question.type == "code" %} <pre><code>{{ ans.answer.answer.strip|safe }}</code></pre> {% elif question.type == "mcc"%} - <div class="well well-sm"> + <div class="card"> + <div class="card-body"> {% for testcases in question.get_test_cases %} {%if testcases.id|stringformat:"i" in ans.answer.answer.strip|safe %} <li>{{ testcases.options.strip|safe }}</li> {% endif %} {% endfor %} </div> + </div> {% elif question.type == "mcq"%} - <div class="well well-sm"> + <div class="card"> + <div class="card-body"> {% for testcases in question.get_test_cases %} {%if testcases.id|stringformat:"i" == ans.answer.answer.strip|safe %} <li>{{ testcases.options.strip|safe }}</li> {% endif %} {% endfor %} </div> + </div> {% elif question.type == "arrange"%} - <div class="well well-sm"> + <div class="card"> + <div class="card-body"> {% get_answer_for_arrange_options ans.answer.answer question as tc_list %} {% for testcases in tc_list %} <li>{{ testcases.options.strip|safe }}</li> {% endfor %} + </div> </div> {% else %} - <div class="well well-sm"> - {{ ans.answer.answer.strip|safe }} + <div class="card"> + <div class="card-body"> + {{ ans.answer.answer.strip|safe }} + </div> </div> {% endif %} </div> @@ -340,7 +361,9 @@ Status : <b style="color: red;"> Failed </b><br/> {% endwith %} <hr/> </div> + {% endfor %} {# for question, answers ... #} + </div> <div class="form-group"> <h3>Teacher comments: </h3> <textarea id="comments_{{paper.question_paper.id}}" class="form-control" @@ -362,4 +385,5 @@ Status : <b style="color: red;"> Failed </b><br/> {% endif %} {#if data#} </div> +</div> {% endblock%} diff --git a/yaksh/templates/yaksh/intro.html b/yaksh/templates/yaksh/intro.html index 6bd2fab..567282a 100644 --- a/yaksh/templates/yaksh/intro.html +++ b/yaksh/templates/yaksh/intro.html @@ -1,55 +1,61 @@ {% extends "base.html" %} -{% block pagetitle %} OnlineTest Instructions and Rules -<h3> Important instructions & rules </h3> -{% endblock pagetitle %} -{% block content %} +{% block pagetitle %} OnlineTest Instructions and Rules {% endblock pagetitle %} - {% if questionpaper.quiz.is_expired %} - <div class="alert alert-error"> - This Quiz has expired. You can no longer attempt this Quiz. - <br/> - </div> - {% else %} - <div class="alert"> - {% load tz %} - {% get_current_timezone as TIME_ZONE %} - You can attempt this Quiz at any time between {{ questionpaper.quiz.start_date_time }} {{ TIME_ZONE }} and {{ questionpaper.quiz.end_date_time }} {{ TIME_ZONE }} - <br/> - You are not allowed to attempt the Quiz before or after this duration +{% block content %} +<div class="container-fluid card col-md-10"> + <center class="yakshwell"> + {% if questionpaper.quiz.is_expired %} + <div class="alert col-md-8 alert-error animated flash"> + This Quiz has expired. You can no longer attempt this Quiz. + <br/> + </div> + {% else %} + <div class="alert alert-success col-md-8 animated flash"> + {% load tz %} + {% get_current_timezone as TIME_ZONE %} + You can attempt this Quiz at any time between {{ questionpaper.quiz.start_date_time }} {{ TIME_ZONE }} and {{ questionpaper.quiz.end_date_time }} {{ TIME_ZONE }} <br/> - </div> - {% endif %} - <p> Welcome <strong>{{user.get_full_name|title}}</strong>, to the programming quiz! </p> - {{ questionpaper.quiz.instructions|safe }} - <div class="row"> - <div class="col-md-6"> - <center> - {% if status != "moderator" %} - <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}" class="btn btn-primary" name="home"> - <span class=" glyphicon glyphicon-arrow-left"> - </span> - Go Back</a> - {% else %} - <a href="{{URL_ROOT}}/exam" class="btn btn-primary" name="home"> - <span class=" glyphicon glyphicon-arrow-left"> - </span> - Go Back</a> + You are not allowed to attempt the Quiz before or after this duration + <br/> + </div> + {% endif %} + </center> + <div class="yakshwell"> + <p> Welcome <strong>{{user.get_full_name|title}}</strong>, to the programming quiz! </p> + {{ questionpaper.quiz.instructions|safe }} + <div class="row yakshwell"> + <div class="col-md-6"> + <center> + {% if status != "moderator" %} + <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}" class="btn btn-primary" name="home"> + <i class="fa fa-step-backward"> + </i> + Go Back</a> + {% else %} + <a href="{{URL_ROOT}}/exam" class="btn btn-primary" name="home"> + <i class="fa fa-step-backward"> + </i> + Go Back</a> + {% endif %} + </center> + </div> + <div class="col-md-6"> + {% if not questionpaper.quiz.is_expired %} + <form action="{{URL_ROOT}}/exam/start/{{ attempt_num }}/{{module.id}}/{{ questionpaper.id }}/{{course.id}}/" method="post" align="center"> + {% csrf_token %} + <center><button class="btn btn-success" type="submit" name="start"> Start Exam <i class="fa fa-play"></i></button></center> + </form> {% endif %} - </center> - </div> - <div class="col-md-6"> - {% if not questionpaper.quiz.is_expired %} - <form action="{{URL_ROOT}}/exam/start/{{ attempt_num }}/{{module.id}}/{{ questionpaper.id }}/{{course.id}}/" method="post" align="center"> - {% csrf_token %} - <center><button class="btn btn-success" type="submit" name="start"> Start Exam <span class="glyphicon glyphicon-chevron-right"></span></button></center> - </form> - {% endif %} - </div> - </div> + </div> + </div> + </div> + </div> {% endblock content %} + {% if user %} {% block info %} <h5>{{user.get_full_name|title}}({{user.profile.roll_number}}) Logged in as {{user.username}}</h5> {% endblock %} -{% endif %}
\ No newline at end of file +{% endif %} + diff --git a/yaksh/templates/yaksh/login.html b/yaksh/templates/yaksh/login.html index 9c377b9..667b5d9 100644 --- a/yaksh/templates/yaksh/login.html +++ b/yaksh/templates/yaksh/login.html @@ -1,21 +1,78 @@ {% extends "base.html" %} -{% block pagetitle %}<img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_text.png" width="100" alt="YAKSH"> -</img>{% endblock %} + + +{% block nav %} +<div class="container-fluid yakshnav"> +<nav class="navbar fixed-top navbar-expand-lg yakshheading yakshnav"> + <div class="container"> + <button class="navbar-toggler navbar-dark" type="button" data-toggle="collapse" data-target="#myNavbar" aria-controls="myNavbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon" style="color: white"></span> + </button> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/"> + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH" style="margin-top: -3px; margin-left:-15px"> + </img> + </a> + <div class="collapse navbar-collapse" id="myNavbar"> + <ul class="nav nav-pills ml-auto"> + <li><a href="#aboutus" class="nav-link">ABOUT US</a></li> + <li><a href="#contact" class="nav-link">CONTACT</a></li> + </ul> + </div> + </div> +</nav> +</div> +{% endblock %} {% block content %} - <div class="row"> - <div class="col-md-6" style="border-right:1px solid gray;"> + +<div class="container yakshheading yakshwell text-center wow animated fadeIn"> + + <span class="yakshred h3">2500+</span> Students in <span class="yakshred h3">350+</span> Institutions across <span class="yakshred h3">16+</span> states in India are using YAKSH + </br> +</div> +<div class="container"> + <div class="row yakshlabel text-center"> + <p class="yakshred h4">Online Test Interface for conducting online programming quiz.</p> + <div class="col-md-7 text-left"> + <ul class="h5"> + </br> + <li class="wow animated fadeInRight">Define fairly complicated programming problems and have users + solve the problem. </li> + </br> + <li class="wow animated fadeInRight" data-wow-delay="0.5s">Immediate verification of code solution. </li> + </br> + <li class="wow animated fadeInRight" data-wow-delay="1s">Supports pretty much arbitrary programming questions in Python, C, C++ and + simple Bash and uses "test cases" to test the implementations of the students.</li> + </br> + <li class="wow animated fadeInRight" data-wow-delay="1.5s">Supports simple multiple choice questions and File uploads.</li> + </br> + <li class="wow animated fadeInRight" data-wow-delay="2s">Since it runs on your Python, you could technically test any Python based library.</li> + </br> + <li class="wow animated fadeInRight" data-wow-delay="2.5s">Scales to over 500+ simultaneous users.</li> + </br> + </ul> + + </div> + + <div class="col-md-5"> + <div class="yakshwell"> + <div class="yakshwell"> + <a href="{{URL_ROOT}}/exam/register/" class="btn btn-outline-primary col-md-11 " >New User? SIGN UP</a> + </div> + <hr> <form action="" method="post"> {% csrf_token %} - <center><table class="table"> + <center><table class="table table-borderless yakshheading yakshgreen table-responsive-sm"> {{ form.as_table }} </table></center> - <button class="btn btn-primary" type="submit">Login</button> - <a class="btn btn-primary" href="{{URL_ROOT}}/exam/reset/forgotpassword/">Forgot Password?</a> - <a class="btn btn-primary" href="{{URL_ROOT}}/exam/register/">New User? Sign-Up </a> - <h3> Login with </h3> + <div class="row justify-content-center"> + <button class="col-4 btn btn-success" type="submit">Login</button><span class="col-1"></span> + <a class="btn btn-primary col-4" href="{{URL_ROOT}}/exam/reset/forgotpassword/">Forgot Password?</a> + </div> + <hr> + Login with <a class="btn btn-social-icon btn-google" href="{% url 'social:begin' 'google-oauth2' %}"> <span class="fa fa-google" style="font-size:32px;color:red" ></span> </a> @@ -24,29 +81,58 @@ </a> </form> </div> - <div class="col-md-6"> - <p> Online Test Interface for conducting online programming quiz. - <ul> - <li>Define fairly complicated programming problems and have users - solve the problem. </li> - <li>Immediate verification of code solution. </li> - <li>Supports pretty much arbitrary programming questions in Python, C, C++ and - simple Bash and uses "test cases" to test the implementations of the students.</li> - <li>Supports simple multiple choice questions and File uploads.</li> - <li>Since it runs on your Python, you could technically test any Python based library.</li> - <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" - style="color:black"> - - <span class="fa fa-github" style="font-size:48px"></span> - </p> - </a> + </br> + <div class="yakshred h4"> + Best platform you can find to learn</br> and to test your skills + </div> </div> + + </div> + + <div> + </br></br> + <h2 class="h4 yakshred" id="aboutus">About Us</h2> + <div class="yakshwell"> + <h5><b>History</b></h5> + + <p>At FOSSEE, Nishanth had implemented a nice django based app to test for multiple-choice questions. Prabhu Ramachandran was inspired by a programming contest that he saw at PyCon APAC 2011. Chris Boesch, who administered the contest, used a nice web application Singpath that he had built on top of GAE that basically checked your Python code, live. This made it fun and interesting.</p> + <p>Prabhu wanted an implementation that was not tied to GAE and hence wrote the initial cut of what is now 'Yaksh'. The idea being that anyone can use this to test students programming skills and not have to worry about grading their answers manually and instead do so on their machines.</p> + <p>The application has since been refactored and maintained by FOSSEE Developers.</p> + + <h5><b>Contact</b></h5> + <p>For further information and support you can contact + Python Team at FOSSEE: pythonsupport@fossee.in</p> + + <h5><b>License</b></h5> + <p>This is distributed under the terms of the BSD license. Copyright information is at the bottom of this file.</p> + + <h5><b>Authors</b></h5> + <p><a href="https://github.com/FOSSEE/online_test/graphs/contributors">FOSSEE Developers</a><br> + Copyright (c) 2011-2017 FOSSEE</p> + </div> </div> - + +</div> {% endblock content %} + + +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshfooter text-center" id="contact"> + {% block info %} + {% endblock %} + Developed by FOSSEE team, IIT Bombay + <hr style="background-color: white"> + <nav class="nav nav-pills nav-fill col-lg-12"> + + <li class="nav-item"> + <a class = "btn btn-social-icon btn-github nav-link" href ="https://github.com/fossee/online_test"">Fork us at: + <span class="fa fa-github" style="font-size:20px;"></span> + </a> + </li> + <li class="nav-item"><span class="nav-link"> Email : info@fossee.in</span></li> + <li class="nav-item"><a href="#" class="nav-link">FOSSEE website</a></li> + </nav> + </footer> + <!--footer end--> +{% endblock %}
\ No newline at end of file diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html index c848074..503cc72 100644 --- a/yaksh/templates/yaksh/moderator_dashboard.html +++ b/yaksh/templates/yaksh/moderator_dashboard.html @@ -8,32 +8,36 @@ {% block content %} -<center><h4 class="pull-left">List of quizzes! Click on the given links to have a look at answer papers for a quiz.</h4></center> -<a href="{{URL_ROOT}}/exam/toggle_moderator/" class="btn btn-primary pull-right"> - Switch To Student -</a> -<table class="table table-bordered"> - <th>Courses</th> - <th>Quizzes</th> +<center><h4 class="yakshgreen">List of quizzes! Click on the given links to have a look at answer papers for a quiz.</h4></center> +<div class="row justify-content-center"> +<div class="col-md-10 "> + <div class="table-wrapper-2"> +<table class="table table-bordered table-responsive-sm"> + <tr class="yakshlabel"> + <th class="yakshred text-center"><i class="fa fa-book"></i> Courses</th> + <th class="yakshred text-center"><i class="fa fa-puzzle-piece"></i> Quizzes</th> + </tr> {% for course in courses %} <tr> <td> - <a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}"> - {{ course }} + <a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}" class="btn btn-outline-success"> + <i class="fa fa-caret-right"></i> {{ course }} </a> </td> <td> {% get_course_details course as course_details %} {% if course_details %} - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> + <tr class="yakshlight"> <th>Quiz</th> <th>Taken By</th> <th>No. of users Passed</th> <th>No. of users Failed</th> + </tr> {% for quiz, users_no, passed, failed in course_details %} <tr> <td> - <a href="{{URL_ROOT}}/exam/manage/monitor/{{ quiz.id }}/{{course.id}}">{{ quiz.description }}</a> + <a href="{{URL_ROOT}}/exam/manage/monitor/{{ quiz.id }}/{{course.id}}" >{{ quiz.description }}</a> </td> <td> {{users_no}} user(s) @@ -54,17 +58,18 @@ </tr> {% endfor %} </table> +</div> <hr> <center> - <a href="{{URL_ROOT}}/exam/manage/add_course" class="btn btn-default"> + <a href="{{URL_ROOT}}/exam/manage/add_course" class="btn btn-primary"> Add New Course </a> - <a href="{{URL_ROOT}}/exam/manage/create_demo_course" class="btn btn-default"> + <a href="{{URL_ROOT}}/exam/manage/create_demo_course" class="btn btn-primary"> Create Demo Course </a> - <a data-toggle="collapse" data-target="#help"> - <span class="glyphicon glyphicon-question-sign"></span> What's This + <a data-toggle="collapse" data-target="#help" class="btn"> + <span class="fa fa-question-circle yakshred"></span> What's This </a> <div id="help" class="collapse"> <ul class="list"> @@ -75,9 +80,11 @@ <li>You can also edit the Demo quiz.</li> </ul> </div> + <center> {% if msg %} - <h4>{{ msg }}</h4> + <h4 class="alert alert-info col-md-10 animated flash">{{ msg }}</h4> {% endif %} + </center> </center> {% if trial_paper %} <br/> @@ -85,7 +92,7 @@ <input type="checkbox" class="selectall"/> Select all <br/> <div id="trial"> - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> <form action="" method="post"> {% csrf_token %} {% for paper in trial_paper %} @@ -95,13 +102,11 @@ </tr> {% endfor %} </table> - <center><button class="btn" type="submit">Delete Selected</button></center> + <center><button class="btn btn-danger" type="submit">Delete Selected</button></center> </form> </div> {% endif %} +</div> +</div> {% endblock %} -{% if user %} - {% block info %} - <h5>{{user.get_full_name|title}}({{user.profile.roll_number}}) Logged in as {{user.username}}</h5> - {% endblock %} -{% endif %} + diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html index e40293b..1f85938 100644 --- a/yaksh/templates/yaksh/monitor.html +++ b/yaksh/templates/yaksh/monitor.html @@ -28,136 +28,151 @@ $(document).ready(function() {% endblock %} {% block content %} +<div class="container"> + <div class="yakshwell"> + {# ############################################################### #} + {# This is rendered when we are just viewing exam/monitor #} -{# ############################################################### #} -{# This is rendered when we are just viewing exam/monitor #} + {% if course_details %} + <div class="table-wrapper-2"> + <table id="course-details" class="table table-bordered table-responsive-sm"> + <tr class="table-info"> + <th>Courses</th> + <th> Quizzes </th> + </tr> -{% if course_details %} - <table id="course-details" class="table table-bordered"> - <tr> - <th>Courses</th> - <th> Quizzes </th> - </tr> + {% for course in course_details %} + <tr> + <td><ul class="list-group">{{course.name}} </td> - {% for course in course_details %} - <tr> - <td><ul class="list-group">{{course.name}} </td> - - {% if course.get_quizzes %} - <td> - {% for quiz in course.get_quizzes %} - <li class="list-group-item"><a href = "{{URL_ROOT}}/exam/manage/monitor/{{quiz.id}}/{{course.id}}/"> - {{quiz.description}} - </a></li> - {% endfor %} - </td> - {% else %} - <td> No quiz</td> - {% endif %} - </ul></tr> - {% endfor %} - </table> -{% endif %} - -{# ############################################################### #} -{# This is rendered when we are just viewing exam/monitor/quiz_num #} -{% if msg != "Monitor" %} -{% if quiz %} -{% if papers %} -<p>Course Name: {{ course.name }}</p> -<p>Quiz Name: {{ quiz.description }}</p> -<p>Number of papers: {{ papers|length }} </p> -{% completed papers as completed_papers %} - {# template tag used to get the count of completed papers #} - <p>Papers completed: <b> {{ completed_papers }} </b></p> - -{% inprogress papers as inprogress_papers %} - {# template tag used to get the count of inprogress papers #} - <p>Papers in progress:<b> {{ inprogress_papers }} </b></p> - -<p><a href="{{URL_ROOT}}/exam/manage/statistics/question/{{papers.0.question_paper.id}}/{{course.id}}">Question Statisitics</a></p> -<p> - <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#csvModal"> - Download CSV <span class="glyphicon glyphicon-save"></span> - </button></p> -<table id="result-table" class="tablesorter table table table-striped"> - <thead> - <tr> - <th> Name </th> - <th> Username </th> - <th> Roll number </th> - <th> Institute </th> - <th> Questions answered </th> - <th> Marks obtained </th> - <th> Attempts </th> - <th> Time Remaining </th> - <th> Status </th> - </tr> - </thead> - <tbody> - {% for paper in latest_attempts %} - <tr> - <td> <a href="{{URL_ROOT}}/exam/manage/user_data/{{paper.user.id}}/{{paper.question_paper.id}}/{{course.id}}">{{ paper.user.get_full_name.title }}</a> </td> - <td> {{ paper.user.username }} </td> - <td> {{ paper.user.profile.roll_number }} </td> - <td> {{ paper.user.profile.institute }} </td> - <td> {{ paper.get_answered_str }} </td> - <td> {{ paper.marks_obtained }} </td> - <td> {{ paper.answers.count }} </td> - <td id="time_left{{forloop.counter0}}"> {{ paper.time_left }} </td> - <td>{{ paper.status }}</td> + {% if course.get_quizzes %} + <td> + {% for quiz in course.get_quizzes %} + <li class="list-group-item"><a href = "{{URL_ROOT}}/exam/manage/monitor/{{quiz.id}}/{{course.id}}/"> + {{quiz.description}} + </a></li> + {% endfor %} + </td> + {% else %} + <td> No quiz</td> + {% endif %} + </ul></tr> + {% endfor %} + </table> </div> - </tr> - {% endfor %} - </tbody> -</table> -{% else %} -<p> No answer papers found for {{ quiz.description }}</p> -{% endif %} {# if papers #} -{% else %} -<h4>No Quiz Found</h4> -{% endif %} -{% endif %} - -<!-- CSV Modal --> -<div class="modal fade" id="csvModal" role="dialog"> - <div class="modal-dialog"> + {% endif %} - <!-- Modal content--> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal">×</button> - <h3 class="modal-title">Uncheck unwanted columns</h3> - </div> - <form action="{{URL_ROOT}}/exam/manage/download_quiz_csv/{{ course.id }}/{{ quiz.id }}/" method="post"> - {% csrf_token %} - <div class="modal-body"> - {% 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> + {# ############################################################### #} + {# This is rendered when we are just viewing exam/monitor/quiz_num #} + {% if msg != "Monitor" %} + {% if quiz %} + {% if papers %} + <div class="row"> + <div class="card col-md-4"> + <div class="row"> + <div class="col"><b>Course Name:<br>Quiz Name:<br>Number of papers:<br>Papers completed:<br>Papers in progress:</b> + </div> + <div class="col"> + {{ course.name }}<br> + {{ quiz.description }}<br> + {{ papers|length }}<br> + {% completed papers as completed_papers %} + {# template tag used to get the count of completed papers #} + <b class="yakshred"> {{ completed_papers }} </b><br> + {% inprogress papers as inprogress_papers %} + {# template tag used to get the count of inprogress papers #} + <b class="yakshred"> {{ inprogress_papers }} </b> + </div> + </div> + </div> + <div class="col"> + <p><a href="{{URL_ROOT}}/exam/manage/statistics/question/{{papers.0.question_paper.id}}/{{course.id}}" class="btn btn-primary">Question Statisitics</a></p> + <p> + <button type="button" class="btn btn-info" data-toggle="modal" data-target="#csvModal"> + Download CSV <span class="fa fa-download"></span> + </button></p> + </div> + <div class="yakshwell container-fluid"> + <div class="table-wrapper-2"> + <table id="result-table" class="tablesorter table table-striped table-responsive-sm"> + <thead> + <tr class="table-info"> + <th> Name </th> + <th> Username </th> + <th> Roll number </th> + <th> Institute </th> + <th> Questions answered </th> + <th> Marks obtained </th> + <th> Attempts </th> + <th> Time Remaining </th> + <th> Status </th> + </tr> + </thead> + <tbody> + {% for paper in latest_attempts %} + <tr> + <td> <a href="{{URL_ROOT}}/exam/manage/user_data/{{paper.user.id}}/{{paper.question_paper.id}}/{{course.id}}"><i class="fa fa-circle fa-sm"></i> {{ paper.user.get_full_name.title }}</a> </td> + <td> {{ paper.user.username }} </td> + <td> {{ paper.user.profile.roll_number }} </td> + <td> {{ paper.user.profile.institute }} </td> + <td> {{ paper.get_answered_str }} </td> + <td> {{ paper.marks_obtained }} </td> + <td> {{ paper.answers.count }} </td> + <td id="time_left{{forloop.counter0}}"> {{ paper.time_left }} </td> + <td>{{ paper.status }}</td> + </div> + </tr> + {% endfor %} + </tbody> + </table> </div> - {% endfor %} - <b>Select Attempt Number: Default latest attempt</b> - <select class="form-control" name = "attempt_number"> - {%for attempt_number in attempt_numbers %} - {% if forloop.last %} - <option value="{{ attempt_number }}" selected>{{ attempt_number }} (Latest)</option> {% else %} - <option value = "{{ attempt_number }}"> {{ attempt_number }}</option> + <p> No answer papers found for {{ quiz.description }}</p> + {% endif %} {# if papers #} + {% else %} + <h4>No Quiz Found</h4> {% endif %} - {% endfor %} - </select> - </div> - <div class="modal-footer"> - <button type="submit" class="btn btn-primary"> Download <span class="glyphicon glyphicon-save"></span></button> - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> - </div> - </form> - </div> + {% endif %} + </div> + <!-- CSV Modal --> + <div class="modal fade" id="csvModal" role="dialog"> + <div class="modal-dialog"> + + <!-- Modal content--> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h3 class="modal-title">Uncheck unwanted columns</h3> + </div> + <form action="{{URL_ROOT}}/exam/manage/download_quiz_csv/{{ course.id }}/{{ quiz.id }}/" method="post"> + {% csrf_token %} + <div class="modal-body"> + {% 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> + </div> + {% endfor %} + <b>Select Attempt Number: Default latest attempt</b> + <select class="form-control" name = "attempt_number"> + {%for attempt_number in attempt_numbers %} + {% if forloop.last %} + <option value="{{ attempt_number }}" selected>{{ attempt_number }} (Latest)</option> + {% else %} + <option value = "{{ attempt_number }}"> {{ attempt_number }}</option> + {% endif %} + {% endfor %} + </select> + </div> + <div class="modal-footer"> + <button type="submit" class="btn btn-primary"> Download <span class="glyphicon glyphicon-save"></span></button> + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> + </div> + </form> + </div> + </div> + </div> </div> </div> - - {% endblock %} diff --git a/yaksh/templates/yaksh/preview_questionpaper.html b/yaksh/templates/yaksh/preview_questionpaper.html index 123218f..7293351 100644 --- a/yaksh/templates/yaksh/preview_questionpaper.html +++ b/yaksh/templates/yaksh/preview_questionpaper.html @@ -3,30 +3,31 @@ {% block pagetitle %} Quiz: {{ paper.quiz.description }} {% endblock pagetitle %} {% block content %} -<div class="well"> - <div class="col-md-12"> +<div class="yakshwell container"> +<div class="card"> + <div class="col-md-12 card-body"> <div class="col-md-6">Maximum Mark(s): {{ paper.total_marks }}</div> <div class="col-md-6"><span class="pull-right">Total Time: {{ paper.quiz.duration }} minutes</span></div> </div> </div> -<div class="panel panel-default"> - <div class="panel-heading">Instructions</div> - <div class="panel-body" id="instructions"> +<div class="card"> + <div class="card-heading">Instructions</div> + <div class="card-body" id="instructions"> {{ paper.quiz.instructions|safe }} </div> </div> {% for question in questions %} - <div class="panel panel-info"> - <div class="panel-heading"> + <div class="card"> + <div class="card-heading yakshlabel"> <strong> {{forloop.counter}}. {{ question.summary }} <span class="marks pull-right"> Mark(s): {{ question.points }} </span> </strong> </div> - <div class="panel-body"> + <div class="card-body"> <h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong> <br/><b>Answer:</b><br/> {% if question.type == "code" %} - <div class="well">{{ question.snippet }}<br/></div> + <div class="card">{{ question.snippet }}<br/></div> {% endif %} {% if question.type == "mcq" or question.type == "mcc" %} <h5> <u>Choices:</u></h5> @@ -39,4 +40,5 @@ </div> </div> {% endfor %} +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/profile_updated.html b/yaksh/templates/yaksh/profile_updated.html index 2a2c7c5..2247004 100644 --- a/yaksh/templates/yaksh/profile_updated.html +++ b/yaksh/templates/yaksh/profile_updated.html @@ -1,4 +1,12 @@ {% extends "base.html" %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} <!DOCTYPE html> {% block title %} Profile {% endblock %} @@ -8,6 +16,14 @@ </script> {% endblock script %} {% block content %} -<h3>Your Profile is changed {{ user.first_name }}</h3> -<h3>Redirecting...</h3> +<div class="yakshwell container"> + <div class="row align-items-center"> + <div class="col"> + <h3>Your Profile is changed {{ user.first_name }}</h3> + <h3>Redirecting...</h3> + </div> + + <div class="col"><img src="{{ URL_ROOT }}/static/yaksh/images/profile_change.gif/"></div> + </div> +</div> {% endblock content %} diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index ebfe066..30797b9 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -1,9 +1,8 @@ {% extends "exam.html" %} {% load custom_filters %} -{% block pagetitle %} {{ paper.question_paper.quiz.description }} {% endblock pagetitle %} + {% block css %} -<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/question.css" type="text/css" /> <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/codemirror/lib/codemirror.css" type="text/css" /> <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/exam.css" type="text/css" /> @@ -114,6 +113,9 @@ question_type = "{{ question.type }}" {% block onload %} onload="updateTime();" {% endblock %} +<!-- No syllabus viewed during quiz + + {% block learning_units %} <center><h4>{{course.name}}</h4></center> <br> @@ -153,54 +155,83 @@ question_type = "{{ question.type }}" {% endfor %} </ul> {% endfor %} -{% endblock %} +{% endblock %}--> {% block main %} <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/" method="post" enctype="multipart/form-data"> {% csrf_token %} <input type=hidden name="question_id" id="question_id" value={{ question.id }}></input> - <div class="panel panel-default"> - <div class="panel-heading"> - <h4> - <u> {{ question.summary }} - {% if question.type == "mcq" %} - (SINGLE CORRECT CHOICE) - {% elif question.type == "mcc" %} - (MULTIPLE CORRECT CHOICES) - {% elif question.type == "code" %} - (PROGRAMMING) - {% elif question.type == "upload" %} - (ASSIGNMENT UPLOAD) - {% elif question.type == "integer" %} - (FILL IN THE BLANKS WITH INTEGER ANSWER) - {% elif question.type == "string" %} - (FILL IN THE BLANKS WITH STRING ANSWER) - {% if testcase.string_check == "lower" %} - <h5>(CASE INSENSITIVE)</h5> - {% else %} - <h5>(CASE SENSITIVE)</h5> - {% endif %} - {% elif question.type == "float" %} - (FILL IN THE BLANKS WITH FLOAT ANSWER) - {% elif question.type == "arrange" %} - (ARRANGE THE OPTIONS IN CORRECT ORDER) - {% endif %} - - </u> - <font class=pull-right>(Marks : {{ question.points }}) </font> - </h4> - <font size=3 face=arial> {{ question.description|safe }} </font> - {% if files %} - <h4>Files to download for this question</h4> - {% for f_name in files %} - <h5><a href="{{f_name.file.url}}">{{f_name.file.name}}</a></h5> - {% endfor %} - {% endif %} + <div class="yakshwell"> + <div class="card "> + <div class="col-md-12 bg-light"> + <div class="row align-items-center "> + <div class="col yakshheading"> {{ question.summary }} </div> + <div class="col-md-4 ml-auto yakshwell text-center"> + {% if question.type == "mcq" %} + SINGLE CORRECT CHOICE + {% elif question.type == "mcc" %} + MULTIPLE CORRECT CHOICES + {% elif question.type == "code" %} + PROGRAMMING + {% elif question.type == "upload" %} + ASSIGNMENT UPLOAD + {% elif question.type == "integer" %} + FILL IN THE BLANKS WITH INTEGER ANSWER + {% elif question.type == "string" %} + FILL IN THE BLANKS WITH STRING ANSWER + {% if testcase.string_check == "lower" %} + <br>(CASE INSENSITIVE) + {% else %} + <br>(CASE SENSITIVE) + {% endif %} + {% elif question.type == "float" %} + FILL IN THE BLANKS WITH FLOAT ANSWER + {% elif question.type == "arrange" %} + ARRANGE THE OPTIONS IN CORRECT ORDER + {% endif %} + </div> + <div class="col-md-1 ml-auto text-center"> + <span class="badge badge-warning">{{ question.points }}</span><br>Marks + </div> + </div> + </div> + <div class="yakshwell"> + <font size=3 face=arial> {{ question.description|safe }} </font> + {% if files %} + <div class="yakshwell col-md-5"> + <div class="card yakshwell"> + <span> Files to download for this question </span> <hr> + {% for f_name in files %} + <div class="yakshwell"> + <a href="{{f.file.url}}" class="btn btn-outline-secondary"><b>{{forloop.counter}}.</b> {{f_name.file.name}}</a> + <br> + </div> + {% endfor %} + </div> + </div> + {% endif %} + </div> </div> <br/> + <center> + {% if notification %} + {% if question.type == "code" %} + <div id="notification" class="alert alert-success col-md-8 animated flash" role="alert"> + <strong>Note:</strong> {{ notification }} + </div> + {% else %} + <div id="notification" class="alert alert-warning col-md-8 animated flash" role="alert"> + <strong>Note:</strong> {{ notification }} + </div> + {% endif %} + {% else %} + <div id="notification" role="alert"> + </div> + {% endif %} + </center> {% if quiz.is_exercise %} {% if can_skip %} - <div class = "well well-sm" id="solution"> + <div class = "card col-md-8" id="solution"> {% else %} <div id="solution" style="display:none"> {% endif %} @@ -210,7 +241,8 @@ question_type = "{{ question.type }}" <font size=3 face=arial> {{ question.solution|safe }} </font> </div> {% endif %} - <div class="panel-body"> + <div class="card"> + <div class="yakshwell"> {% if question.type == "mcq" %} {% for test_case in test_cases %} {% if last_attempt and last_attempt|safe == test_case.id|safe %} @@ -256,96 +288,82 @@ question_type = "{{ question.type }}" {% if question.type == "upload" %} <p>Upload assignment file for the said question<p> <input type=file id="assignment" name="assignment" multiple=""> - <hr> {% endif %} {% if question.type == "arrange" %} - {% if last_attempt %} - {% get_answer_for_arrange_options last_attempt question as test_cases %} - {% endif %} - <input name="answer" type="hidden" id='arrange_order'/> - <div class="list-group"> - <ol class="arrange"> - {% for test_case in test_cases %} - <li class="list-group-item" id={{test_case.id}}>{{test_case.options| safe }}</li> - {% endfor %} - </ol> - </div> - - <script type="text/javascript"> - var arrange = $("ol.arrange"); - var order_array = $(arrange).sortable(['serialize']); - </script> + {% if last_attempt %} + {% get_answer_for_arrange_options last_attempt question as test_cases %} + {% endif %} + <input name="answer" type="hidden" id='arrange_order'/> + <div class="list-group "> + <ol class="arrange "> + {% for test_case in test_cases %} + <li class="list-group-item yakshlight" id={{test_case.id}}>{{test_case.options| safe }}</li> {% endfor %} + </ol> + </div> + <script type="text/javascript"> + var arrange = $("ol.arrange"); + var order_array = $(arrange).sortable(['serialize']); + </script> {% endif %} - {% if question.type == "code" %} - <div class="row"> - <div class="col-md-9"> - <h4>Write your program below:</h4> - </div> - <div class="col-md-3"> - <a href="#answer" class="pull-right" onclick="reset_editor()" name="reset" id="reset">Undo Changes <span class="glyphicon glyphicon-refresh"></span></a> - </div> - </div> - <textarea autofocus name="answer" id="answer"></textarea> - <br> - {% endif %} - <div class="from-group"> + {% if question.type == "code" %} + <div class="row align-items-center"> + <div class="col-md-9"> + <h5>Write your program below:</h5> + </div> + <div class="col-md-3 ml-auto"> + <a href="#answer" class=" btn btn-outline-primary" onclick="reset_editor()" name="reset" id="reset">Undo Changes <span class="glyphicon glyphicon-refresh"></span></a> + </div> + </div> + <div class="yakshwell"> + <textarea autofocus name="answer" id="answer"></textarea> + </div> + {% endif %} + </div> + </div> + <div class="text-center yakshwell"> {% if question.type == "mcq" or question.type == "mcc" or question.type == "integer" or question.type == "float" or question.type == "string" %} - <br><button class="btn btn-primary" type="submit" name="check" id="check">Submit Answer</button> + <br><button class="btn btn-success" type="submit" name="check" id="check">Submit Answer</button> {% elif question.type == "upload" %} - <br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return validate();">Upload</button> + <br><button class="btn btn-success" type="submit" name="check" id="check" onClick="return validate();">Upload</button> {% elif question.type == "arrange" %} - <br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return user_arranged_options();">Submit Answer</button> + <br><button class="btn btn-success" type="submit" name="check" id="check" onClick="return user_arranged_options();">Submit Answer</button> {% else %} {% if question in paper.get_questions_unanswered or quiz.is_exercise %} - <button class="btn btn-primary" type="submit" name="check" id="check" >Check Answer <span class="glyphicon glyphicon-cog"></span></button> + <button class="btn btn-success" type="submit" name="check" id="check" >Check Answer <span class="glyphicon glyphicon-cog"></span></button> {% endif %} {% endif %} {% if quiz.is_exercise %} {% if can_skip %} <button id="skip_ex" class="btn btn-primary" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')" name="skip"> Next <span class="glyphicon glyphicon-arrow-right"></span></button> {% else %} - <button id="skip_ex" class="btn btn-primary" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')" name="skip" style="visibility:hidden"> Next <span class="glyphicon glyphicon-arrow-right"></span></button> + <button id="skip_ex" class="btn btn-primary" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')" name="skip" style="visibility:hidden"> Next <span class="fa fa-step-forward"></span></button> {% endif %} {% endif %} {% if paper.question_paper.quiz.allow_skip and not paper.get_questions_unanswered|length_is:"1" %} {% if question in paper.get_questions_unanswered %} - <button class="btn btn-primary" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')" name="skip" id="skip">Attempt Later <span class="glyphicon glyphicon-arrow-right"></span></button> + <button class="btn btn-primary" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/')" name="skip" id="skip">Attempt Later <span class="fa fa-step-forward"></span></button> {% endif %} {% endif %} </div> </form> - </div> + </div> </div> <br/> <p id="status"></p> - {% if notification %} - {% if question.type == "code" %} - <div id="notification" class="alert alert-success" role="alert"> - <strong>Note:</strong> {{ notification }} - </div> - {% else %} - <div id="notification" class="alert alert-warning" role="alert"> - <strong>Note:</strong> {{ notification }} - </div> - {% endif %} - {% else %} - <div id="notification" role="alert"> - </div> - {% endif %} {% if question.type == 'code' or question.type == 'upload' %} <div class="row" id="error_panel"></div> {% endif %} <!-- Modal --> - <div class="modal fade " id="upload_alert" > + <div class="modal" id="upload_alert" > <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> @@ -355,14 +373,10 @@ question_type = "{{ question.type }}" <font color="brown"><b>Kindly attach a file and then click upload.</b></font> </div> <div class="modal-footer"> - <button type="button" class="btn primary close" data-dismiss="modal">OK</button> + <button type="button" class="btn btn-primary" data-dismiss="modal">OK</button> </div> </div> </div> </div> {% endblock main %} -{% if user %} - {% block info %} - <h5>{{user.get_full_name|title}}({{user.profile.roll_number}}) Logged in as {{user.username}}</h5> - {% endblock %} -{% endif %} + diff --git a/yaksh/templates/yaksh/quit.html b/yaksh/templates/yaksh/quit.html index ee72026..3d22746 100644 --- a/yaksh/templates/yaksh/quit.html +++ b/yaksh/templates/yaksh/quit.html @@ -1,32 +1,43 @@ {% extends "base.html" %} -{% block pagetitle %} <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_text.png" -width="80" alt="YAKSH"></img> {% endblock %} +{% block pagetitle %} +<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> +</div> +{% endblock %} + {% block content %} -<center><table class="table table-bordered" > - <caption> <center><h3>Submission Status</h3> </center> </caption> +<center> +<div class="col-md-8 yakshwell"> + <h3>Submission Status</h3> + <table class="table table-bordered table-responsive-sm" > <thead> - <tr> + <tr class="yakshred text-center"> <th> Question</th> - <th> State </th> + <th> Status </th> </tr> </thead> {% for question in paper.questions.all %} <tbody> {% if question in paper.questions_answered.all %} - <tr class="info"> + <tr class="table-success"> <td> {{ question.summary }} </td> <td> Attempted </td> {% else %} - <tr class="danger"> + <tr class="table-danger"> <td> {{ question }} </td> <td> Not completed </td> {% endif %} </tr> </tbody> {% endfor %} -</table></center> + </table> +</div> +</center> {% if paper.question_paper.quiz.is_exercise %} <center><h4> Are you sure you wish to quit the Exercise?</h4></center> @@ -38,8 +49,8 @@ width="80" alt="YAKSH"></img> {% endblock %} <form action="{{URL_ROOT}}/exam/complete/{{ paper.attempt_number }}/{{module_id}}/{{ paper.question_paper.id }}/{{course_id}}/" method="post"> {% csrf_token %} <center> - <button class="btn" type="submit" name="yes">Yes!</button> - <button class="btn" type="button" name="no" onClick="window.location='{{ URL_ROOT }}/exam/start/{{ paper.attempt_number }}/{{module_id}}/{{ paper.question_paper.id }}/{{course_id}}'">No!</button> + <button class="btn btn-outline-success" type="submit" name="yes">Yes!</button> + <button class="btn btn-outline-danger" type="button" name="no" onClick="window.location='{{ URL_ROOT }}/exam/start/{{ paper.attempt_number }}/{{module_id}}/{{ paper.question_paper.id }}/{{course_id}}'">No!</button> </center> </form> {% endblock content %} diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html index 68044da..5194f11 100644 --- a/yaksh/templates/yaksh/quizzes_user.html +++ b/yaksh/templates/yaksh/quizzes_user.html @@ -1,114 +1,182 @@ {% extends "user.html" %} {% block title %} Student Dashboard {% endblock %} -{% block pagetitle %} {{ title }} {% endblock %} + +{% block script %} + +{% endblock %} + {% block main %} +<div class="container"> {% if msg %} - <div class="alert alert-warning" role="alert"> - <center>{{ msg }}</center> - </div> + <center><div class="col-md-8 alert alert-warning animated flash" role="alert"> + {{ msg }} + </div></center> {% endif %} - {% if user.profile.is_moderator %} - <div class="row"> - <a href="{{URL_ROOT}}/exam/toggle_moderator/" class="btn btn-primary pull-right" style="margin-top: 20px; margin-bottom: 20px;"> - Switch To Moderator - </a> - </div> - {% endif %} - {% 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"> - {% 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> + + {% block navtab %} + {% if user.profile.is_moderator %} + <div class="row"> + <a href="{{URL_ROOT}}/exam/toggle_moderator/" class="btn btn-primary pull-right" style="margin-top: 20px; margin-bottom: 20px;"> + Switch To Moderator + </a> + </div> + {% endif %} + {% if 'Enrolled Courses' not in title%} + <div class="container"> + <div class="nav nav-tabs yakshnavtab"> + <li class="nav-item" > + <a class="active nav-link bg-light" href="{{ URL_ROOT }}/exam/quizzes/" id="yakshactive">ALL COURSES</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="{{ URL_ROOT }}/exam/quizzes/enrolled/">ENROLLED COURSES</a> + </li> </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"> - <div class="row"> - <div class="col-md-4"> - <h4><b> - <a href="{{URL_ROOT}}/exam/course_modules/{{course.id}}"> - {{ course.name }} by {{ course.creator.get_full_name }} - </a> - </b></h4> </div> - <div class="col-md-4"> - {% 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> - {% if course.has_lessons %} <a href="{{URL_ROOT}}/exam/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content" class="btn btn-primary"> - Download Course - </a> - {% endif %} - {% else %} - {% if course.active %} - {% if course.is_active_enrollment %} - {% if course.is_self_enroll %} - <a class="btn btn-success" href="{{ URL_ROOT }}/exam/self_enroll/{{ course.id }}">Enroll</a> - {% else %} - <a class="btn btn-success" href="{{ URL_ROOT }}/exam/enroll_request/{{ course.id }}">Enroll</a> - {% endif %} - {% else %} - <span class="label label-danger" style="font-size: 15px"> - Enrollment Closed - </span> - {% endif %} - {% else %} - <span class="label label-danger" style="font-size: 15px"> - Course Closed - </span> - {% endif %} - {% endif %} + <div class="row justify-content-center yakshwell"> + <div class="col-md-6"> + <div class="yakshwell"> + <form action="{{ URL_ROOT }}/exam/quizzes/" method="post" id="custom-search-form" > + {% csrf_token %} + <div class="col-md-12"> + <div class="input-group"> + <div class="input-group-prepend"> + <span class="input-group-text" id="basic-addon1">Search Course</span> + </div> + <input type="text" name="course_code" class="form-control" type="search" placeholder="Enter Course-Code"> + <span class="input-group-append"> + <button class="btn btn-outline-secondary" type="submit"><i class="fa fa-search yakshred"></i></button> + <button class="btn btn-outline-secondary" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/quizzes/");'>Go Back</button> + </span> + </div> + </div> + </form> + </div> </div> - <div class="col-md-4"> - {% if course.days_before_start != 0 %} - <span class="label label-info" style="font-size: 15px"> - {{course.days_before_start}} day(s) to start - </span> - {% endif %} </div> - </div> - {% if course.is_active_enrollment %} - <div class="alert alert-info"> - Start Date : {{course.start_enroll_time}} - <br> - End Date : {{course.end_enroll_time}} + {% else %} + <div class="container"> + <div class="nav nav-tabs yakshnavtab"> + <li class="nav-item" > + <a class="nav-link" href="{{ URL_ROOT }}/exam/quizzes/">ALL COURSES</a> + </li> + <li class="nav-item"> + <a class="active nav-link bg-light" href="{{ URL_ROOT }}/exam/quizzes/enrolled/" id="yakshactive">ENROLLED COURSES</a> + </li> + </div> </div> {% endif %} + {% endblock %} + + {% if not courses %} + <center><div class="col-md-8 alert alert-warning animated flash" role="alert"> + No Courses to display + </div></center> + {% endif %} - {% if course.instructions %} - <div class="row"> - <div class="panel-group"> - <div class="panel panel-default"> - <div class="panel-heading"> - <h4 class="panel-title"> - <a data-toggle="collapse" href="#collapse{{ forloop.counter }}">Course Instructions</a> - </h4> + <div class="row justify-content-md-center align-items-center" > + <div class="col col-sm-10 yakshwell"> + {% for course in courses %} + <div class="yakshwell"> + <div class="row yakshlabel align-items-center"> + <div class="col"> + <h4><b> + + {{ course.name }} by {{ course.creator.get_full_name }} + + </b></h4> + {% if course.is_active_enrollment %} + <div class="text-left"> + <span class="yakshgreen">{{course.start_enroll_time}}</span> to <span class="yakshgreen">{{course.end_enroll_time}}</span> + </div> + {% endif %} + </div> + <div class="col-sm-auto"> + {% if course.days_before_start != 0 %} + <span class="label label-info" style="font-size: 15px"> + {{course.days_before_start}} day(s) to start + </span> + {% endif %} + + </div> + <div class="container col-sm-4 offset-sm-2"> + <span class="row align-items-center"> + <span class="col-sm-4" > + <a class="btn btn-primary" data-toggle="collapse" href="#collapsedetails{{course.id}}" role="button" aria-expanded="false" aria-controls="#collapsedetails{{course.id}}">DETAILS</a> + </span> + + <span class="col-sm-auto"> + {% if user in course.requests.all %} <span class="badge badge-warning">Request Pending </span> + {% elif user in course.rejected.all %}<span class="badge badge-danger">Request Rejected</span> + {% elif user in course.students.all %}<a class="btn btn-success" href="{{URL_ROOT}}/exam/course_modules/{{course.id}}" >START</a> + {% else %} + {% if course.active %} + {% if course.is_active_enrollment %} + {% if course.is_self_enroll %} + <a class="btn btn-success" href="{{ URL_ROOT }}/exam/self_enroll/{{ course.id }}">ENROLL</a> + {% else %} + <a class="btn btn-success" href="{{ URL_ROOT }}/exam/enroll_request/{{ course.id }}">ENROLL</a> + {% endif %} + {% else %} + <span class="btn btn-danger disabled" style="font-size: 15px"> + Enrollment Closed + </span> + {% endif %} + {% else %} + <span class="badge badge-danger" style="font-size: 15px"> + Inactive Course + </span> + {% endif %} + {% endif %} + </span> + </span> + </div> + <!-- About course--> + <div class="collapse container-fluid" id="collapsedetails{{course.id}}"> + <div class="card card-body "> + <h4>{{ course.name }} by {{ course.creator.get_full_name }}</h4><hr> + <div class="row"> + <div class="col-md-7"> + {% if course.description %} + <p> <span class="yakshred yakshheading">About the course</span><br> + {{ course.description }} + </p> + {% endif %} + {% if course.get_learning_modules %} + <p> <span class="yakshred yakshheading">What you'll learn</span> + <ul> + {% for module in course.get_learning_modules %} + <li>{{module.name|title}}</li> + {% endfor %} + </ul> + </p> + {% endif %} + <p> <span class="yakshred yakshheading">Instructor</span><br> + {{ course.creator.get_full_name }} + </p> + {% if course.instructions %} + <p> <span class="yakshred yakshheading">Requirement(s)</span><br> + {{ course.instructions|safe }} + </p> + {% endif %} + </div> + <div class="col-md-4 "> + <table class="table table-borderless card table-responsive-sm"> + <tr><td class="yakshgreen">STARTS ON</td> <td>{{course.start_enroll_time}}</td></tr> + <tr><td class="yakshgreen">ENDS ON</td> <td>{{course.end_enroll_time}}</td> + <tr><td class="yakshgreen">LEVEL</td> <td></td></tr> + <tr><td class="yakshgreen">PERKS</td> <td> Verified Certificate </td></tr> + </table> + </div> + </div> + </div> </div> - <div id="collapse{{ forloop.counter }}" class="panel-collapse collapse"> - <div class="panel-body"> {{ course.instructions|safe }}</div> + <!-- End of About course--> </div> - </div> - </div> </div> - {% endif %} + {% endfor %} + </div> </div> -</div><!--/row--> -</br> -{% endfor %} +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/register.html b/yaksh/templates/yaksh/register.html index 13cd248..71fe1de 100644 --- a/yaksh/templates/yaksh/register.html +++ b/yaksh/templates/yaksh/register.html @@ -1,19 +1,63 @@ {% extends "base.html" %} +{% block nav %} +<div class="container-fluid yakshnav"> +<nav class="navbar fixed-top navbar-expand-lg yakshheading yakshnav"> + <div class="container"> + <button class="navbar-toggler navbar-dark" type="button" data-toggle="collapse" data-target="#myNavbar" aria-controls="myNavbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon" style="color: white"></span> + </button> + <a class="navbar-brand" href="{{ URL_ROOT }}/exam/"> + <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH" style="margin-top: -3px; margin-left:-15px"> + </img> + </a> + <div class="collapse navbar-collapse" id="myNavbar"> + <ul class="nav nav-pills ml-auto"> + <li class="nav-item"><a class="nav-link" href="{{ URL_ROOT }}/exam/">LOGIN INSTEAD?</a></li> + </ul> + </div> + </div> +</nav> +</div> +{% endblock %} -{% block pagetitle %} Online Test Registration {% endblock %} +{% block pagetitle %}<p class="yakshred"> Online Test Registration </p>{% endblock %} {% block content %} - +<div class="container-fluid row justify-content-center"> +<div class="col-md-10"> <form action="" method="post"> {% csrf_token %} - <h3> Please fill in the following details:</h3> + <h5> Please fill in the following details:</h5> <center> - <table class="table"> + <table class="table table-responsive-sm"> {{ form.as_table }} </table></center> - <center><button class="btn btn-primary" type="submit">Register</button> + <center class="yakshwell"><button class="btn btn-success" type="submit">Register</button> <a href="{{URL_ROOT}}/exam" class="btn btn-danger">Cancel</a></center> </form> - +</div> +</div> +<br><br><br> {% endblock content %} + +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshfooter text-center" id="contact"> + {% block info %} + {% endblock %} + Developed by FOSSEE team, IIT Bombay + <hr style="background-color: white"> + <nav class="nav nav-pills nav-fill col-lg-12"> + + <li class="nav-item"> + <a class = "btn btn-social-icon btn-github nav-link" href ="https://github.com/fossee/online_test"">Fork us at: + <span class="fa fa-github" style="font-size:20px;"></span> + </a> + </li> + <li class="nav-item"><span class="nav-link"> Email : info@fossee.in</span></li> + <li class="nav-item"><a href="#" class="nav-link">FOSSEE website</a></li> + </nav> + </footer> + <!--footer end--> +{% endblock %} diff --git a/yaksh/templates/yaksh/regrade.html b/yaksh/templates/yaksh/regrade.html index 77e28df..d119480 100644 --- a/yaksh/templates/yaksh/regrade.html +++ b/yaksh/templates/yaksh/regrade.html @@ -3,53 +3,58 @@ {% block pagetitle %} Grader {% endblock pagetitle %} {% block content %} - +<div class="yakshwell container"> <div class="row"> - <div class="col-md-3"> - <ul class="nav nav-pills nav-stacked"> - <li class="active"><a href="#intro" data-toggle="pill" > Intro </a></li> - <li><a href="#questions" data-toggle="pill" > Question-wise regrade </a></li> - <li><a href="#quizzes" data-toggle="pill" > Quiz-wise regrade </a></li> - <li><a href="#users" data-toggle="pill" > User-wise regrade </a></li> - </ul> - </div><!--span2--> - <div class="col-md-9"> - <div class="tab-content"> - <div id="intro" class="tab-pane fade in active"> - <h3> Regrade </h3> + <div class="col-md-3 yakshlabel collapse" id="sidebar"> + <div class="nav nav-pills flex-column" role="tablist" aria-orientation="vertical"> + <a href="#intro" data-toggle="pill" class="nav-link active" role="tab" aria-controls="intro" aria-selected="true" id="introtab"> Intro </a> + <a href="#questions" data-toggle="pill" class="nav-link" role="tab" aria-controls="questions" aria-selected="false" id="questionstab"> Question-wise regrade </a> + <a href="#quizzes" data-toggle="pill" class="nav-link" role="tab" aria-controls="quizzes" aria-selected="false" id="quizzestab"> Quiz-wise regrade </a> + <li><a href="#users" data-toggle="pill" class="nav-link" role="tab" aria-controls="users" aria-selected="false" id="userstab"> User-wise regrade </a> + </div> + </div><!--end of siddebar--> + <a href="#sidebar" data-toggle="collapse" id="sidebaricon"><i class="fa fa-navicon fa-lg"></i></a> + <main class="tab-content col" id="sidebarbody"> + + + <div id="intro" class="tab-pane fade show active" role="tabpanel" aria-labelledby="introtab"> + <h3 class="yakshred"> Regrade </h3> <dl> - <dt> Question wise regrade </dt> + <dt class="yakshgreen"> Question wise regrade </dt> <dd> You can regrade a question for all answerpapers for a given quiz. </dd> - <dt> Quiz wise regrade <dt> + <dt class="yakshgreen"> Quiz wise regrade <dt> <dd> You can regrade an answerpaper for a quiz or a question for the same. </dd> - <dt> User wise regrade </dt> + <dt class="yakshgreen"> User wise regrade </dt> <dd> You can regrade an answerpaper for an user or a question for the same. </dd> </dl> </div> - <div id="questions" class="tab-pane fade"> + <div id="questions" class="tab-pane fade" role="tabpanel" aria-labelledby="questionstab"> + <div class="card"> {% for course in courses %} - <div class="well"> - <h4><span class="label label-info"> - <a href="#questions_quizzes{{ course.id }}" data-toggle="collapse">Course: {{ course }}</a> + + <div class="card-body"> + <h4><span class=""> + <a href="#questions_quizzes{{ course.id }}" data-toggle="collapse" class="btn btn-outline-success">Course: {{ course }}</a> </span></h4> - <div id="questions_quizzes{{ course.id }}" class="collapse"> + <div id="questions_quizzes{{ course.id }}" class="collapse card"> + <div class="card-body"> {% for quiz in course.get_quizzes %} - <p><a href="#questions_questions{{ course.id }}{{ quiz.id }}" data-toggle="collapse">Quiz: {{ quiz }}</a></p> - <div id="questions_questions{{ course.id }}{{ quiz.id }}" class="collapse"> + <p><a href="#questions_questions{{ course.id }}{{ quiz.id }}" data-toggle="collapse" class="btn btn-outline-info">Quiz: {{ quiz }}</a></p> + <div id="questions_questions{{ course.id }}{{ quiz.id }}" class="collapse card"> {% with questionpaper=quiz.questionpaper_set.get %} - <p class="bg-info"> Questions: </p> - <ol class="list-group"> + <p class="text-center yakshred h5 bg-light"> Questions: </p> + <ol class="list-group yakshwell"> {% for question in questionpaper.fixed_questions.all %} - <li class="list-group">{{ question.summary }} + <li class="list-group-item">{{ question.summary }} <a href="{{ URL_ROOT }}/exam/manage/regrade/questionpaper/{{ course.id }}/{{ question.id }}/{{ questionpaper.id }}/" - class="btn btn-default btn-sm pull-right"><span class="glyphicon glyphicon-repeat"></span> Regrade </a> + class="btn btn-success pull-right"><span class="fa fa-repeat"></span> Regrade </a> </li> {% endfor %} {% for random_set in questionpaper.random_questions.all %} {% for question in random_set.questions.all %} - <li class="list-group"> {{ question.summary }} + <li class="list-group-item"> {{ question.summary }} <a href="{{ URL_ROOT }}/exam/manage/regrade/questionpaper/{{ course.id}}/{{ question.id }}/{{ questionpaper.id }}/" - class="btn btn-default btn-sm pull-right"><span class="glyphicon glyphicon-repeat"></span> Regrade </a> + class="btn btn-success pull-right"><span class="fa fa-repeat"></span> Regrade </a> </li> {% endfor %} {% endfor %} @@ -58,32 +63,38 @@ </div> {% endfor %} </div> - </div><!--well--> + </div> + </div> + {% endfor %} + </div><!--card--> </div> - <div id="quizzes" class="tab-pane fade"> + <div id="quizzes" class="tab-pane fade" role="tabpanel" aria-labelledby="quizzestab"> + <div class="card"> {% for course in courses %} - <div class="well"> - <h4><span class="label label-info"> - <a href="#quizzes_quizzes{{ course.id }}" data-toggle="collapse">Course: {{ course }}</a> + + <div class="card-body"> + <h4><span class=""> + <span class=""><a href="#quizzes_quizzes{{ course.id }}" data-toggle="collapse" class="btn btn-outline-success">Course: {{ course }}</a></span> </span></h4> - <div id="quizzes_quizzes{{ course.id }}" class="collapse"> + <div id="quizzes_quizzes{{ course.id }}" class="collapse card"> + <div class="card-body"> {% for quiz in course.get_quizzes %} - <p><a href="#quizzes_papers{{ course.id }}{{ quiz.id }}" data-toggle="collapse">Quiz: {{ quiz }}</a></p> + <p><a href="#quizzes_papers{{ course.id }}{{ quiz.id }}" data-toggle="collapse" class="btn btn-outline-info">Quiz: {{ quiz }}</a></p> <div id="quizzes_papers{{ course.id }}{{ quiz.id }}" class="collapse"> - <ol class="list-group"> + <ol class="list-group yakshwell"> {% for answerpaper in quiz.questionpaper_set.get.answerpaper_set.all %} - <li class="list-group"> + <li class="list-group-item bg-light"> Username: {{ answerpaper.user.username }}; Name: {{ answerpaper.user.get_full_name }}; Attempt Number: {{ answerpaper.attempt_number}} <a href="{{ URL_ROOT }}/exam/manage/regrade/paper/{{ course.id }}/{{ answerpaper.id }}/" - class="btn btn-default btn-sm pull-right"><span class="glyphicon glyphicon-repeat"></span> Regrade whole paper </a> + class="btn btn-success btn-sm pull-right"><span class="fa fa-repeat"></span> Regrade whole paper </a> </li> - <ol class="list-group"> + <ol class="list-group yakshwell"> {% for question in answerpaper.questions.all %} - <li class="list-group"> {{ question.summary }} + <li class="list-group-item"> {{ question.summary }} <a href="{{ URL_ROOT }}/exam/manage/regrade/answerpaper/{{ course.id }}/{{ question.id }}/{{ answerpaper.id }}/" - class="btn btn-default btn-sm pull-right"><span class="glyphicon glyphicon-repeat"></span> Regrade </a> + class="btn btn-success btn-sm pull-right"><span class="fa fa-repeat"></span> Regrade </a> </li> {% endfor %} </ol> @@ -91,32 +102,38 @@ </ol> </div> {% endfor %} + </div> </div> - </div><!--well--> + </div> + {% endfor %} + </div><!--card--> </div> - <div id="users" class="tab-pane fade"> + <div id="users" class="tab-pane fade" role="tabpanel" aria-labelledby="userstab"> + <div class="card"> + <div class="card-body"> {% for course in courses %} - <div class="well"> - <h4><span class="label label-info"> - <a href="#users_users{{ course.id }}" data-toggle="collapse">Course: {{ course }}</a> + + <h4><span class=""> + <a href="#users_users{{ course.id }}" data-toggle="collapse" class="btn btn-outline-success">Course: {{ course }}</a> </span></h4> - <div id="users_users{{ course.id }}" class="collapse"> + <div id="users_users{{ course.id }}" class="collapse card"> + <div class="card-bodys"> {% for user in course.students.all %} - <p><a href="#users_papers{{ course.id }}{{ user.id }}" data-toggle="collapse"> Answer Papers for {{ user.get_full_name }}</a></p> - <div id="users_papers{{ course.id }}{{ user.id }}" class="collapse"> - <ol class="list-group"> + <p><a href="#users_papers{{ course.id }}{{ user.id }}" data-toggle="collapse" class="btn btn-outline-info"> Answer Papers for {{ user.get_full_name }}</a></p> + <div id="users_papers{{ course.id }}{{ user.id }}" class="collapse card"> + <ol class="list-group yakshwell"> {% for answerpaper in user.answerpaper_set.all %} - <li class="list-group"> Quiz: {{answerpaper.question_paper.quiz.description }}; Attempt Number: {{ answerpaper.attempt_number }} + <li class="list-group-item bg-light"> Quiz: {{answerpaper.question_paper.quiz.description }}; Attempt Number: {{ answerpaper.attempt_number }} <a href="{{ URL_ROOT }}/exam/manage/regrade/paper/{{ course.id }}/{{ answerpaper.id }}/" - class="btn btn-default btn-sm pull-right" ><span class="glyphicon glyphicon-repeat"></span> Regrade whole paper </a> + class="btn btn-success pull-right" ><span class="fa fa-repeat"></span> Regrade whole paper </a> </li> - <ol class="list-group"> + <ol class="list-group yakshwell"> {% for question in answerpaper.questions.all %} - <li class="list-group"> {{ question.summary }} + <li class="list-group-item"> {{ question.summary }} <a href="{{ URL_ROOT }}/exam/manage/regrade/answerpaper/{{ course.id }}/{{ question.id }}/{{ answerpaper.id }}/" - class="btn btn-default btn-sm pull-right"><span class="glyphicon glyphicon-repeat"></span> Regrade </a> + class="btn btn-success pull-right"><span class="fa fa-repeat"></span> Regrade </a> </li> {% endfor %} </ol> @@ -124,24 +141,27 @@ </ol> </div> {% endfor %} + </div> </div> - </div><!--well--> + {% endfor %} +</div> + </div><!--well--> </div> - </div> - </div><!--span10--> + + </main><!--span10--> </div><!--row--> {% if details %} <div> - <table class="table"> + <table class="table table-responsive-sm"> <tbody> {% for detail in details %} {% if detail.0 %} - <tr class="success"> + <tr class="table-success"> <td> Graded Successfully </td> {% else%} - <tr class="danger"> + <tr class="table-danger"> <td> Did not Grade </td> {% endif %} <td> {{ detail.1|linebreaks }} </td> @@ -151,5 +171,5 @@ </table> </div> {% endif %} - - {% endblock %} +</div> +{% endblock %} diff --git a/yaksh/templates/yaksh/results_user.html b/yaksh/templates/yaksh/results_user.html index 2704da8..b47b5c1 100644 --- a/yaksh/templates/yaksh/results_user.html +++ b/yaksh/templates/yaksh/results_user.html @@ -2,9 +2,10 @@ {% block pagetitle %} Results {% endblock pagetitle %} {% block content %} +<div class="yakshwell container"> <form> {% csrf_token %} - <center><table class="table well"> + <center><table class="table table-responsive-sm"> <th>Quiz Description <th>Obtained Marks <th>Maximum Marks @@ -19,5 +20,6 @@ {% endfor %} </table></center> </form> +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index 045eb87..dfb2f6f 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -2,12 +2,8 @@ {% load custom_filters %} {% block title %} {{ learning_module.name }} {% endblock %} + -{% block pagetitle %} {{ learning_module.name }} -{% if state == "lesson" %} - : {{lesson.name}} -{% endif %} -{% endblock %} {% block main %} <div class="col-sm-3 col-md-2 sidebar"> @@ -30,119 +26,197 @@ <li> {% get_unit_status course module unit user as status %} - {% if unit.id == current_unit.id %} - <span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Currently on"> - </span> - {% endif %} - {% if unit.type == "quiz" %} - <a href="{{ URL_ROOT }}/exam/start/{{unit.quiz.questionpaper_set.get.id}}/{{module.id}}/{{course.id}}"> - {{ unit.quiz.description }} - </a> - {% else %} - <a href="{{ URL_ROOT }}/exam/show_lesson/{{unit.lesson.id}}/{{module.id}}/{{course.id}}"> - {{ unit.lesson.name }} +<div class="row"> + + <!-- Side bar --> + <div class="col-md-3 yakshlabel collapse" id="sidebar"> + <center><h4><a class="text-dark" href="{{ URL_ROOT }}/exam/course_modules/{{course.id}}"><i class="fa fa-caret-left"></i> {{course.name}}</h4></center> + {% for module in all_modules %} + <div class="list-group"> + + <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}" id="menu1" class="list-group-item bg-light" data-parent="#sidebar"> + {% if module.id == learning_module.id %} + <i class="fa fa-toggle-on yakshred" data-toggle="tooltip" title="Currently on"> + </i> + {% else %} + <i class="fa fa-toggle-off" data-toggle="tooltip" title="Currently off"></i> + {% endif %} + {{module}} </a> - {% endif %} - {% if status == "completed" %} - <span class="glyphicon glyphicon-ok" style="color: #7CFC00;"></span> - {% else %} - <span class="glyphicon glyphicon-remove" style="color: #FF0000"></span> - {% endif %} - </li> - </span> + {% for unit in module.get_learning_units %} + <span id="menudrop"> + {% if unit.type == "quiz" %} + <a href="{{ URL_ROOT }}/exam/start/{{unit.quiz.questionpaper_set.get.id}}/{{module.id}}/{{course.id}}" class="list-group-item" data-parent="#menu1"> + {% if status == "completed" %} + <i class="fa fa-check-square yakshgreen"></i> + {% else %} + <i class="fa fa-square-o"></i> + {% endif %} + {% get_unit_status course module unit user as status %} + {{ unit.quiz.description }} + {% if unit.id == current_unit.id %} + <i class="fa fa-thumb-tack yakshred" data-toggle="tooltip" title="Currently on"> + </i> + {% endif %} + </a> + {% else %} + <a href="{{ URL_ROOT }}/exam/show_lesson/{{unit.lesson.id}}/{{module.id}}/{{course.id}}" class="list-group-item" data-parent="#menu1"> + {% if status == "completed" %} + <i class="fa fa-check-square yakshgreen"></i> + {% else %} + <i class="fa fa-square-o"></i> + {% endif %} + {% get_unit_status course module unit user as status %} + + + {{ unit.lesson.name }} + {% if unit.id == current_unit.id %} + <i class="fa fa-thumb-tack yakshred" data-toggle="tooltip" title="Currently on"> + </i> + {% endif %} + </a> + {% endif %} + </span> + {% endfor %} + + </div> {% endfor %} - </ul> - {% endfor %} -</div> -{% if msg %} -<center> -<div class="col-md-12 col-md-offset-1 main"> -<div class="alert alert-warning">{{msg}}</div></div> -</center> -{% endif %} -<div class="col-md-12 col-md-offset-1 main"> -{% if state == "module" %} -<div class="panel panel-default" style="border: none; box-shadow: none;"> - <div class="panel-body"> - {{learning_module.html_data|safe}} - {% if learning_module.html_data%} - <hr> - {% endif %} - {% if learning_module.get_learning_units %} - <center><h4>Following are the units in this modules</h4></center> - <table class="table"> - <tr> - <th>Unit Name</th> - <th>Unit Type</th> - </tr> - {% for unit in learning_module.get_learning_units %} - <tr> - <ul class="inputs-list"> - <td> - {% if unit.type == "quiz" %} - {{unit.quiz.description}} - {% else %} - {{unit.lesson.name}} + </div> + <a href="#sidebar" data-toggle="collapse" id="sidebaricon"><i class="fa fa-navicon fa-lg"></i></a> + <!-- End of sidebar--> + + <main class="col" id="sidebarbody"> + + <div class="container-fluid yakshwell"> + <div class="yakshwell bg-light"> + <div class="row align-items-center "> + <div class="col h3 text-center"> + {{ learning_module.name }} + {% if state == "lesson" %} + : {{lesson.name}} + {% endif %} + </div> + </div> + </div> + + + {% if msg %} + <center> + <div class="col-md-8 yakshwell"> + <div class="alert alert-warning animated flash">{{msg}}</div> + </div> + </center> {% endif %} - </td> - <td> - {% if unit.type == "quiz" %} - {% if unit.quiz.is_exercise %} - Exercise + + <div class="col-md-12 main"> + {% if state == "module" %} <!-- Module instructions body --> + <div class="row yakshwell"> + <div class="col-md-8 "> + {{learning_module.html_data|safe}} + {% if learning_module.html_data%} + {% endif %} + </div> + <div class="yakshwell col-md-3"> + <div class="bg-light"> + {% if learning_module.get_learning_units %} + <center><h4>Units in this module</h4></center><hr> + {% for unit in learning_module.get_learning_units %} + <div class="row justify-content-center"> + <span class="col-sm-2 yakshgreen"> + {% if unit.type == "quiz" %} + {% if unit.quiz.is_exercise %} + <span class="fa fa-pencil"></span> + {% else %} + <span class="fa fa-puzzle-piece"></span> + {% endif %} + {% else %} + <span class="fa fa-book"></span> + {% endif %} + </span> + <span class="col-sm-7"> + {% if unit.type == "quiz" %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} + </span> + </div> + {% endfor %} + {% else %} + <center><h3>No Lessons/Quizzes Found</h3></center> + {% endif %} + </div> + </div> + </div> + <div class="yakshwell text-center"> + {% if first_unit %} + <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{first_unit.id}}/1" class="btn btn-success">Start + <i class="fa fa-play"> + </i> + </a> {% else %} - Quiz + <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}" class="btn btn-success">Next + <i class="fa fa-step-forward"> + </i> + </a> {% endif %} - {% else %} - Lesson - {% endif %} - </td> - </ul> - </tr> - {% endfor %} - </table> - {% else %} - <center><h3>No Lessons/Quizzes Found</h3></center> + </div> + </div> + {% else %} <!-- Lesson body --> + + <div class="yakshwell"> + <div class="yakshwell text-center "> + {{lesson.html_data|safe}} + </div> + {% if lesson.get_files %} + <div class="yakshwell col-md-5"> + <div class="card yakshwell"> + <span class="h4"> Files for this lesson </span> <hr> + <span class="col-md-2"> + {% for f in lesson.get_files %} + <div class="yakshwell"> + <a href="{{f.file.url}}" class="btn btn-outline-secondary"><b>{{forloop.counter}}.</b> {{ f.file.name|file_title }}</a> + <br> + </div> + {% endfor %} + </span> + </div> + </div> + {% endif %} + </div> + <div class="yakshwell text-center"> + <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{current_unit.id}}" class="btn btn-info" >Next + <i class="fa fa-step-forward"> + </i> + </a> + </div> {% endif %} + </div> </div> + </main> </div> -<div style="text-align: center;"> - {% if first_unit %} - <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{first_unit.id}}/1" class="btn btn-info">Start - <span class="glyphicon glyphicon-chevron-right"> - </span> - </a> - {% else %} - <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}" class="btn btn-info">Next - <span class="glyphicon glyphicon-chevron-right"> - </span> - </a> - {% endif %} -</div> -{% else %} -<div class="panel panel-default" style="border: none; box-shadow: none;"> - <div class="panel-body"> - {{lesson.html_data|safe}} +{% endblock %} + + +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshsidebarfooter text-center"> + <div class="row justify-content-center"> + <div class="col-sm-5 "> + {% if user %} + {% block info %} + <b>{{user.get_full_name|title}}</b> with Roll no. <b>{{user.profile.roll_number}}</b> is logged in as <b>{{user.username}}</b> + {% endblock %} + {% endif %} </div> -</div> -{% if lesson.get_files %} - <div class="panel-body" style="border-width: 10px;"> - <h4><strong>Lesson Files (Click on file to download) - </strong></h4> - <ul class="list-group"> - {% for f in lesson.get_files %} - <a class="list-group-item" href="{{f.file.url}}"> - {{ f.file.name|file_title }} - </a> - {% endfor %} - </ul> + <div class="col-sm-2"> + | </div> -{% endif %} -<div style="text-align: center;"> - <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{current_unit.id}}" class="btn btn-info" style="display: inline-block;">Next - <span class="glyphicon glyphicon-chevron-right"> - </span> - </a> -</div> -{% endif %} -</div> -{% endblock %}
\ No newline at end of file + <div class="col-sm-4 text-left"> + <b>Any Queries?</b> Email : info@fossee.in + </div> + </div> + </footer> + <!--footer end--> +{% endblock %} + diff --git a/yaksh/templates/yaksh/showquestionpapers.html b/yaksh/templates/yaksh/showquestionpapers.html index e705ce7..6a64262 100644 --- a/yaksh/templates/yaksh/showquestionpapers.html +++ b/yaksh/templates/yaksh/showquestionpapers.html @@ -8,6 +8,7 @@ {% endblock %} {% block manage %} +<div class="yakshwell container"> {% if papers %} <form name=frm action="" method="post"> {% csrf_token %} @@ -15,9 +16,10 @@ <input type="checkbox" name="papers" value="{{ i.id }}"> <a href="{{URL_ROOT}}/exam/manage/showquestionpapers/{{ i.id }}">{{ i.quiz.description }}</a><br> {% endfor %} <br> -<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button> +<button class="btn btn-success" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button> </form> {% else %} <center><h3>No Question Papers available</h3></center> {% endif %} +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html index ff7a627..0c403b4 100644 --- a/yaksh/templates/yaksh/showquestions.html +++ b/yaksh/templates/yaksh/showquestions.html @@ -12,171 +12,212 @@ {% block content %} <div class="row"> - <div class="col-sm-3 col-md-2 sidebar"> - <ul class="nav nav-sidebar nav-stacked"> - <li class="active"><a href="#show" data-toggle="pill" > Show all Questions</a></li> - <li><a href="#updown" data-toggle="pill" > Upload Questions</a></li> - </ul> + <!-- Side bar --> + <div class="col-md-3 yakshlabel collapse nav flex-column nav-pills" id="sidebar" role="tablist" aria-orientation="vertical"> + <a href="#show" id="showbar" class="nav-link active" data-toggle="pill" role="tab" aria-controls="show" aria-selected="true"> Show all Questions</a> + <a href="#updown" id="updownbar" class="nav-link" data-toggle="pill" role="tab" aria-controls="updown" aria-selected="false" > Upload and Download Questions</a> </div> -<div class="tab-content col-md-9 col-md-offset-2 main"> -<!-- Upload Questions --> - -<div id="updown" class="tab-pane fade"> -<div class="alert alert-info" role="alert"> - <p>You can upload question files the following ways - - <li><b><u>Yaml File</u></b> - <p>One can upload Yaml file with extensions .yaml or .yml. Please note - that you cannot upload files associated to a question. Yaml file can - have any name. + <a href="#sidebar" data-toggle="collapse" id="sidebaricon"><i class="fa fa-navicon fa-lg"></i></a> + <!-- End of side bar --> + <main class="col main" id="sidebarbody"> + + <div class="yakshwell tab-content"> + <!-- Upload Questions --> + <div id="updown" class="card col-md-5 tab-pane fade" role="tabpanel" aria-labelledby="updownbar"> + <div class="alert alert-info" role="alert"> + <p>You can upload question files the following ways - + <li><b><u>Yaml File</u></b> + <p>One can upload Yaml file with extensions .yaml or .yml. Please note + that you cannot upload files associated to a question. Yaml file can + have any name. + </p> + </li> + <li><b><u>Zip File</u></b> + <p> One can also upload zip with the following zip structure - + <pre> + .zip + |-- .yaml or .yml + |-- .yaml or .yml + |-- folder1 + | |-- Files required by questions + |-- folder2 + | |-- Files required by questions + </pre> + </li> </p> - </li> - <li><b><u>Zip File</u></b> - <p> One can also upload zip with the following zip structure - - <pre> - .zip - |-- .yaml or .yml - |-- .yaml or .yml - |-- folder1 - | |-- Files required by questions - |-- folder2 - | |-- Files required by questions - </pre> - </li> - </p> + </div> + <div class="card-body"> + <div><a class="btn btn-primary" href="{{URL_ROOT}}/exam/manage/courses/download_yaml_template/"> Download Template</a> </div> + <br/> + <h4> Or </h4> + <form action="" method="post" enctype="multipart/form-data"> + {% csrf_token %} + {{ upload_form.as_p }} + <br/> + <h4> And </h4> + <button class="btn btn-success" type="submit" name="upload" value="upload"> + Upload File <span class="glyphicon glyphicon-open"/></button> + </form> + </div> + </div> + <!-- End of upload questions --> + + <!-- Show questions --> + <div id="show" class="yakshwell tab-pane fade show active" role="tabpanel" aria-labelledby="showbar"> + <form name=frm action="" method="post"> + {% csrf_token %} + {% if message %} + {%if message == "Questions Uploaded Successfully"%} + <div class="alert alert-success alert-dismissable"> + <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> + {{ message }} + </div> + {%else %} + <div class="alert alert-danger alert-dismissable"> + <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> + {{ message }} + </div> + {% endif %} + {% endif %} + {% if msg %} + <div class="alert alert-danger alert-dismissable animated flash"> + <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> + {{ msg }} + </div> + {% endif %} + <br><br> + <form name=frm action="" method="post"> + <div class="card"> + <div class="card-body"> + <!-- Filtering Questions --> + <div class="row" id="selectors"> + <h4 style="padding-left: 20px;">Filters Questions: </h4> + <div class="col-md-3"> + {{ form.question_type }} + </div> + <div class="col-md-3"> + {{ form.language }} + </div> + <div class="col-md-3"> + {{ form.marks }} + </div> + <br><br> + + </div> + <hr> + <h4 >Or Search using Tags: </h4> + <!-- Searching Tags --> + {% csrf_token %} + <div class="col-md-14"> + <div class="input-group"> + <div class="col-md-6"> + <div class="input-group"> + <div class="input-group-prepend"> + <span class="input-group-text" id="basic-addon1">Search Questions</span> + </div> + <input type="text" name="question_tags" id="question_tags" class="form-control" type="search" placeholder="Search using comma separated Tags"> + <span class="input-group-append"> + <button class="btn btn-outline-secondary" type="submit"><i class="fa fa-search yakshred"></i></button> + </span> + </div> + </div> + + <!--<span class="input-group-addon" id="basic-addon1">Search Questions </span> + <input type="text" id="question_tags" name="question_tags" class="form-control" + placeholder="Search using comma separated Tags"> + <span class="input-group-btn"> + <button class="btn btn-default" type="submit">Search</button> + </span>--> + <div class="col-md-6"> + <select class="form-control" id="sel1" onchange="append_tag(this);"> + {% if all_tags %} + <option value="" disabled selected>Available Tags</option> + {% for tag in all_tags %} + <option> + {{tag}} + </option> + {% endfor %} + {% else %} + <option value="" disabled selected>No Available Tags</option> + {% endif %} + </select> + </div> + </div> + </div> + <br><br> + <button class="btn btn-primary" type="button" onClick='location.replace("{{URL_ROOT}}");'> + Clear Filters</button> + </div> + </div> - <p> - <b> Click <a class="btn btn-success" href="{{URL_ROOT}}/exam/manage/courses/download_yaml_template/" ->here</a> to download a sample YAML, edit and upload it</b> - </p> + <div id="filtered-questions"> + {% if questions %} + <div class="yakshwell"> + <h5><input id="checkall" type="checkbox"> Select All </h5> + <div class="table-wrapper-2"> + <table id="questions-table" class="tablesorter table table-striped table-responsive-sm"> + <thead> + <tr class="yakshred"> + <th> Select </th> + <th> Summary </th> + <th> Language </th> + <th> Type </th> + <th> Marks </th> + </tr> + </thead> + <tbody> + {% for question in questions %} + <tr> + <td> + <input type="checkbox" name="question" value="{{ question.id }}"> + </td> + <td><a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{question.summary|capfirst}}</a></td> + <td>{{question.language|capfirst}}</td> + <td>{{question.type|capfirst}}</td> + <td>{{question.points}}</td> + </tr> + {% endfor %} + </tbody> + </table> + </div> + </div> + {% endif %} + </div> + <br> + <center> + <button class="btn btn-primary" type="button" onclick='location.replace("{{URL_ROOT}}/exam/manage/addquestion/");'>Add Question <span class="glyphicon glyphicon-plus"></span></button> + {% if questions %} + <button class="btn btn-primary" type="submit" name='download' value='download'>Download Selected <span class="glyphicon glyphicon-save"></span></button> + <button class="btn btn-primary" type="submit" name="test" value="test">Test Selected</button> + {% endif %} + <button class="btn btn-danger" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected <span class="glyphicon glyphicon-minus"></span></button> + </center> + </form> + </div> + <!-- End of Show questions --> </div> -<br/> -<h4> Or </h4> -<form action="" method="post" enctype="multipart/form-data"> -{% csrf_token %} - {{ upload_form.as_p }} -<br/> -<h4> And </h4> -<button class="btn btn-success" type="submit" name="upload" value="upload"> -Upload File <span class="glyphicon glyphicon-open"/></button> -</form> + </main> </div> -<!-- End of upload questions --> +{% endblock %} -<!-- Show questions --> -<div id="show" class= "tab-pane fade in active"> -<form name=frm action="" method="post"> -{% csrf_token %} -{% if message %} -{%if message == "Questions Uploaded Successfully"%} -<div class="alert alert-success alert-dismissable"> -<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> - {{ message }} -</div> -{%else %} -<div class="alert alert-danger alert-dismissable"> - <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> - {{ message }} -</div> -{% endif %} -{% endif %} -{% if msg %} -<div class="alert alert-danger alert-dismissable"> - <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> - {{ msg }} -</div> -{% endif %} -<br><br> -<form name=frm action="" method="post"> -<!-- Filtering Questions --> -<div class="row" id="selectors"> - <h4 style="padding-left: 20px;">Filters Questions: </h4> - <div class="col-md-3"> - {{ form.question_type }} +{% block footer %} + <!--footer--> + <footer class="container-fluid yakshsidebarfooter text-center"> + <div class="row justify-content-center"> + <div class="col-sm-5 "> + {% if user %} + {% block info %} + <b>{{user.get_full_name|title}}</b> with Roll no. <b>{{user.profile.roll_number}}</b> is logged in as <b>{{user.username}}</b> + {% endblock %} + {% endif %} </div> - <div class="col-md-3"> - {{ form.language }} + <div class="col-sm-2"> + | </div> - <div class="col-md-3"> - {{ form.marks }} + <div class="col-sm-4 text-left"> + <b>Any Queries?</b> Email : info@fossee.in </div> -<br> -<h4 style="padding-left: 20px;">Or</h4> - -<h4 style="padding-left: 20px;">Search using Tags: </h4> -</div> -<!-- Searching Tags --> -{% csrf_token %} - <div class="col-md-14"> - <div class="input-group"> - <span class="input-group-addon" id="basic-addon1">Search Questions </span> - <input type="text" id="question_tags" name="question_tags" class="form-control" - placeholder="Search using comma separated Tags"> - <span class="input-group-btn"> - <button class="btn btn-default" type="submit">Search</button> - </span> - <div class="col-md-6"> - <select class="form-control" id="sel1" onchange="append_tag(this);"> - {% if all_tags %} - <option value="" disabled selected>Available Tags</option> - {% for tag in all_tags %} - <option> - {{tag}} - </option> - {% endfor %} - {% else %} - <option value="" disabled selected>No Available Tags</option> - {% endif %} - </select> - </div> - </div> - </div> -<br><br> -<button class="btn btn-primary" type="button" onClick='location.replace("{{URL_ROOT}}");'> - Clear Filters</button> - -<div id="filtered-questions"> -{% if questions %} -<h5><input id="checkall" type="checkbox"> Select All </h5> - -<table id="questions-table" class="tablesorter table table table-striped"> - <thead> - <tr> - <th> Select </th> - <th> Summary </th> - <th> Language </th> - <th> Type </th> - <th> Marks </th> - </tr> - </thead> - <tbody> - -{% for question in questions %} -<tr> -<td> -<input type="checkbox" name="question" value="{{ question.id }}"> -</td> -<td><a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{question.summary|capfirst}}</a></td> -<td>{{question.language|capfirst}}</td> -<td>{{question.type|capfirst}}</td> -<td>{{question.points}}</td> -</tr> -{% endfor %} -</tbody> -</table> -{% endif %} -</div> -<br> -<center> -<button class="btn btn-primary" type="button" onclick='location.replace("{{URL_ROOT}}/exam/manage/addquestion/");'>Add Question <span class="glyphicon glyphicon-plus"></span></button> -{% if questions %} -<button class="btn btn-primary" type="submit" name='download' value='download'>Download Selected <span class="glyphicon glyphicon-save"></span></button> -<button class="btn btn-primary" type="submit" name="test" value="test">Test Selected</button> -{% endif %} -<button class="btn btn-danger" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected <span class="glyphicon glyphicon-minus"></span></button> -</center> -</form> -</div> -</div> -</div> -<!-- End of Show questions --> + </div> + </footer> + <!--footer end--> {% endblock %}
\ No newline at end of file diff --git a/yaksh/templates/yaksh/statistics_question.html b/yaksh/templates/yaksh/statistics_question.html index c6f4e57..4d737eb 100644 --- a/yaksh/templates/yaksh/statistics_question.html +++ b/yaksh/templates/yaksh/statistics_question.html @@ -3,6 +3,7 @@ {% block pagetitle %} Statistics for {{ quiz.description }}{% endblock pagetitle %} {% block content %} +<div class="yakshwell container"> <div class="row"> <div class="col-md-2"> {% for attempt in attempts %} @@ -12,8 +13,8 @@ <div class="col-md-9"> {% if question_stats %} <p><b>Total number of participants: {{ total }}</b></p> - <table class="table table-bordered"> - <tr><th>Question</th><th>Type</th><th>Total</th><th>Answered</th></tr> + <table class="table table-bordered table-responsive-sm"> + <tr class="bg-light yakshred"><th>Question</th><th>Type</th><th>Total</th><th>Answered</th></tr> {% for question, value in question_stats.items %} <tr><td>{{ question.summary }}</td><td>{{ question.type }}</td><td>{{value.1}}</td><td>{{ value.0 }} ({% widthratio value.0 value.1 100 %}%)</td></tr> {% endfor %} @@ -21,4 +22,5 @@ {% endif %} </div> </div> +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 9449fcc..d424e54 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -10,9 +10,10 @@ <script src="{{ URL_ROOT }}/static/yaksh/js/mathjax/MathJax.js?config=TeX-MML-AM_CHTML"></script> {% endblock %} - +<div class="yakshwell container"> <form action="" method="post"> -<p> + <div class="card col-md-4"> +<p class="card-body"> Name: {{ data.user.get_full_name.title }} <br/> Username: {{ data.user.username }} <br/> {% if data.profile %} @@ -25,9 +26,9 @@ Email: {{ data.user.email }} <br/> Date joined: {{ data.user.date_joined }} <br/> Last login: {{ data.user.last_login }} </p> - +</div> {% if data.papers %} -<p><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{data.papers.0.question_paper.quiz.id}}/{{ data.user.id }}/{{course_id}}/"> +<p class="text-center"><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{data.papers.0.question_paper.quiz.id}}/{{ data.user.id }}/{{course_id}}/" class="btn btn-info "> Grade/correct paper</a> </p> @@ -155,7 +156,7 @@ User IP address: {{ paper.user_ip }} {% if error.type == 'stdio' %} <div class = "well well-sm"> {% if error.given_input %} - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> <col width="30%"> <tr class = "active"> <td> For given Input value(s):</td> @@ -163,7 +164,7 @@ User IP address: {{ paper.user_ip }} </tr> </table> {% endif %} - <table class="table table-bordered" width="100%" id="output" style="table-layout: fixed"> + <table class="table table-bordered table-responsive-sm" width="100%" id="output" style="table-layout: fixed"> <col width="10%"> <col width="40%"> <col width="40%"> @@ -186,7 +187,7 @@ User IP address: {{ paper.user_ip }} </tr> {% endfor %} </table> - <table width="100%" class='table table-bordered'> + <table width="100%" class="table table-bordered table-responsive-sm"> <col width="10"> <tr class = "danger"> <td><b>Error:</b></td> @@ -201,7 +202,7 @@ User IP address: {{ paper.user_ip }} {% endif %} <p> <b>The following error took place: </b></p> <div class="well well-sm"> - <table class="table table-bordered" width="100%" style="table-layout: fixed"> + <table class="table table-bordered table-responsive-sm" width="100%" style="table-layout: fixed"> <col width="30%"> <tr class = "active"> <td><b>Exception Name: </b></td> @@ -265,5 +266,6 @@ User IP address: {{ paper.user_ip }} <a href="{{URL_ROOT}}/exam/manage/monitor/{{paper.question_paper.id}}/">Monitor quiz</a> {% endwith %} {% endif %} +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index 8f3fad7..2246db1 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -9,7 +9,7 @@ {% endblock script %} {% block main %} - +<div class="yakshwell container"> {% if not data.papers %} {% if quiz.is_exercise %} <p><b> You have not attempted the Exercise {{ quiz.description }} </b></p> @@ -27,7 +27,8 @@ <h2> Quiz: {{ paper.question_paper.quiz.description }} </h2> {% endif %} - <p> + <div class="card"> + <div class="card-body"> Attempt Number: {{ paper.attempt_number }}<br/> Questions correctly answered: {{ paper.get_answered_str }} <br/> Marks obtained: {{ paper.marks_obtained }} <br/> @@ -39,19 +40,20 @@ {% else %} Status : <b style="color: red;"> Failed </b><br/> {% endif %} - </p> + </div> + </div> {% if paper.answers.count %} <h3> Answerpaper: </h3> {% for question, answers in paper.get_question_answers.items %} - <div class="panel panel-info"> - <div class="panel-heading"> + <div class="card"> + <div class="card-heading yakshlabel"> <strong> Details: {{forloop.counter}}. {{ question.summary }} <span class="marks pull-right"> Mark(s): {{ question.points }} </span> </strong> </div> - <div class="panel-body"> + <div class="card-body"> <h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong> {% if question.type == "mcq" or question.type == "mcc" %} <h5> <u>Choices:</u></h5> @@ -60,7 +62,7 @@ {% if testcase.correct %} <br/> <strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong> - <span class="label label-success"> Correct</span> + <span class="alert alert-success"> Correct</span> {% else %} <br/><strong> {{ forloop.counter }}. {{ testcase.options|safe }}</strong> @@ -92,49 +94,57 @@ </div> {% if question.type != "code" %} {% if "Correct answer" in answers.0.error_list %} - <div class="panel panel-success"> + <div class="card alert-success"> {% else %} - <div class="panel panel-danger"> + <div class="card card-danger"> {% endif %} - <div class="panel-heading"> + <div class="card-heading"> <strong>{{ answers.0.error_list.0 }}</strong> </div> - <div class="panel-body"> + <div class="card-body"> {% if question.type == "mcc"%} - <div class="well well-sm"> + <div class="card"> + <div class="card-body"> {% for testcases in question.get_test_cases %} {%if testcases.id|stringformat:"i" in answers.0.answer|safe %} <li>{{ testcases.options.strip|safe }}</li> {% endif %} {% endfor %} </div> + </div> {% elif question.type == "mcq"%} - <div class="well well-sm"> + <div class="card"> + <div class="card-body"> {% for testcases in question.get_test_cases %} {%if testcases.id|stringformat:"i" == answers.0.answer|safe %} <li>{{ testcases.options.strip|safe }}</li> {% endif %} {% endfor %} </div> + </div> {% elif question.type == "arrange"%} - <div class="well well-sm"> + <div class="card"> + <div class="card-body"> {% get_answer_for_arrange_options answers.0.answer question as tc_list %} {% for testcases in tc_list %} <li>{{ testcases.options.strip|safe }}</li> {% endfor %} </div> + </div> {% elif question.type == "upload" and has_user_assignment %} - <a href="{{URL_ROOT}}/exam/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}/{{course_id}}"> - <div class="well well-sm"> - <div class="panel"> + <a href="{{URL_ROOT}}/exam/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}"> + <div class="card"> + <div class="card-body"> Assignment File for {{ data.user.get_full_name.title }} </div></a> </div> {% else %} <h5><u>Student answer:</u></h5> - <div class="well well-sm"> + <div class="card"> + <div class="card-body"> {{ answers.0.answer|safe }} </div> + </div> {% endif %} </div> </div> @@ -143,13 +153,13 @@ {% for answer in answers %} {% if not answer.skipped %} {% if answer.answer.correct %} - <div class="panel panel-success"> - <div class="panel-heading"> + <div class="card"> + <div class="card-heading alert-success"> <strong>Correct Answer</strong> </div> {% else %} - <div class="panel panel-danger"> - <div class="panel-heading"> + <div class="card "> + <div class="card-heading alert-danger"> <strong>Incorrect Answer</strong> </div> {% endif %} @@ -158,17 +168,18 @@ {% for error in err %} {% if error.type == 'stdio' %} - <div class = "well well-sm"> + <div class = "card"> + <div class="card-body"> {% if error.given_input %} - <table class="table table-bordered"> + <table class="table table-bordered table-responsive-sm"> <col width="30%"> - <tr class = "active"> + <tr class = "table-active"> <td> For given Input value(s):</td> <td>{{error.given_input}}</td> </tr> </table> {% endif %} - <table class="table table-bordered" width="100%" id="output" style="table-layout: fixed"> + <table class="table table-bordered table-responsive-sm" width="100%" id="output" style="table-layout: fixed"> <col width="10%"> <col width="40%"> <col width="40%"> @@ -184,21 +195,22 @@ <td>{{expected|default:""}} </td> <td>{{user|default:""}}</td> {% if forloop.counter0 in error.error_line_numbers or not expected or not user %} - <td><span class ="glyphicon glyphicon-remove text-warning"/></td> + <td><span class ="fa fa-times text-warning"/></td> {% else %} - <td><span class ="glyphicon glyphicon-ok text-success"/></td> + <td><span class ="fa fa-check text-success"/></td> {% endif %} </tr> {% endfor %} </table> - <table width="100%" class='table table-bordered'> + <table width="100%" class="table table-bordered table-responsive-sm"> <col width="10"> - <tr class = "danger"> + <tr class = "table-danger"> <td><b>Error:</b></td> <td>{{error.error_msg}}</td> </tr> </table> </div> + </div> {% elif error.type == 'assertion' %} {% if error.test_case %} <strong> We tried you code with the following test case:</strong><br/></br> @@ -206,7 +218,7 @@ {% endif %} <p> <b>The following error took place: </b></p> <div class="well well-sm"> - <table class="table table-bordered" width="100%" style="table-layout: fixed"> + <table class="table table-bordered table-responsive-sm" width="100%" style="table-layout: fixed"> <col width="30%"> <tr class = "active"> <td><b>Exception Name: </b></td> @@ -248,4 +260,5 @@ {% endfor %} {# for paper in data.papers #} {% endif %} {# if not data.papers #} +</div> {% endblock %} diff --git a/yaksh/templates/yaksh/view_profile.html b/yaksh/templates/yaksh/view_profile.html index ce95226..d04c972 100644 --- a/yaksh/templates/yaksh/view_profile.html +++ b/yaksh/templates/yaksh/view_profile.html @@ -2,7 +2,9 @@ {% block pagetitle %} Profile {% endblock %} {% block main %} - <table class="table table-bordered"> +<div class=" row justify-content-center"> +<div class="yakshwell col-md-8 "> + <table class="table table-bordered table-responsive-sm"> <tr> <th><label for="id_first_name"><h5>First name:</h5></label></th> <th><label for="id_first_name"><h5>{{ user.first_name }}</h5></label></th> @@ -37,4 +39,6 @@ </tr> </table> <a class="btn btn-primary pull-right" href="{{ URL_ROOT }}/exam/editprofile/">Edit Profile</a> +</div> +</div> {% endblock %} |