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
524528a3
Commit
524528a3
authored
Nov 13, 2020
by
Samarth Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding download csv template in upload.html
parent
710cf218
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
27 deletions
+77
-27
quiz/static/assets/upload_template.csv
quiz/static/assets/upload_template.csv
+1
-0
quiz/templates/upload.html
quiz/templates/upload.html
+74
-25
quiz/views.py
quiz/views.py
+2
-2
No files found.
quiz/static/assets/upload_template.csv
0 → 100644
View file @
524528a3
Question,OptionA,OptionB,OptionC,OptionD,Correct Option Index (Starts from 0),Question Type,Marks,Negative Marks,Explanation
\ No newline at end of file
quiz/templates/upload.html
View file @
524528a3
...
...
@@ -6,9 +6,58 @@
<link
href=
"{% static 'css/quiz_attempt_page.css' %}"
rel=
"stylesheet"
>
<link
href=
"{% static 'css/quiz_create_page.css' %}"
rel=
"stylesheet"
>
<script
src=
"{% static 'js/quiz_create_page.js' %}"
></script>
<style>
.flow
{
border
:
solid
2px
#3F51B5
;
background-color
:
white
;
border-radius
:
1em
;
margin-bottom
:
200px
;
box-shadow
:
#999999
3px
5px
6px
;
}
.step
{
margin
:
40px
;
}
button
{
padding
:
15px
;
font-size
:
1em
;
font-weight
:
bold
;
width
:
200px
;
background-color
:
white
;
border
:
solid
2px
#3F51B5
;
cursor
:
pointer
;
border-radius
:
6px
;
color
:
#3F51B5
;
transition
:
background-color
0.2s
ease
,
color
0.2s
ease
;
}
button
>
a
{
display
:
block
;
}
.custom-file-upload
{
display
:
block
;
text-align
:
center
;
padding
:
15px
;
font-size
:
1em
;
font-weight
:
bold
;
width
:
166px
;
cursor
:
pointer
;
background-color
:
white
;
border
:
solid
2px
#3F51B5
;
border-radius
:
6px
;
color
:
#3F51B5
;
transition
:
background-color
0.2s
ease
,
color
0.2s
ease
;
}
button
:hover
,
.custom-file-upload
:hover
{
background-color
:
#3F51B5
;
border
:
solid
2px
#3F51B5
;
color
:
white
}
input
[
type
=
"file"
]
{
display
:
none
;
}
</style>
</head>
<body>
<a
href=
"{% url "
logout
"
%}?
next=
/"
>
logout
</a>
<form
name =
"form"
enctype =
"multipart/form-data"
action =
"{% url "
uploaded
"
%}"
method =
"POST"
id=
"quiz_create_form"
>
{% csrf_token %}
...
...
@@ -35,33 +84,33 @@
</div>
</div>
</div>
<br>
<div
style =
"max-width:470px;"
>
<center>
<input
type =
"file"
style =
"margin-left:20%;"
placeholder =
"file"
name =
"file"
id=
/
>
</center>
</div>
<br>
<div
style =
"max-width:470px;"
>
<center>
<button
style =
"border:0px;background-color:#4285F4; margin-top:8%;
height:35px; width:80%; margin-left:19%;"
type =
"submit"
value =
"Login"
>
<strong>
Upload The Quiz
</strong>
</button>
</center>
<div
class=
"flow"
>
<section
class=
"step"
>
<h1>
Step 1: Download Quiz Template
</h1>
<a
href=
"{% static 'assets/upload_template.csv' %}"
download=
"upload_template.csv"
><button
type=
"button"
>
Download CSV
</button></a>
</section>
<hr/>
<section
class=
"step"
>
<h1>
Step 2: Open downloaded csv file and add questions in each row
</h1>
<p>
Format is as follows: (also specified inside the csv file)
</p>
<p>
Question | OptionA | OptionB | OptionC | OptionD | CorrectOption | QuestionType | Marks | NegativeMarks | Explanation
</p>
</section>
<hr/>
<section
class=
"step"
>
<h1>
Step 3: Upload the modified document
</h1>
<label
class=
"custom-file-upload"
><input
type=
"file"
placeholder=
"file"
name=
"file"
id=
/
>
Upload
</label>
</section>
<hr/>
<section
class=
"step"
>
<h1>
Step 4: After uploading the document click on Submit to create the quiz.
</h1>
<button
type =
"submit"
>
<strong>
Submit
</strong>
</button>
</section>
</div>
<br><br>
</form>
<a
href=
'/instructor?quiz_id=0'
>
For analysis
</a>
<br><h1></h1>
</body>
</html>
\ No newline at end of file
quiz/views.py
View file @
524528a3
...
...
@@ -291,5 +291,5 @@ def add_quiz(request):
return
HttpResponse
(
'sucess'
)
#(request,'success')
def
monitor
(
request
):
quizzes
=
quiz
.
objects
.
all
()
.
filter
(
quizInstructor
=
request
.
user
.
id
)
.
values
(
'quizId'
,
'quizCode'
,
'quizInstructor
'
)
return
render
(
request
,
'monitor.html'
)
allquizs
=
quiz
.
objects
.
all
()
.
filter
(
quizInstructor
=
request
.
user
)
.
order_by
(
'-date'
,
'-startTime
'
)
return
render
(
request
,
'monitor.html'
,
{
'quizs'
:
allquizs
}
)
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