summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2018-02-27 15:41:08 +0530
committeradityacp2018-02-27 15:41:08 +0530
commit0ae21e437775b056d346311bd9f50220e5d9fb28 (patch)
treed1b1ff94bbb85c89f54c942c0403d6041db05a3b /yaksh/views.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/views.py')
-rw-r--r--yaksh/views.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index b4b0c76..ce11558 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -2246,20 +2246,16 @@ def download_sample_csv(request):
@login_required
@email_verified
-def duplicate_course(request, copy_type, course_id):
+def duplicate_course(request, course_id):
user = request.user
course = Course.objects.get(id=course_id)
if not is_moderator(user):
raise Http404('You are not allowed to view this page!')
if course.is_teacher(user) or course.is_creator(user):
- if copy_type == "shallow":
- # Link all the modules from current course to copied course
- course.create_duplicate_course(user)
- else:
- # Create new entries of modules, lessons/quizzes
- # from current course to copied course
- course.create_shallow_copy(user)
+ # Create new entries of modules, lessons/quizzes
+ # from current course to copied course
+ course.create_duplicate_course(user)
else:
msg = dedent(
'''\