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/forms.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'yaksh/forms.py') diff --git a/yaksh/forms.py b/yaksh/forms.py index 52e6a12..84db33e 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -173,6 +173,12 @@ class UserLoginForm(forms.Form): return user +class ExerciseForm(forms.ModelForm): + class Meta: + model = Quiz + fields = ['description'] + + class QuizForm(forms.ModelForm): """Creates a form to add or edit a Quiz. It has the related fields and functions required.""" @@ -209,7 +215,7 @@ class QuizForm(forms.ModelForm): class Meta: model = Quiz - exclude = ["is_trial", "creator"] + exclude = ["is_trial", "creator", "is_exercise"] class QuestionForm(forms.ModelForm): -- cgit From 4310d5905a9cc702198e42830c1b670957cd7360 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 3 Jan 2018 19:27:25 +0530 Subject: Made UI changes as per suggestion Added view answerpaper option to exercise form. --- yaksh/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh/forms.py') diff --git a/yaksh/forms.py b/yaksh/forms.py index 84db33e..8399bc9 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -176,7 +176,7 @@ class UserLoginForm(forms.Form): class ExerciseForm(forms.ModelForm): class Meta: model = Quiz - fields = ['description'] + fields = ['description', 'view_answerpaper'] class QuizForm(forms.ModelForm): -- cgit