Commit 5690254b authored by Samarth Joshi's avatar Samarth Joshi

Merging conflicts

parents c7fbda92 2117467a
...@@ -8,9 +8,10 @@ ...@@ -8,9 +8,10 @@
<h1>Hello Everyone</h1> <h1>Hello Everyone</h1>
<form><input type="hidden" id="quizId" name="quizId" value="123"></form> <form><input type="hidden" id="quizId" name="quizId" value="123"></form>
<div id="dashboard"> <div id="dashboard">
{{ graph|safe }} {{quiz_id}}
{{ graph1|safe }} {{graph|safe}}
{{ graph2|safe }} {{graph1|safe}}
{{graph2|safe}}
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -141,13 +141,15 @@ def upload_file(request): ...@@ -141,13 +141,15 @@ def upload_file(request):
def instructor(request): def instructor(request):
q_id = request.GET['quizId'] print('Hello World')
students = result.objects.all().filter(quizId=q_id).values('studentId') q_id = request.GET['quiz_id']
marks = result.objects.all().filter(quizId=q_id).values('marks') print(q_id)
students = results.objects.all().filter(quizId=q_id).values('studentId')
marks = results.objects.all().filter(quizId=q_id).values('marks')
fig, ax = plt.subplots() fig, ax = plt.subplots()
ax.scatter([1, 10], [5, 9]) ax.scatter([1, 10], [5, 9])
html_graph = mpld3.fig_to_html(fig) html_graph = mpld3.fig_to_html(fig)
return render(request, 'instructor.html', {"graph": html_graph, "graph1": html_graph, "graph2": html_graph}) return render(request, 'instructor.html',{"graph": html_graph, "graph1": html_graph, "graph2": html_graph,'quiz_id':q_id})
def handle_uploaded_file(f,q1): def handle_uploaded_file(f,q1):
......
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