diff options
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 02019f4..daa81eb 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -30,7 +30,6 @@ from yaksh.forms import UserRegisterForm, UserLoginForm, QuizForm,\ QuestionFilterForm, CourseForm, ProfileForm, UploadFileForm,\ get_object_form, FileForm, QuestionPaperForm from .settings import URL_ROOT -from django.conf import settings from yaksh.models import AssignmentUpload from .file_utils import extract_files @@ -950,18 +949,6 @@ def show_all_questions(request): context_instance=ci) @login_required -def download_demo_questions(request): - user = request.user - if not is_moderator(user): - raise Http404("You are not allowed to download!") - f_path = os.path.join(settings.FIXTURE_DIRS, "demo_questions.zip") - zip_file = open(f_path, "rb") - response = HttpResponse(zip_file, content_type='application/zip') - response['Content-Disposition'] = '''attachment;\ - filename=demo_questions.zip''' - return response - -@login_required def user_data(request, user_id, questionpaper_id=None): """Render user data.""" current_user = request.user |