summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authoradityacp2018-02-27 15:41:08 +0530
committeradityacp2018-02-27 15:41:08 +0530
commit0ae21e437775b056d346311bd9f50220e5d9fb28 (patch)
treed1b1ff94bbb85c89f54c942c0403d6041db05a3b /yaksh/models.py
parent333859a8c1ab57e70ea57e92a22eaac6a1a1c0ac (diff)
downloadonline_test-0ae21e437775b056d346311bd9f50220e5d9fb28.tar.gz
online_test-0ae21e437775b056d346311bd9f50220e5d9fb28.tar.bz2
online_test-0ae21e437775b056d346311bd9f50220e5d9fb28.zip
Change in models.py, views.py, urls.py, test_views.py, courses.html
- Allow only deep cloning of a course - Remove tests for shallow course clone
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 252bde6..7aa5f83 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -613,16 +613,6 @@ class Course(models.Model):
return new_course
def create_duplicate_course(self, user):
- learning_modules = self.learning_module.all()
-
- new_course_name = "Copy Of {0}".format(self.name)
- new_course = self._create_duplicate_instance(user, new_course_name)
-
- new_course.learning_module.add(*learning_modules)
-
- return new_course
-
- def create_shallow_copy(self, user):
learning_modules = self.learning_module.order_by("order")
copy_course_name = "Copy Of {0}".format(self.name)
new_course = self._create_duplicate_instance(user, copy_course_name)