diff options
author | ankitjavalkar | 2020-01-06 15:51:20 +0530 |
---|---|---|
committer | GitHub | 2020-01-06 15:51:20 +0530 |
commit | 41581d20e18ed54e160a248216c9ad6576fe16bf (patch) | |
tree | 6a576f7e9ed6eb24da945bd9b666197060862881 /yaksh/views.py | |
parent | 18188766cf1e91fe086ed8bfe2939d836ea92ff7 (diff) | |
parent | 6eca1dd646eff0c1f90c129e10e7959e79eb83a2 (diff) | |
download | online_test-41581d20e18ed54e160a248216c9ad6576fe16bf.tar.gz online_test-41581d20e18ed54e160a248216c9ad6576fe16bf.tar.bz2 online_test-41581d20e18ed54e160a248216c9ad6576fe16bf.zip |
Merge pull request #634 from ankitjavalkar/fix-grades
Fix bug to only allow self created grading systems to show up in the course form
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 56f1873..c0317d9 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -982,7 +982,7 @@ def add_course(request, course_id=None): if not is_moderator(user): raise Http404('You are not allowed to view this page') if request.method == 'POST': - form = CourseForm(request.POST, instance=course) + form = CourseForm(user, request.POST, instance=course) if form.is_valid(): new_course = form.save(commit=False) if course_id is None: @@ -994,7 +994,7 @@ def add_course(request, course_id=None): request, 'yaksh/add_course.html', {'form': form} ) else: - form = CourseForm(instance=course) + form = CourseForm(user, instance=course) return my_render_to_response( request, 'yaksh/add_course.html', {'form': form} ) |