diff options
author | adityacp | 2018-02-09 14:56:02 +0530 |
---|---|---|
committer | adityacp | 2018-02-15 14:52:19 +0530 |
commit | 617d09ca9b05185d9a2310c106360091ed8a1b1a (patch) | |
tree | 81a679abd29cbe8b9c5cafd447597a0e116014b3 /yaksh/views.py | |
parent | 93c4469db46ca0df19dbcf33eb7e8f6fad4f5b7b (diff) | |
download | online_test-617d09ca9b05185d9a2310c106360091ed8a1b1a.tar.gz online_test-617d09ca9b05185d9a2310c106360091ed8a1b1a.tar.bz2 online_test-617d09ca9b05185d9a2310c106360091ed8a1b1a.zip |
Change in models, test_models and views
- Change learning module test to remove units from course status after successful test run
- Remove unnecessary comments from views
- Remove unnecessary condition from module get_status method
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 27325c6..011b417 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -2354,10 +2354,9 @@ def show_lesson(request, lesson_id, module_id, course_id): learn_unit = learn_module.learning_unit.get(lesson_id=lesson_id) learning_units = learn_module.get_learning_units() - # if learning module is active if not learn_module.active: return view_module(request, module_id, course_id) - # if lesson is active or not + if not learn_unit.lesson.active: msg = "{0} is not active".format(learn_unit.lesson.name) return view_module(request, module_id, course_id, msg) @@ -2674,7 +2673,6 @@ def view_module(request, module_id, course_id, msg=None): return course_modules(request, course_id, msg) learning_module = course.learning_module.get(id=module_id) - # Check if module is active or not if not learning_module.active: msg = "{0} is not active".format(learning_module.name) return course_modules(request, course_id, msg) |