From c70cf2a0fd8e51d4b689e08d78021cac848b0187 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Fri, 1 Feb 2019 14:47:20 +0530 Subject: Change Course Listing UI on Student Dashboard --- yaksh/forms.py | 7 ++- yaksh/templates/yaksh/course_modules.html | 16 +----- yaksh/templates/yaksh/quizzes_user.html | 89 +++++++++++++++++++------------ yaksh/views.py | 16 ++++-- 4 files changed, 76 insertions(+), 52 deletions(-) (limited to 'yaksh') diff --git a/yaksh/forms.py b/yaksh/forms.py index a51e6c2..57140bc 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -282,8 +282,11 @@ class CourseForm(forms.ModelForm): class Meta: model = Course - fields = ['name', 'enrollment', 'active', 'code', 'instructions', - 'start_enroll_time', 'end_enroll_time', 'grading_system'] + fields = [ + 'name', 'enrollment', 'active', 'code', 'instructions', + 'start_enroll_time', 'end_enroll_time', 'grading_system', + 'view_grade' + ] class ProfileForm(forms.ModelForm): diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html index 244c2d9..d5bbfd3 100644 --- a/yaksh/templates/yaksh/course_modules.html +++ b/yaksh/templates/yaksh/course_modules.html @@ -16,20 +16,8 @@
About the course
- {{ course.description }}
+ {{ course.data.description }}
What you'll learn
Instructor
- {{ course.creator.get_full_name }}
+ {{ course.data.creator.get_full_name }}
Requirement(s)
- {{ course.instructions|safe }}
+ {% if course.data.instructions %}
+
Instructions
+ {{ course.data.instructions|safe }}
STARTS ON | {{course.start_enroll_time}} |
ENDS ON | {{course.end_enroll_time}} | -