summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorprathamesh2016-10-04 17:22:20 +0530
committerprathamesh2016-10-04 17:22:20 +0530
commit9c14e2b2026074234d9c977ca17b0c96b0789f6b (patch)
tree8b6c8e2438563e56631c2adf986e7cb16c33afb4 /yaksh/views.py
parentc5ae3d4589a71c3f3b9f622c7b67a04277269cde (diff)
parent91dd42214ba5ad88c5158b50a7746caa3841a883 (diff)
downloadonline_test-9c14e2b2026074234d9c977ca17b0c96b0789f6b.tar.gz
online_test-9c14e2b2026074234d9c977ca17b0c96b0789f6b.tar.bz2
online_test-9c14e2b2026074234d9c977ca17b0c96b0789f6b.zip
Merge branch 'master' of https://github.com/FOSSEE/online_test into edit_questionpaper
Resolved Conflicts: yaksh/views.py
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index f25a685..049788a 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -21,6 +21,7 @@ from taggit.models import Tag
from itertools import chain
import json
import zipfile
+import six
# Local imports.
from yaksh.models import get_model_class, Quiz, Question, QuestionPaper, QuestionSet, Course
from yaksh.models import Profile, Answer, AnswerPaper, User, TestCase, FileUpload,\
@@ -29,9 +30,9 @@ from yaksh.forms import UserRegisterForm, UserLoginForm, QuizForm,\
QuestionForm, RandomQuestionForm,\
QuestionFilterForm, CourseForm, ProfileForm, UploadFileForm,\
get_object_form, FileForm, QuestionPaperForm
-from settings import URL_ROOT
+from .settings import URL_ROOT
from yaksh.models import AssignmentUpload
-from file_utils import extract_files
+from .file_utils import extract_files
@@ -1070,7 +1071,7 @@ def grade_user(request, quiz_id=None, user_id=None, attempt_number=None):
if request.method == "POST":
papers = data['papers']
for paper in papers:
- for question, answers in paper.get_question_answers().iteritems():
+ for question, answers in six.iteritems(paper.get_question_answers()):
marks = float(request.POST.get('q%d_marks' % question.id, 0))
answers = answers[-1]
answers.set_marks(marks)