diff options
author | ankitjavalkar | 2018-07-11 17:19:56 +0530 |
---|---|---|
committer | ankitjavalkar | 2018-07-13 13:00:36 +0530 |
commit | e7c18d17c8b5ed193e4e34bdfe2072951d996530 (patch) | |
tree | abe3e154790aab9213ede12336a06f544ddbc79b /yaksh/views.py | |
parent | 69a07a92309105b289f4d08957729bda68727bf2 (diff) | |
download | online_test-e7c18d17c8b5ed193e4e34bdfe2072951d996530.tar.gz online_test-e7c18d17c8b5ed193e4e34bdfe2072951d996530.tar.bz2 online_test-e7c18d17c8b5ed193e4e34bdfe2072951d996530.zip |
Fix tests
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index bda2774..ecd7efd 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -30,7 +30,7 @@ from yaksh.code_server import get_result as get_result_from_code_server from yaksh.models import ( Answer, AnswerPaper, AssignmentUpload, Course, FileUpload, Profile, QuestionPaper, QuestionSet, Quiz, Question, TestCase, User, - FIXTURES_DIR_PATH, Lesson, LessonFile, LearningUnit, LearningModule, + FIXTURES_DIR_PATH, MOD_GROUP_NAME, Lesson, LessonFile, LearningUnit, LearningModule, CourseStatus ) from yaksh.forms import ( @@ -63,7 +63,7 @@ def my_render_to_response(request, template, context=None, **kwargs): return render(request, template, context, **kwargs) -def is_moderator(user, group_name='moderator'): +def is_moderator(user, group_name=MOD_GROUP_NAME): """Check if the user is having moderator rights""" try: group = Group.objects.get(name=group_name) @@ -74,7 +74,7 @@ def is_moderator(user, group_name='moderator'): return False -def add_as_moderator(users, group_name='moderator'): +def add_as_moderator(users, group_name=MOD_GROUP_NAME): """ add users to moderator group """ try: group = Group.objects.get(name=group_name) |