diff options
author | adityacp | 2018-01-02 15:51:36 +0530 |
---|---|---|
committer | adityacp | 2018-01-02 15:51:36 +0530 |
commit | de0f0be2f5963da2f03616c192dfe339c021eff6 (patch) | |
tree | fafaac934e42e5f877257c6a9700074f7bff8822 /yaksh/templates | |
parent | 8a062d48a0347ae43b1b9d5b1ca532387d8ad3d9 (diff) | |
download | online_test-de0f0be2f5963da2f03616c192dfe339c021eff6.tar.gz online_test-de0f0be2f5963da2f03616c192dfe339c021eff6.tar.bz2 online_test-de0f0be2f5963da2f03616c192dfe339c021eff6.zip |
Changes in views, models, templates and js
- Rename learning_type to type in Lesson model
- Change error message in views and change redirection
- Change templates to rename learning_type to type for unit
- Add new dialog for embedding Video URL
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/manage.html | 2 | ||||
-rw-r--r-- | yaksh/templates/user.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_lesson.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_module.html | 37 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 56 | ||||
-rw-r--r-- | yaksh/templates/yaksh/design_course_session.html | 33 |
6 files changed, 97 insertions, 39 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 9aa0a54..17ce23e 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -39,7 +39,7 @@ <!-- end iframe div --> <!-- Dialog to video embed --> - <div id="dialog" title="Embed Video URL" style="display: none;"> + <div id="dialog_iframe" title="Embed Video URL" style="display: none;"> <label>Enter Url:</label> <input id="url" name="url" type="text" required="true"> <input type="button" id="submit_info" name="submit_info" class="btn" value="Submit" /> diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html index 987593f..090e93d 100644 --- a/yaksh/templates/user.html +++ b/yaksh/templates/user.html @@ -11,9 +11,9 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a class="navbar-brand navbar-left" href="{{ URL_ROOT }}/exam/manage/"> + <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> + </img> </a> </div> <div class= "collapse navbar-collapse" id="navbar"> diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html index 01233fa..d9bc1e7 100644 --- a/yaksh/templates/yaksh/add_lesson.html +++ b/yaksh/templates/yaksh/add_lesson.html @@ -48,7 +48,11 @@ <button class="btn" 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> + {% else %} + <button class="btn" 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> diff --git a/yaksh/templates/yaksh/add_module.html b/yaksh/templates/yaksh/add_module.html index 9ce854e..4efccf7 100644 --- a/yaksh/templates/yaksh/add_module.html +++ b/yaksh/templates/yaksh/add_module.html @@ -7,12 +7,12 @@ <script src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.9.1.min.js"></script> <script src="{{ URL_ROOT }}/static/yaksh/js/design_course.js"></script> <script src="{{ URL_ROOT }}/static/yaksh/js/lesson.js"></script> -<script src="https://code.jquery.com/ui/1.9.1/jquery-ui.js"></script> +<script src="{{ URL_ROOT }}/static/yaksh/js/jquery-ui.js"></script> {% endblock %} {% block css %} <link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/design_course.css" /> -<link rel="stylesheet" href="https://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css"> +<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/jquery-ui/jquery-ui.css"> {% endblock %} {% block content %} @@ -86,7 +86,7 @@ </div> <br> <center> - <button class="btn" type="submit" id="submit" name="Add"> + <button class="btn btn-success" type="submit" id="submit" name="Add"> Add to Module </button> </center> @@ -99,16 +99,25 @@ <div id="fixed-added"> <table id="course-details" class="table table-bordered"> <tr> - <th>Select</th> + <th width="5%">Select</th> <th>Quiz/Lesson</th> - <th>Order</th> - <th width="20%">Check Prerequisite + <th width="20%">Order</th> + <th width="25%" colspan="2">Check Prerequisite + <br> <a href="#" data-toggle="tooltip" id="prereq_msg"> <span class="glyphicon glyphicon-question-sign"> </span> What's This </a> </th> </tr> + <tr> + <th scope="row"> </th> + <td> </td> + <td> </td> + <th>Currently</th> + <th>Change</th> + </tr> + </tr> {% for unit in learning_units %} <tr> <ul class="inputs-list"> @@ -125,8 +134,14 @@ <td><input type="number" name="order" data-item-id="{{unit.id}}" value="{{unit.order}}" step="1"></td> {% endif %} <td> - <input type="checkbox" name="check_prereq" value="{{unit.id}}"> - {{unit.check_prerequisite}} + {% if unit.check_prerequisite %} + Yes + {% else %} + No + {% endif %} + </td> + <td> + <input type="checkbox" name="check_prereq" value="{{unit.id}}"> </td> </ul> </tr> @@ -136,9 +151,9 @@ </div> <br> <center> - <button id="Remove" name="Remove" class="btn small primary" type="submit">Remove from Module</button> - <button id="Change" name="Change" class="btn small primary" type="submit"> Change Order</button> - <button id="Change" name="Change_prerequisite" class="btn small primary" type="submit"> Change Prerequisite</button> + <button id="Remove" name="Remove" class="btn btn-danger" type="submit">Remove from Module</button> + <button id="Change" name="Change" class="btn btn-info" type="submit"> Change Order</button> + <button id="Change" name="Change_prerequisite" class="btn btn-primary" type="submit"> Change Prerequisite</button> </center> </div> </div> <!-- /.row --> diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 3d26d14..0efa72a 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -29,7 +29,7 @@ <div class="col-sm-3 col-md-2 sidebar"> <ul class="nav nav-sidebar"> {% if type == "courses" %} - <li><a href="#" id="link_created_courses">Created Courses</a></li> + <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> @@ -45,12 +45,13 @@ </li> <li> <a href="{{URL_ROOT}}/exam/manage/courses/all_learning_module"> - Add/View Learning Modules</a> + Add/View Modules</a> </li> </ul> </div> </div> -<!-- {% if type == "courses" %} --> + +{% if type == "courses" %} <div id="created_courses" style="display: none;"> {% if not courses %} <center><h4> No new Courses created </h4></center> @@ -60,7 +61,7 @@ <table id="course-details" class="table table-bordered"> <tr> <th>Courses</th> - <th>Lessons/Quizzes</th> + <th>Modules</th> </tr> {% for course in courses %} @@ -98,6 +99,11 @@ <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> @@ -111,11 +117,6 @@ </li> <br> <li> - <a href="{{URL_ROOT}}/exam/manage/courses/designcourse/{{course.id}}/">Design Course Session - </a> - </li> - <br> - <li> <a href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/"> {% if course.active %}Deactivate Course {% else %} Activate Course {% endif %} </a> @@ -131,8 +132,8 @@ <table id="course-details" class="table table-bordered"> {% if course.get_learning_modules %} <tr> - <th>Learning Modules</th> - <th>Design Learning module</th> + <th>Module</th> + <th>Module Design</th> <th>Lessons/Quizzes</th> </tr> {% for module in course.get_learning_modules %} @@ -186,7 +187,7 @@ <table id="course-details" class="table table-bordered"> <tr> <th>Courses</th> - <th>Lessons/Quizzes</th> + <th>Modules</th> </tr> {% for course in allotted_courses %} @@ -228,6 +229,11 @@ <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> @@ -257,8 +263,9 @@ <table id="course-details" class="table table-bordered"> {% if course.get_learning_modules %} <tr> - <th>Learning Modules</th> - <th>Design Learning module</th> + <th>Module</th> + <th>Module Design</th> + <th>Lessons/Quizzes</th> </tr> {% for module in course.get_learning_modules %} <tr> @@ -271,6 +278,21 @@ 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" %} + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{unit.quiz.id}}/{{course.id}}"> + {{unit.quiz.description}}</a> + {% 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 %} @@ -284,7 +306,8 @@ </div> {% endif %} </div> -<!-- {% endif %} --> +{% endif %} +<!-- End if all Courses --> <!-- Show all Quizzes --> <div id="all_quizzes" > @@ -308,7 +331,8 @@ <td>{{forloop.counter}}</td> <td width="30%"> <ul class="list-group"> - <a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }}</a> + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }} + </a> {% if quiz.active %} <span class="label label-success">Active</span> {% else %} diff --git a/yaksh/templates/yaksh/design_course_session.html b/yaksh/templates/yaksh/design_course_session.html index 41c235c..1aabd6c 100644 --- a/yaksh/templates/yaksh/design_course_session.html +++ b/yaksh/templates/yaksh/design_course_session.html @@ -58,26 +58,34 @@ </div> <br> <center> - <button id="Add" name="Add" class="btn small primary" type="submit">Add to course</button> + <button id="Add" name="Add" class="btn btn-success" type="submit">Add to course</button> </center> <br><br> </div> <div class="col-md-8 col-md-offset-2"> <div id="fixed-added-wrapper"> - <p><u><b>Choosen Lessons and quizzes: (Change Order)</b></u></p> + <p><u><b>Choosen Lessons and quizzes:</b></u></p> <div id="fixed-added"> <table id="course-details" class="table table-bordered"> <tr> - <th>Select</th> + <th width="5%">Select</th> <th>Learning Module</th> - <th>Order</th> - <th width="20%">Check Prerequisite + <th width="20%">Order</th> + <th width="25%" colspan="2">Check Prerequisite + <br> <a href="#" data-toggle="tooltip" id="prereq_msg"> <span class="glyphicon glyphicon-question-sign"> </span> What's This </a> </th> </tr> + <tr> + <th scope="row"> </th> + <td> </td> + <td> </td> + <th>Currently</th> + <th>Change</th> + </tr> {% for module in added_learning_modules %} <tr> <ul class="inputs-list"> @@ -89,7 +97,14 @@ <input type="number" name="order" data-item-id="{{module.id}}" value="{{module.order}}" step="1"> </td> <td> - <input type="checkbox" name="check_prereq" value="{{module.id}}"> {{module.check_prerequisite}} + {% if module.check_prerequisite %} + Yes + {% else %} + No + {% endif %} + </td> + <td> + <input type="checkbox" name="check_prereq" value="{{module.id}}"> </td> </ul> </tr> @@ -99,9 +114,9 @@ </div> <br> <center> - <button id="Remove" name="Remove" class="btn small primary" type="submit">Remove from course</button> - <button id="Change" name="Change" class="btn small primary" type="submit"> Change Order</button> - <button id="Change" name="Change_prerequisite" class="btn small primary" type="submit"> Change Prerequisite</button> + <button id="Remove" name="Remove" class="btn btn-danger" type="submit">Remove from course</button> + <button id="Change" name="Change" class="btn btn-info" type="submit"> Change Order</button> + <button id="Change" name="Change_prerequisite" class="btn btn-primary" type="submit"> Change Prerequisite</button> </center> </div> </div> <!-- /.row --> |