Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pariksha
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roshan Rabinarayan
Pariksha
Commits
d9c8ce6a
Commit
d9c8ce6a
authored
Nov 06, 2020
by
Samarth Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
student.html and professor.html added
parent
67496fdb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
8 deletions
+20
-8
db.sqlite3
db.sqlite3
+0
-0
quiz/__pycache__/views.cpython-38.pyc
quiz/__pycache__/views.cpython-38.pyc
+0
-0
quiz/templates/professor.html
quiz/templates/professor.html
+12
-1
quiz/templates/student.html
quiz/templates/student.html
+0
-2
quiz/views.py
quiz/views.py
+8
-5
No files found.
db.sqlite3
View file @
d9c8ce6a
No preview for this file type
quiz/__pycache__/views.cpython-38.pyc
View file @
d9c8ce6a
No preview for this file type
quiz/templates/professor.html
View file @
d9c8ce6a
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>
quiz/templates/student.html
View file @
d9c8ce6a
...
...
@@ -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>
quiz/views.py
View file @
d9c8ce6a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment