diff options
author | Palaparthy Adityachandra | 2020-04-02 11:22:02 +0530 |
---|---|---|
committer | GitHub | 2020-04-02 11:22:02 +0530 |
commit | 34b72832775c48788bd5154227a3e0faf6affadd (patch) | |
tree | aaabded820ed573dd7b58e9b5071bf9fad907316 /yaksh/models.py | |
parent | 193326ebc49d40acf80552c8fe46db481a67d534 (diff) | |
parent | 957222b17cd80859158df06ed4c8f2d3b83f2873 (diff) | |
download | online_test-34b72832775c48788bd5154227a3e0faf6affadd.tar.gz online_test-34b72832775c48788bd5154227a3e0faf6affadd.tar.bz2 online_test-34b72832775c48788bd5154227a3e0faf6affadd.zip |
Merge pull request #673 from adityacp/fix_course_design_workflow
Fix UI/UX for creating course modules, lessons, quizzes
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 12c902b..52a0414 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -841,6 +841,15 @@ class LearningModule(models.Model): write_templates_to_zip(zip_file, module_file_path, module_data, module_name, folder_name) + def get_unit_order(self, type, unit): + if type == "lesson": + order = self.get_learning_units().get( + type=type, lesson=unit).order + else: + order = self.get_learning_units().get( + type=type, quiz=unit).order + return order + def __str__(self): return self.name |