Commit afc7b2d4 authored by Samarth Joshi's avatar Samarth Joshi

Merge conflicts

parents 873350ff 8eb58ae2
No preview for this file type
......@@ -11,6 +11,7 @@ from . newQuiz import readCSV
from .models import quiz
from django.db.models import Max
from django.shortcuts import redirect
from .models import result as results
import csv
#for login
from django.contrib.auth.models import User
......@@ -63,6 +64,8 @@ def result(request):
score-=q[0]['negative']
t=submission(questionId=questionInstance, option=request.POST[questionno], studentId=request.user, quizId=quizInstance)
t.save()
t=results(quizId=quizInstance,studentId=request.user,marks=int(score))
t.save()
return redirect('/view_submission/?q='+str(quizId))
else:
return HttpResponse("You have already submitted this quiz")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment