You need to sign in or sign up before continuing.
Commit d9c8ce6a authored by Samarth Joshi's avatar Samarth Joshi

student.html and professor.html added

parent 67496fdb
No preview for this file type
test
\ No newline at end of file
<!DOCTYPE html>
<head>
<title>Pariksha</title>
</head>
<body>
<center><h1><a>Welcome Professor {{user}}</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>
</body>
</html>
......@@ -8,7 +8,5 @@
<center><h1><a>Welcome Student{{user}}</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>
</body>
</html>
......@@ -99,11 +99,14 @@ def upload(request):
@login_required
def student(request):
role = Permission.objects.all().filter(userId=request.user).values('role')[0];
if role and role == "S":
return render(request,'student.html')
else:
return render(request,'professor.html')
role = Permission.objects.all().filter(userId=request.user).values('role')[0]['role'];
print(role)
if role:
if role == "S":
return render(request,'student.html')
else:
return render(request,'professor.html')
return HttpResponse('Role not configured in Permission table')
def upload_file(request):
uploaded=False
......
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