From d4a2b0af95ee4347a71346fa3f20409d938d5a46 Mon Sep 17 00:00:00 2001 From: adityacp Date: Fri, 17 Nov 2017 19:42:43 +0530 Subject: Change in templates - Add new templates for creating lessons, modules, design course - Change existing templates for student and moderator interface --- yaksh/templates/base.html | 2 +- yaksh/templates/exam.html | 8 +- yaksh/templates/user.html | 4 +- yaksh/templates/yaksh/add_course.html | 4 +- yaksh/templates/yaksh/add_lesson.html | 61 +++ yaksh/templates/yaksh/add_module.html | 140 ++++++ yaksh/templates/yaksh/add_quiz.html | 13 +- yaksh/templates/yaksh/complete.html | 9 +- yaksh/templates/yaksh/course_detail.html | 10 +- yaksh/templates/yaksh/courses.html | 554 +++++++++++++++++------ yaksh/templates/yaksh/design_course_session.html | 107 +++++ yaksh/templates/yaksh/grade_user.html | 12 +- yaksh/templates/yaksh/intro.html | 13 +- yaksh/templates/yaksh/moderator_dashboard.html | 11 +- yaksh/templates/yaksh/monitor.html | 10 +- yaksh/templates/yaksh/question.html | 6 +- yaksh/templates/yaksh/quit.html | 7 +- yaksh/templates/yaksh/quizzes_user.html | 74 ++- yaksh/templates/yaksh/regrade.html | 4 +- yaksh/templates/yaksh/show_video.html | 63 +++ yaksh/templates/yaksh/statistics_question.html | 2 +- yaksh/templates/yaksh/user_data.html | 13 +- 22 files changed, 886 insertions(+), 241 deletions(-) create mode 100644 yaksh/templates/yaksh/add_lesson.html create mode 100644 yaksh/templates/yaksh/add_module.html create mode 100644 yaksh/templates/yaksh/design_course_session.html create mode 100644 yaksh/templates/yaksh/show_video.html (limited to 'yaksh') diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html index e7cc15c..007d9b8 100644 --- a/yaksh/templates/base.html +++ b/yaksh/templates/base.html @@ -56,7 +56,7 @@
{% block info %} {% endblock %} -
+

Developed by FOSSEE group, IIT Bombay

diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index a1f0df4..9b565eb 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -15,7 +15,7 @@ Yaksh
diff --git a/yaksh/templates/yaksh/add_course.html b/yaksh/templates/yaksh/add_course.html index b8fc11c..904cf5f 100644 --- a/yaksh/templates/yaksh/add_course.html +++ b/yaksh/templates/yaksh/add_course.html @@ -25,7 +25,7 @@ -
-
+
+
{% endblock %} diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html new file mode 100644 index 0000000..9e1ee1d --- /dev/null +++ b/yaksh/templates/yaksh/add_lesson.html @@ -0,0 +1,61 @@ +{% extends "manage.html" %} +{% load custom_filters %} + +{% block title %}Create/Edit Lesson{% endblock %} + +{% block script %} + +{% endblock %} + +{% block content %} +
+ {% csrf_token %} +
+ + {{ lesson_form.as_table }} + {{ lesson_file_form.as_table }} +
+
+

+
+ {% if lesson_files %} +
+

Files added to this lesson

+
+ {% for f in lesson_files %} +

 Delete  + {{ f.file.name|file_title }} + ({{f.file.url}}) +


+ {% endfor %} + {% else %} +
+

No Files added to this lesson

+
+ {% endif %} + +
+

+
+ + {% if lesson_files %} + + {% endif %} + + +
+
+ +
+{% endblock %} \ No newline at end of file diff --git a/yaksh/templates/yaksh/add_module.html b/yaksh/templates/yaksh/add_module.html new file mode 100644 index 0000000..f9676e6 --- /dev/null +++ b/yaksh/templates/yaksh/add_module.html @@ -0,0 +1,140 @@ +{% extends "manage.html" %} +{% load custom_filters %} +{% block title %}Create/Edit Learning Module{% endblock %} + +{% block pagetitle %}

Design Learning Module

{% endblock %} + +{% block script %} + + + +{% endblock %} + +{% block css %} + +{% endblock %} + +{% block content %} +{% if course_id %} + Cancel +{% else %} + Cancel +{% endif %} +{% if status == "add" %} +
+ {% csrf_token %} +
+ + {{ module_form.as_table }} +
+
+

+
+ + +
+
+
+ +{% endif %} + +{% if status == "design" %} +

Add/Edit Learning Units

+
+{% csrf_token %} +
+
+
+
+

Available Lessons and quizzes: (Add Lessons and Quizzes)

+
+
    + {% for type, unit in quiz_les_list %} +
  • + +
  • + {% endfor %} +
+
+
+
+
+ +
+

+
+
+
+

Choosen Lessons and quizzes: +

+
+ + + + + + + + {% for unit in learning_units %} + +
    +
+ {% if unit.learning_type == "quiz" %} + + + {% else %} + + + {% endif %} + + + + {% endfor %} +
SelectQuiz/LessonOrderCheck Prerequisite + + + What's This + +
+ + {{ unit.quiz.description }} ({{unit.learning_type}}) + {{ unit.lesson.name }} ({{unit.learning_type}}) + + +  {{unit.check_prerequisite}} +
+
+
+
+
+ + + +
+
+
+
+
+{% endif %} +{% endblock %} \ No newline at end of file diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index 08bb124..d3705e3 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -18,7 +18,7 @@
{% csrf_token %}
- +
{{ form.as_table }}
@@ -30,14 +32,6 @@ Rejected Students {% endif %}
  • - - {% if course.active %}Deactivate Course {% else %} Activate Course {% endif %} -
  • -
  • - - Clone Course -
  • -
  • Send Mail
  • diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index e09a9cc..b3d7d1f 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -1,173 +1,425 @@ {% extends "manage.html" %} {% block title %} Courses {% endblock %} {% block pagetitle %} Courses {% endblock pagetitle %} +{% block script %} + +{% endblock %} {% block content %} +
    + +
    + + + + + + + + +
    +{% if type == "quiz" %} + Add new Quiz + {% if not quizzes %} +

    No new Quiz Added

    +

    + {% else %} +
    +

    Quizzes

    + + + + + + + + {% for quiz in quizzes %} + + + + + {% endfor %} + +
    Sr.NoQuizQuestionPaper
    {{forloop.counter}} + + + {% if quiz.questionpaper_set.get %} + + Question Paper for {{ quiz.description }} +
    + {% else %} +

    No Question Paper + Add +

    + {% endif %} +
    -

    - {% endfor %} -{% else %} -

    No new Courses allotted

    -

    + {% endif %} +{% endif %} +
    + + + +
    +{% if type == "lesson" %} + Add new Lesson + {% if not lessons %} +

    No new Lessons Added

    +

    + {% else %} +
    +

    Lessons

    + + + + + + + {% for lesson in lessons %} + + + + {% endfor %} + +
    Sr.NoLesson
    {{forloop.counter}} + +
    +
    + {% endif %} +{% endif %} +
    + + +
    +{% if type == "learning_module" %} + + Add new Module + {% if not learning_modules %} +

    No new learning modules Added

    +

    + {% else %} +
    +

    Learning Modules

    + + + + + + + + {% for module in learning_modules %} + + + + + + {% endfor %} + +
    Sr.NoLearning ModulesDesign ModuleLearning Units
    {{forloop.counter}} + + {{ module.name }} + + + Add Quizzes/Lessons for {{module.name}} + + + {% if module.get_learning_units %} + {% for unit in module.get_learning_units %} +
      + {% if unit.learning_type == 'quiz' %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} +
    + {% endfor %} + {% else %} + No Learning units + {% endif %} +
    +
    + {% endif %} {% endif %} -
    -
    +
    + {% endblock %} diff --git a/yaksh/templates/yaksh/design_course_session.html b/yaksh/templates/yaksh/design_course_session.html new file mode 100644 index 0000000..87acc33 --- /dev/null +++ b/yaksh/templates/yaksh/design_course_session.html @@ -0,0 +1,107 @@ +{% extends "manage.html" %} +{% load custom_filters %} +{% block title %}Design Course Session{% endblock %} + +{% block pagetitle %}Design Course Session{% endblock %} + +{% block script %} + + +{% endblock %} + +{% block css %} + +{% endblock %} + +{% block main %} +
    +{% csrf_token %} +
    +
    +
    +
    +

    Available Lessons and quizzes: (Add Lessons and Quizzes)

    +
    + + + + + + + {% for module in learning_modules %} +
      +
    + + + + + + + {% endfor %} +
    SelectLearning ModuleLearning Units
    {{ module.name }} + {% for unit in module.get_learning_units %} +
      +
    • + {% if unit.learning_type == "quiz" %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} +
    • +
    + {% endfor %} +
    +
    +
    +
    +
    + +
    +

    +
    +
    +
    +

    Choosen Lessons and quizzes: (Change Order)

    +
    + + + + + + + + {% for module in added_learning_modules %} + +
      +
    + + + + + + {% endfor %} +
    SelectLearning ModuleOrderCheck Prerequisite + + + What's This + +
    + + {{ module.name }} + + +  {{module.check_prerequisite}} +
    +
    +
    +
    +
    + +    + +
    +
    +
    +
    +
    +{% endblock %} \ No newline at end of file diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index d946647..a68d348 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -34,7 +34,7 @@ $(document).ready(function() {% if course.get_quizzes %} {% for quiz in course.get_quizzes %} -
  • +
  • {{quiz.description}}
  • {% endfor %} @@ -52,7 +52,7 @@ $(document).ready(function() {% if users %}
    {% for user in users %} -

    +

    {{user.user__first_name}} {{user.user__last_name}}

    {% endfor %}
    @@ -95,7 +95,7 @@ Attempt Number: {{paper.attempt_number}} - {{paper.question_paper.quiz.description}} + {{paper.question_paper.quiz.description}} {% endfor %} diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html index 8df2e7d..e40293b 100644 --- a/yaksh/templates/yaksh/monitor.html +++ b/yaksh/templates/yaksh/monitor.html @@ -46,7 +46,7 @@ $(document).ready(function() {% if course.get_quizzes %} {% for quiz in course.get_quizzes %} -
  • +
  • {{quiz.description}}
  • {% endfor %} @@ -64,7 +64,7 @@ $(document).ready(function() {% if msg != "Monitor" %} {% if quiz %} {% if papers %} -

    Course Name: {{ quiz.course.name }}

    +

    Course Name: {{ course.name }}

    Quiz Name: {{ quiz.description }}

    Number of papers: {{ papers|length }}

    {% completed papers as completed_papers %} @@ -75,7 +75,7 @@ $(document).ready(function() {# template tag used to get the count of inprogress papers #}

    Papers in progress: {{ inprogress_papers }}

    -

    Question Statisitics

    +

    Question Statisitics

    -
    + {% csrf_token %} diff --git a/yaksh/templates/yaksh/quit.html b/yaksh/templates/yaksh/quit.html index d18b790..b168724 100644 --- a/yaksh/templates/yaksh/quit.html +++ b/yaksh/templates/yaksh/quit.html @@ -30,8 +30,11 @@

    Your current answers are saved.

    Are you sure you wish to quit the exam?

    Be sure, as you won't be able to restart this exam.

    - + {% csrf_token %} -
     
    +
    +   + +
    {% endblock content %} diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html index b90db18..5699a07 100644 --- a/yaksh/templates/yaksh/quizzes_user.html +++ b/yaksh/templates/yaksh/quizzes_user.html @@ -1,4 +1,5 @@ {% extends "user.html" %} +{% load custom_filters %} {% block pagetitle %} {{ title }} {% endblock %} {% block main %} {% if 'Enrolled Courses' not in title%} @@ -50,39 +51,64 @@ No Courses to display
    - {% if user in course.students.all %} + {% if user in course.students.all and course.get_learning_modules %} - - - - {% for quiz in course.get_quizzes %} - {% if quiz.active and quiz.course_id == course.id %} + + + + {% for module in course.get_learning_modules %} - {% if not quiz.is_expired and course.active %} - - {% else %} - - {% endif %} + - {% endif %} {% endfor %}
    QuizView Answer PaperPre requisite quizLearning ModulesLearning UnitsStatus
    - {{ quiz.description }}
    -
    - {{ quiz.description }} Inactive
    -
    - {% if quiz.view_answerpaper %} - Can View - {% else %} - Cannot view now - {% endif %} + + {{module.name}} - {% if quiz.prerequisite %} - You have to pass {{ quiz.prerequisite.description }} for taking {{ paper.quiz.description }} + + + + + {% for unit in module.get_learning_units %} + +
      +
    + + + + + {% endfor %} +
    Lesson/quizstatusView Answerpaper
    + {% if unit.learning_type == "quiz" %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} + + {% get_unit_status course module unit user as status %} + {% if status == "completed" %} + {{status}} + {% else %} + {{status}} + {% endif %} + + {% if unit.learning_type == "quiz" %} + {% if quiz.view_answerpaper %} + Can View + {% else %} + Cannot view now + {% endif %} + {% else %} + ------ + {% endif %} +
    +
    + {% if module.status == "completed" %} + {{module.status}} {% else %} - No pre requisites for {{ quiz.description }} + {{module.status}} {% endif %}
    {% endif %} diff --git a/yaksh/templates/yaksh/regrade.html b/yaksh/templates/yaksh/regrade.html index 844c6ee..77e28df 100644 --- a/yaksh/templates/yaksh/regrade.html +++ b/yaksh/templates/yaksh/regrade.html @@ -33,7 +33,7 @@ Course: {{ course }}
    - {% for quiz in course.quiz_set.all %} + {% for quiz in course.get_quizzes %}

    Quiz: {{ quiz }}

    {% with questionpaper=quiz.questionpaper_set.get %} @@ -69,7 +69,7 @@ Course: {{ course }}
    - {% for quiz in course.quiz_set.all %} + {% for quiz in course.get_quizzes %}

    Quiz: {{ quiz }}

      diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html new file mode 100644 index 0000000..f0d1c73 --- /dev/null +++ b/yaksh/templates/yaksh/show_video.html @@ -0,0 +1,63 @@ +{% extends "user.html" %} +{% load custom_filters %} + +{% block title %} {{ learning_module.name }} {% endblock %} + +{% block pagetitle %} {{ learning_module.name }} {% endblock %} + +{% block usersidebar %} +


      +

      Module List

      +
        +{% for unit in learning_units %} + +
      • +{% if unit.learning_type == "quiz" %} + + {{ unit.quiz.description }} +{% else %} + + {{ unit.lesson.name }} +{% endif %} + +{% get_unit_status course learning_module unit user as status %} +{% if status == "completed" %} + {{status}} +{% else %} + {{status}} +{% endif %} +
      • +
        +
        +{% endfor %} +
      +{% endblock %} + +{% block main %} +{% if state == "module" %} +
      +
      + {{learning_module.html_data|safe}} +
      +
      + +{% else %} +

      {{lesson.name}}

      +
      +
      + {{lesson.html_data|safe}} +
      +
      + +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/yaksh/templates/yaksh/statistics_question.html b/yaksh/templates/yaksh/statistics_question.html index 31e889b..c6f4e57 100644 --- a/yaksh/templates/yaksh/statistics_question.html +++ b/yaksh/templates/yaksh/statistics_question.html @@ -6,7 +6,7 @@
      {% for attempt in attempts %} -

      Attempt {{ attempt }}

      +

      Attempt {{ attempt }}

      {% endfor %}
      diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index e12a0a0..60269e4 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -26,14 +26,9 @@ Last login: {{ data.user.last_login }}

      {% if data.papers %} -{% if data.questionpaperid %} -

      +

      Grade/correct paper

      -{% else %} -

      - Grade/correct paper -{% endif %} {% for paper in data.papers %} {% if forloop.counter == 2 and data.questionpaperid %} @@ -58,11 +53,11 @@ User IP address: {{ paper.user_ip }}

      Details: {{forloop.counter}}. {{ question.summary }} - Show Question + Show Question Mark(s): {{ question.points }}
      -