diff options
author | adityacp | 2018-01-14 16:20:58 +0530 |
---|---|---|
committer | adityacp | 2018-01-14 16:20:58 +0530 |
commit | ef22478a11d518982f38a6a0d4d84f6f8ba5e492 (patch) | |
tree | 99b437d71f841cb1ac9f26266d7e7de04031f340 /yaksh/models.py | |
parent | 5d206993d21c169cbc115733188f898d6c762e83 (diff) | |
download | online_test-ef22478a11d518982f38a6a0d4d84f6f8ba5e492.tar.gz online_test-ef22478a11d518982f38a6a0d4d84f6f8ba5e492.tar.bz2 online_test-ef22478a11d518982f38a6a0d4d84f6f8ba5e492.zip |
Change in models.py, course.js and course_detail.html
- Merge future imports in models into one
- Add table sorter in course.js and course_detail.html
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 3b1e3ba..f0d1b2e 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1,5 +1,4 @@ -from __future__ import unicode_literals -from __future__ import division +from __future__ import unicode_literals, division from datetime import datetime, timedelta import json import random @@ -489,7 +488,7 @@ class LearningModule(models.Model): def get_module_complete_percent(self, course, user): units = self.get_learning_units() if not units: - percent = 0 + percent = 0.0 else: status_list = [unit.get_completion_status(user, course) for unit in units] @@ -700,7 +699,7 @@ class Course(models.Model): def percent_completed(self, user): modules = self.get_learning_modules() if not modules: - percent = 0 + percent = 0.0 else: status_list = [module.get_module_complete_percent(self, user) for module in modules] |