Commit 1b948e42 authored by Samarth Joshi's avatar Samarth Joshi

Getting quiz id and starting that quiz (Start quiz button)

parent 8c7ae3b6
......@@ -6,7 +6,7 @@
</head>
<body>
<center><h1><a>Welcome Student{{user}}</a></h1>
<br><h1><a href="/quiz/">Start Quiz</a></h1>
<br><h1><a href="/quiz/?q=0">Start Quiz</a></h1>
<br><h1><a href="/submissions/">View Previous Quizzes</a></h1>
<br><h1><a href="/create_quiz/">Create New Quiz</a></h1>
<br><h1><a href="/instructor?quiz_id=0">Instructor Graphs</a></h1></center>
......
......@@ -37,7 +37,8 @@ negative=[]
def index(request):
quizInstance = quiz.objects.get(pk=0)
quiz_id = int(request.GET['q'])
quizInstance = quiz.objects.get(pk=quiz_id)
obj = Questions.objects.filter(quizId=quizInstance).all().order_by('questionId')
endtime = quizInstance.end_datetime
endtime = json.dumps(endtime.isoformat())
......
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