From 31e8b94b8ebf74d77cc8596411c6acfa2112f949 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Mon, 4 May 2020 16:25:50 +0530 Subject: Show question topic and language in quiz --- yaksh/forms.py | 2 +- yaksh/static/yaksh/css/custom.css | 7 ++++++ yaksh/templates/yaksh/question.html | 45 ++++++++++++++++++++----------------- 3 files changed, 32 insertions(+), 22 deletions(-) (limited to 'yaksh') diff --git a/yaksh/forms.py b/yaksh/forms.py index 1cd1291..3c4d664 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -299,7 +299,7 @@ class QuestionForm(forms.ModelForm): {'class': 'custom-select'} ) self.fields['topic'].widget.attrs.update( - {'class': 'custom-select'} + {'class': form_input_class, 'placeholder': 'Topic name'} ) self.fields['type'].widget.attrs.update( {'class': 'custom-select'} diff --git a/yaksh/static/yaksh/css/custom.css b/yaksh/static/yaksh/css/custom.css index 3979e3e..a9c8e27 100644 --- a/yaksh/static/yaksh/css/custom.css +++ b/yaksh/static/yaksh/css/custom.css @@ -117,4 +117,11 @@ body, .dropdown-menu { .description { font-size: 16px; +} + +/* --------------------------------------------------- + Quiz qusetion style +----------------------------------------------------- */ +#question_card { + border: none; } \ No newline at end of file diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 92d591f..640003b 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -107,10 +107,10 @@ function call_skip(url) form.submit(); } init_val = '{{ last_attempt|escape_quotes|safe }}'; -lang = "{{ question.language }}" -course_id = "{{course.id}}" -module_id = "{{module.id}}" -question_type = "{{ question.type }}" +lang = "{{ question.language }}"; +course_id = "{{course.id}}"; +module_id = "{{module.id}}"; +question_type = "{{ question.type }}"; {% endblock script %} @@ -146,39 +146,42 @@ question_type = "{{ question.type }}"