From d54b62c2803f0f0edb45348f47d6a541ca09e022 Mon Sep 17 00:00:00 2001 From: adityacp Date: Wed, 26 Aug 2020 20:29:03 +0530 Subject: First cut for in video quizzes --- yaksh/templates/base.html | 5 ++ yaksh/templates/manage.html | 30 ------- yaksh/templates/yaksh/add_lesson.html | 126 +++++++++++++++++++++++------- yaksh/templates/yaksh/add_module.html | 27 ++----- yaksh/templates/yaksh/add_topic.html | 12 +++ yaksh/templates/yaksh/add_video_quiz.html | 74 ++++++++++++++++++ yaksh/templates/yaksh/show_video.html | 10 ++- 7 files changed, 200 insertions(+), 84 deletions(-) create mode 100644 yaksh/templates/yaksh/add_topic.html create mode 100644 yaksh/templates/yaksh/add_video_quiz.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html index c70c265..7ce653d 100644 --- a/yaksh/templates/base.html +++ b/yaksh/templates/base.html @@ -20,6 +20,8 @@ + + {% block meta %} @@ -37,6 +39,9 @@ + + diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index a2edbe0..e11e4cd 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -123,8 +123,14 @@ {% endif %} {% else %} -
- {{lesson.html_data|safe}} +
+ {{lesson.html_data|safe}} +
+
+
Next  -- cgit From d22930f72652b0b306dd491767e8368280bb8266 Mon Sep 17 00:00:00 2001 From: adityacp Date: Thu, 3 Sep 2020 18:21:40 +0530 Subject: Show table of contents on adding new content --- yaksh/templates/yaksh/add_lesson.html | 10 +++------- yaksh/templates/yaksh/add_topic.html | 4 ++-- yaksh/templates/yaksh/add_video_quiz.html | 32 +++++++++++++++++++++++++------ yaksh/templates/yaksh/show_toc.html | 29 ++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 15 deletions(-) create mode 100644 yaksh/templates/yaksh/show_toc.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html index 71477e7..62aa881 100644 --- a/yaksh/templates/yaksh/add_lesson.html +++ b/yaksh/templates/yaksh/add_lesson.html @@ -146,8 +146,8 @@ Table Of Contents 
-
-
+
+
{{toc}}

@@ -160,11 +160,7 @@ {% with lesson_form.instance.video_path|video_name as video %}

- -
+ {% csrf_token %}
diff --git a/yaksh/templates/yaksh/add_topic.html b/yaksh/templates/yaksh/add_topic.html index 6f88a88..8c8fdb3 100644 --- a/yaksh/templates/yaksh/add_topic.html +++ b/yaksh/templates/yaksh/add_topic.html @@ -1,7 +1,7 @@ {% if topic_id %} - + {% else %} - + {% endif %} {% csrf_token %} {{ form.as_p }} diff --git a/yaksh/templates/yaksh/add_video_quiz.html b/yaksh/templates/yaksh/add_video_quiz.html index 5c8db5f..cf59fcb 100644 --- a/yaksh/templates/yaksh/add_video_quiz.html +++ b/yaksh/templates/yaksh/add_video_quiz.html @@ -1,7 +1,11 @@ +{% load static %} + + {% if question_id %} - + {% else %} - + {% endif %} {% csrf_token %} @@ -39,7 +43,7 @@ + \ No newline at end of file diff --git a/yaksh/templates/yaksh/show_toc.html b/yaksh/templates/yaksh/show_toc.html new file mode 100644 index 0000000..85bcf40 --- /dev/null +++ b/yaksh/templates/yaksh/show_toc.html @@ -0,0 +1,29 @@ +
+{% for toc in contents %} + + + + + + + +{% endfor %} +
+ {{ toc.get_toc_text }} + + {{toc.get_content_display}} + + {{toc.time}} + + {% if toc.content == 1 %} + + {% else %} + + {% endif %} +  Edit + + + +  Delete + +
\ No newline at end of file -- cgit From 7e5608d0853d69358c14f9fb8fbd6465e21b8962 Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 7 Sep 2020 12:53:08 +0530 Subject: Add edit and delete table of contents options --- yaksh/templates/yaksh/add_lesson.html | 6 +++++ yaksh/templates/yaksh/add_topic.html | 2 +- yaksh/templates/yaksh/add_video_quiz.html | 2 +- yaksh/templates/yaksh/show_toc.html | 39 +++++++++++++++++++++++++------ 4 files changed, 40 insertions(+), 9 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html index 62aa881..6018e54 100644 --- a/yaksh/templates/yaksh/add_lesson.html +++ b/yaksh/templates/yaksh/add_lesson.html @@ -158,7 +158,13 @@
{% if lesson_form.instance and lesson_form.instance.video_path %} {% with lesson_form.instance.video_path|video_name as video %} + {% if video.1 == "others" %} + + {% else %}
+ {% endif %}
{% csrf_token %} diff --git a/yaksh/templates/yaksh/add_topic.html b/yaksh/templates/yaksh/add_topic.html index 8c8fdb3..52923e7 100644 --- a/yaksh/templates/yaksh/add_topic.html +++ b/yaksh/templates/yaksh/add_topic.html @@ -1,5 +1,5 @@ {% if topic_id %} - + {% else %} {% endif %} diff --git a/yaksh/templates/yaksh/add_video_quiz.html b/yaksh/templates/yaksh/add_video_quiz.html index cf59fcb..ad087bc 100644 --- a/yaksh/templates/yaksh/add_video_quiz.html +++ b/yaksh/templates/yaksh/add_video_quiz.html @@ -3,7 +3,7 @@ {% if question_id %} - + {% else %} {% endif %} diff --git a/yaksh/templates/yaksh/show_toc.html b/yaksh/templates/yaksh/show_toc.html index 85bcf40..b263652 100644 --- a/yaksh/templates/yaksh/show_toc.html +++ b/yaksh/templates/yaksh/show_toc.html @@ -1,8 +1,9 @@ {% for toc in contents %} + {% with toc.get_toc_text as toc_name %} + {% endwith %} +{% empty %} +
+ No Table of contents added +
{% endfor %} +
- {{ toc.get_toc_text }} + {{ toc_name }} {{toc.get_content_display}} @@ -12,18 +13,42 @@ {% if toc.content == 1 %} - + {% else %} - + {% endif %} -  Edit +  Edit - -  Delete - + + {% csrf_token %} + + +
\ No newline at end of file -- cgit From 2d1b8eb907c7e142d4e3c76e43707fb9f82d6683 Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 7 Sep 2020 13:43:09 +0530 Subject: Show the lesson contents on student interface --- yaksh/templates/yaksh/show_video.html | 117 +++++++++++++++++++++++++--------- 1 file changed, 88 insertions(+), 29 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index 236f8ef..4c54518 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -4,6 +4,8 @@ {% block title %} {{ learning_module.name }} {% endblock %} {% block script %} + {% endblock %} @@ -127,37 +129,94 @@ {% endif %} {% else %} -
- {{lesson.html_data|safe}} -
-
- -
- - Next  - -
-
-
- {% with lesson.get_files as lesson_files %} - {% if lesson_files %} -
-
- Files for this lesson -
-
- {% for f in lesson_files %} - - {{forloop.counter}}.{{ f.file.name|file_title }} - - {% endfor %} + +
+
+
+ {% if lesson.video_path %} + {% with lesson.video_path|video_name as video %} + {% if video.1 == "others" %} + + {% else %} +
+ {% endif %} + {% endwith %} +
+ + Next  + + {% endif %} +
+
+
+
+ +
+
+ + {% for content in toc %} + {% with content.get_toc_text as toc_name %} + + + + + + {% endwith %} + {% empty %} +
+ No Table of contents added +
+ {% endfor %} +
+ {{ toc_name }} + + {{content.get_content_display}} + + {{content.time}} +
- {% endif %} - {% endwith %} +
+
+
+
+

Lesson Description

+
+
+ {{lesson.html_data|safe}} +
+
+ {% if not lesson.video_path %} + + Next  + +
+ {% endif %} +
+ {% with lesson.get_files as lesson_files %} + {% if lesson_files %} +
+
+ Files for this lesson +
+
+ {% for f in lesson_files %} + + {{forloop.counter}}.{{ f.file.name|file_title }} + + {% endfor %} +
+
+ {% endif %} + {% endwith %} +
+
{% endif %}
-- cgit From 28f9fc3fa8b6ad7866c7ef72f13883af7d6ab7e7 Mon Sep 17 00:00:00 2001 From: adityacp Date: Wed, 9 Sep 2020 17:07:21 +0530 Subject: Show the toc quiz on the student dashboard --- yaksh/templates/base.html | 5 +- yaksh/templates/yaksh/show_lesson_quiz.html | 131 ++++++++++++++++++++++++++++ yaksh/templates/yaksh/show_video.html | 88 ++++++++++--------- 3 files changed, 178 insertions(+), 46 deletions(-) create mode 100644 yaksh/templates/yaksh/show_lesson_quiz.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html index 7ce653d..53edbee 100644 --- a/yaksh/templates/base.html +++ b/yaksh/templates/base.html @@ -55,9 +55,8 @@
Checking... -
- - +
+
{% block nav %} {% endblock %} diff --git a/yaksh/templates/yaksh/show_lesson_quiz.html b/yaksh/templates/yaksh/show_lesson_quiz.html new file mode 100644 index 0000000..2d5184e --- /dev/null +++ b/yaksh/templates/yaksh/show_lesson_quiz.html @@ -0,0 +1,131 @@ +{% load custom_filters %} + +
+ {% csrf_token %} +
+
+
+
+

{{ question.summary }}

+
+
+ {% if question.language == "other" %} + Topic: {{question.topic}} + {% else %} + Language: {{question.language}} + {% endif %} + {% if question.type == "mcq" %} + Type: SINGLE CORRECT CHOICE + {% elif question.type == "mcc" %} + Type: MULTIPLE CORRECT CHOICES + {% elif question.type == "integer" %} + Type: FILL IN THE BLANKS WITH INTEGER ANSWER + {% elif question.type == "string" %} + Type: FILL IN THE BLANKS WITH STRING ANSWER + {% if testcase.string_check == "lower" %} +
(CASE INSENSITIVE) + {% else %} +
(CASE SENSITIVE) + {% endif %} + {% elif question.type == "float" %} + Type: FILL IN THE BLANKS WITH FLOAT ANSWER + {% elif question.type == "arrange" %} + Type: ARRANGE THE OPTIONS IN CORRECT ORDER + {% endif %} + + Marks: {{ question.points }} + +
+
+
+
+
+ {{ question.description|safe }} +
+
+ {% if question.type == "mcq" %} + + {% for test_case in test_cases %} + {% if last_attempt and last_attempt|to_int == test_case.id %} + + {{ test_case.options|safe }}
+ {% else %} + + {{ test_case.options|safe }}
+ {% endif %} + {% endfor %} + {% endif %} + + {% if question.type == "integer" %} + + Enter Integer:
+ +

+ {% endif %} + + {% if question.type == "string" %} + + Enter Text:
+ +

+ {% endif %} + + {% if question.type == "float" %} + + Enter Decimal Value :
+ +

+ {% endif %} + + {% if question.type == "mcc" %} + + {% for test_case in test_cases %} + {% if last_attempt and test_case.id|safe in last_attempt|safe %} + + {{ test_case.options| safe }} +
+ {% else %} + + {{ test_case.options| safe }} +
+ {% endif %} + {% endfor %} + {% endif %} + + {% if question.type == "arrange" %} + + {% if last_attempt %} + {% get_answer_for_arrange_options last_attempt question as test_cases %} + {% endif %} + +
+
    + {% for test_case in test_cases %} +
  1. + {{test_case.options| safe }}
  2. {% endfor %} +
+
+ + {% endif %} + {% if question.type == "mcq" or question.type == "mcc" or question.type == "integer" or question.type == "float" or question.type == "string" %} +
+ {% elif question.type == "arrange" %} +
+ {% endif %} +
+
+
\ No newline at end of file diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index 4c54518..8f8bbb2 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -4,11 +4,22 @@ {% block title %} {{ learning_module.name }} {% endblock %} {% block script %} - + + + {% endblock %} +{% block css %} + +{% endblock %} {% block main %}
@@ -143,10 +154,6 @@
{% endif %} {% endwith %} -
- - Next  - {% endif %}
@@ -164,14 +171,17 @@ {% with content.get_toc_text as toc_name %} - {{ toc_name }} + {{ toc_name }} {{content.get_content_display}} - + {{content.time}} + + + {% endwith %} {% empty %} @@ -185,48 +195,40 @@
-
-

Lesson Description

-
-
- {{lesson.html_data|safe}} -
-
- {% if not lesson.video_path %} - - Next  - -
- {% endif %} -
- {% with lesson.get_files as lesson_files %} - {% if lesson_files %} -
-
- Files for this lesson -
-
- {% for f in lesson_files %} - - {{forloop.counter}}.{{ f.file.name|file_title }} - - {% endfor %} +
+ + Next  + +
+

Lesson Description

+
+
+ {{lesson.html_data|safe}} +
+
+ {% with lesson.get_files as lesson_files %} + {% if lesson_files %} +
+
+ Files for this lesson +
+
+ {% for f in lesson_files %} + + {{forloop.counter}}.{{ f.file.name|file_title }} + + {% endfor %} +
-
- {% endif %} - {% endwith %} + {% endif %} + {% endwith %} +
{% endif %}
- +
{% endblock %} -- cgit From b1d2b88746fc670d7362f9b4d175d5e570f3ac77 Mon Sep 17 00:00:00 2001 From: adityacp Date: Sat, 12 Sep 2020 11:44:01 +0530 Subject: Mulitple changes - Remove all alerts and add toast messages - Accept user submissions for the lesson quiz and evaluate - Initial lesson statistics --- yaksh/templates/base.html | 19 +++++++++++++++++++ yaksh/templates/yaksh/show_lesson_statistics.html | 5 +++++ yaksh/templates/yaksh/show_video.html | 11 ++++------- 3 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 yaksh/templates/yaksh/show_lesson_statistics.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html index 53edbee..8bf7fbc 100644 --- a/yaksh/templates/base.html +++ b/yaksh/templates/base.html @@ -22,6 +22,7 @@ + "> {% block meta %} @@ -42,6 +43,8 @@ + {% block script %} {% endblock %} diff --git a/yaksh/templates/yaksh/show_lesson_quiz.html b/yaksh/templates/yaksh/show_lesson_quiz.html index 2d5184e..fb5ae6c 100644 --- a/yaksh/templates/yaksh/show_lesson_quiz.html +++ b/yaksh/templates/yaksh/show_lesson_quiz.html @@ -43,7 +43,7 @@ Type: ARRANGE THE OPTIONS IN CORRECT ORDER {% endif %} - Marks: {{ question.points }} + Points: {{ question.points }} diff --git a/yaksh/templates/yaksh/show_toc.html b/yaksh/templates/yaksh/show_toc.html index b263652..ddaad74 100644 --- a/yaksh/templates/yaksh/show_toc.html +++ b/yaksh/templates/yaksh/show_toc.html @@ -1,8 +1,18 @@ +
+
+ {% csrf_token %} + + +
+
+
{% for toc in contents %} {% with toc.get_toc_text as toc_name %} -
+ {{ toc_name }} @@ -36,6 +46,7 @@ No Table of contents added {% endfor %} +
- \ No newline at end of file + \ No newline at end of file -- cgit From c6c57869fe653d2ea0502017a9fb15f2f745491b Mon Sep 17 00:00:00 2001 From: adityacp Date: Wed, 30 Sep 2020 19:14:38 +0530 Subject: Change multiple files - Add download sample yaml for toc in the lesson - Add validation for upload toc yaml - Add tests for download sample yaml toc --- yaksh/templates/yaksh/show_toc.html | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/show_toc.html b/yaksh/templates/yaksh/show_toc.html index ddaad74..92ea0cd 100644 --- a/yaksh/templates/yaksh/show_toc.html +++ b/yaksh/templates/yaksh/show_toc.html @@ -1,13 +1,21 @@ -
-
- {% csrf_token %} - - -
-
-
+{% load custom_filters %} +{% has_lesson_video lesson_id as has_video %} +{% if has_video %} +
+ +  Download Sample + +

+
+ {% csrf_token %} + + +
+
+
+{% endif %} {% for toc in contents %} {% with toc.get_toc_text as toc_name %} -- cgit