Commit 48f3dc07 authored by Samarth Joshi's avatar Samarth Joshi
parents 8f67c297 764f54d0
......@@ -34,6 +34,7 @@ urlpatterns = [
path('result/',a.result,name="result"),
url(r'^upload/',TemplateView.as_view(template_name = 'upload.html')),
url('instructor/',a.instructor),
url('quizTable/',a.quizTable),
path('uploaded/',a.upload_file,name="uploaded"), path('sign_up/',a.sign_up,name="sign-up"), path('accounts/',include('django.contrib.auth.urls')),
path('create_quiz/',a.create_quiz),
path('add_quiz/',a.add_quiz),
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<table >
<th>Quiz Id</th><th>Start Time</th><th>Date</th><th>Quiz Length</th><th>Quiz Code</th><th>Quiz Done</th><th>Quiz Info</th><th>Quiz Instructor</th>
{%for q in quizs%}
<tr>
<td>{{q.quizId}}</td>
<td>{{q.startTime}}</td>
<td>{{q.date}}</td>
<td>{{q.length}}</td>
<td>{{q.quizCode}}</td>
<td>{{q.quizDone}}</td>
<td>{{q.quizInfo}}</td>
<td>{{q.quizInstructor}}</td>
</tr>
{%endfor%}
</table>
</body>
</html>
\ No newline at end of file
......@@ -159,6 +159,9 @@ def instructor(request):
html_graph1 = mpld3.fig_to_html(fig1)
return render(request, 'instructor.html',{"graph": html_graph, "graph1": html_graph, "graph2": html_graph1,'quiz_id':q_id,'cribs':cribbs})
def quizTable(request):
quizs = quiz.objects.filter(quizInstructor=request.user).all()
return render(request,'quizTable.html',{'quiz':quizs})
def handle_uploaded_file(f,q1):
with open('name.csv', 'wb+') as destination:
......
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