From 51a93b42b1d7b3a94e227796aa8d4f6e97de9929 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 27 Dec 2017 17:32:21 +0530 Subject: Exercise feature in video lessons Exercise is same as quiz except for following differences: - no time limit - no marks weightage - no instruction page - skip denied for a particular time An attribute 'is_exercise' in Quiz determines whether the quiz is exercise or not. Questions contains 'min_time' attribute. For an exercise a question cannot be skipped for an allotted minimum time, after which either django or JavaScript makes Next button available. Implementation is as such due to complexity of our existing views and templates. Also, after min_time, same question with Next button is available to move on, assuming that solution is present in the video. --- yaksh/templates/exam.html | 4 ++-- yaksh/templates/yaksh/add_exercise.html | 41 +++++++++++++++++++++++++++++++++ yaksh/templates/yaksh/add_question.html | 1 + yaksh/templates/yaksh/courses.html | 7 +++++- yaksh/templates/yaksh/question.html | 37 ++++++++++++++++++++--------- 5 files changed, 76 insertions(+), 14 deletions(-) create mode 100644 yaksh/templates/yaksh/add_exercise.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index d0812a4..4fd83dd 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -20,9 +20,9 @@ diff --git a/yaksh/templates/yaksh/add_exercise.html b/yaksh/templates/yaksh/add_exercise.html new file mode 100644 index 0000000..af3e7b4 --- /dev/null +++ b/yaksh/templates/yaksh/add_exercise.html @@ -0,0 +1,41 @@ +{% extends "manage.html" %} + + +{% block subtitle %}Add Exercise{% endblock %} + +{% block css %} + + +{% endblock %} +{% block script %} + + + +{% endblock %} +{% block onload %} onload="javascript:test();" {% endblock %} +{% block content %} + +
+ {% csrf_token %} +
+ + {{ form.as_table }} +
+ +

+
+ +
+ +
+
+ +{% endblock %} diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index 6ead019..c294d9a 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -25,6 +25,7 @@ Description: {{ qform.description}} {{qform.description.errors}} Tags: {{ qform.tags }} Snippet: {{ qform.snippet }} + Minimum Time(in minutes): {{ qform.min_time }} Partial Grading: {{ qform.partial_grading }} Grade Assignment Upload: {{ qform.grade_assignment_upload }} File: {{ fileform.file_field }}{{ fileform.file_field.errors }} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 5daf944..a06ee7e 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -290,7 +290,8 @@
{% if type == "quiz" %} - Add new Quiz + Add New Quiz + Add New Exercise {% if not quizzes %}

No new Quiz Added



@@ -308,7 +309,11 @@ {{forloop.counter}}
-- cgit From 7fe8e17438b8e67e7290f11ddcd29cda3953921b Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 27 Dec 2017 17:54:31 +0530 Subject: cleaned add exercise HTML --- yaksh/templates/yaksh/add_exercise.html | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/add_exercise.html b/yaksh/templates/yaksh/add_exercise.html index af3e7b4..dac35d4 100644 --- a/yaksh/templates/yaksh/add_exercise.html +++ b/yaksh/templates/yaksh/add_exercise.html @@ -5,12 +5,10 @@ {% block css %} - {% endblock %} {% block script %} - {% endblock %} {% block onload %} onload="javascript:test();" {% endblock %} {% block content %} @@ -21,10 +19,6 @@ {{ form.as_table }}
-

@@ -33,9 +27,4 @@ - {% endblock %} -- cgit From e14514e01052fb36cd9f14675cbe7ca940945a34 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Tue, 2 Jan 2018 16:46:52 +0530 Subject: Allowed user to skip and view solution if the answer is correct. Added solution attribute to the Question model. --- yaksh/templates/yaksh/add_question.html | 2 ++ yaksh/templates/yaksh/courses.html | 9 +++++++-- yaksh/templates/yaksh/question.html | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index c294d9a..4ec9bee 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -24,6 +24,8 @@ Rendered:

Description: {{ qform.description}} {{qform.description.errors}} Tags: {{ qform.tags }} + Rendered Solution:

+ Solution: {{ qform.solution }} Snippet: {{ qform.snippet }} Minimum Time(in minutes): {{ qform.min_time }} Partial Grading: {{ qform.partial_grading }} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index a06ee7e..a41c8c3 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -151,8 +151,13 @@