Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ARFA
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
ARFA
ARFA
Commits
26fb4de6
Commit
26fb4de6
authored
Nov 25, 2018
by
Rahul-chunduru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed create_test
parent
75dcee24
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
10 deletions
+72
-10
ARFA/ARFA_app/templates/ARFA_app/create_Test.html
ARFA/ARFA_app/templates/ARFA_app/create_Test.html
+4
-3
ARFA/ARFA_app/templates/ARFA_app/faculty_home.html
ARFA/ARFA_app/templates/ARFA_app/faculty_home.html
+1
-1
ARFA/ARFA_app/templates/ARFA_app/home.html
ARFA/ARFA_app/templates/ARFA_app/home.html
+4
-2
ARFA/ARFA_app/templates/ARFA_app/student_test_page.html
ARFA/ARFA_app/templates/ARFA_app/student_test_page.html
+55
-0
ARFA/ARFA_app/urls.py
ARFA/ARFA_app/urls.py
+1
-0
ARFA/ARFA_app/views.py
ARFA/ARFA_app/views.py
+7
-4
No files found.
ARFA/ARFA_app/templates/ARFA_app/create_Test.html
View file @
26fb4de6
...
@@ -24,9 +24,10 @@ Create Test
...
@@ -24,9 +24,10 @@ Create Test
{%for question in questions%}
{%for question in questions%}
<li
class=
"list-group-item"
>
<li
class=
"list-group-item"
>
<!-- <li> -->
<!-- <li> -->
<input
type=
"checkbox"
value=
"True"
name =
"{{question.q_id}}"
>
<div
class=
"row toggle"
>
<div
class=
"row toggle"
>
<div
class=
"col-xs-10"
>
<div
class=
"col-xs-10"
>
<input
type=
"checkbox"
value=
"True"
name =
"{{question.q_id}}"
>
{{question.question_text}} {{question.q_id}}
</br>
{{question.question_text}} {{question.q_id}}
</br>
</div>
</div>
</div>
</div>
...
@@ -42,8 +43,8 @@ Create Test
...
@@ -42,8 +43,8 @@ Create Test
{%endfor%}
{%endfor%}
<label>
marks
<label>
marks
<input
type=
"number"
name=
"{{question.q_id}}"
min=
"0"
max=
"10"
placeholder=
"4"
step=
"0.25"
value=
"4"
>
<input
type=
"number"
name=
"{{question.q_id}}
1
"
min=
"0"
max=
"10"
placeholder=
"4"
step=
"0.25"
value=
"4"
>
<input
type=
"number"
name=
"{{question.q_id}}"
min=
"-10"
max=
"0"
placeholder=
"-1"
step=
"0.25"
value=
"0"
>
<input
type=
"number"
name=
"{{question.q_id}}
2
"
min=
"-10"
max=
"0"
placeholder=
"-1"
step=
"0.25"
value=
"0"
>
</label>
</label>
</ul>
</ul>
...
...
ARFA/ARFA_app/templates/ARFA_app/faculty_home.html
View file @
26fb4de6
...
@@ -233,7 +233,7 @@ profile
...
@@ -233,7 +233,7 @@ profile
</p>
</p>
<!--
<button type="button" class="btn btn-login float-right">Load Test</button> -->
<button type="button" class="btn btn-login float-right">Load Test</button> -->
<h2>
<h2>
-->
-->
...
...
ARFA/ARFA_app/templates/ARFA_app/home.html
View file @
26fb4de6
...
@@ -197,11 +197,13 @@ profile
...
@@ -197,11 +197,13 @@ profile
</h2>
</h2>
<center><i
class=
"fa fa-cloud-upload fa-4x"
></i></center>
<center><i
class=
"fa fa-cloud-upload fa-4x"
></i></center>
<div
class=
"share-links"
>
<div
class=
"share-links"
>
<a
href=
"/arfa/view_my_tests"
>
<center><button
type=
"button"
class=
"btn btn-lg btn-labeled btn-success"
href=
"#"
style=
"margin-bottom: 15px;"
>
<center><button
type=
"button"
class=
"btn btn-lg btn-labeled btn-success"
href=
"#"
style=
"margin-bottom: 15px;"
>
<span
class=
"btn-label"
><i
class=
"fa fa-bell-o"
></i></span>
A FINISHED PROJECT
<span
class=
"btn-label"
><i
class=
"fa fa-bell-o"
></i></span>
Take a test
</button></center>
</button></center>
</a>
<center><button
type=
"button"
class=
"btn btn-lg btn-labeled btn-warning"
href=
"#"
>
<center><button
type=
"button"
class=
"btn btn-lg btn-labeled btn-warning"
href=
"#"
>
<span
class=
"btn-label"
><i
class=
"fa fa-bell-o"
></i></span>
A WORK IN PROGRESS
<span
class=
"btn-label"
><i
class=
"fa fa-bell-o"
></i></span>
View previous tests
</button></center>
</button></center>
</div>
</div>
</div>
</div>
...
...
ARFA/ARFA_app/templates/ARFA_app/student_test_page.html
0 → 100644
View file @
26fb4de6
{%extends 'base2.html'%}
{%block head%}
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"
>
MathJax
.
Hub
.
Config
({
tex2jax
:
{
inlineMath
:
[[
'
$
'
,
'
$
'
],
[
'
\\
(
'
,
'
\\
)
'
]]}});
</script>
{%endblock%}
{%block title%}
View personal Question
{%endblock%}
{%block body%}
<h1>
You CAN VIEW all your tests HERE student {{username}}
</h1>
<link
rel=
"stylesheet"
href=
"//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"
>
<div
class=
"container"
>
<div
class=
"panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
LIST OF QUESTIONS
</h3>
</div>
<ul
class=
"list-group"
>
<!-- <ul> -->
{%for question in questions%}
<li
class=
"list-group-item"
>
<!-- <li> -->
<div
class=
"row toggle"
>
<div
class=
"col-xs-10"
>
{{question.question_text}}
</div>
</div>
<div>
<hr></hr>
<!-- <div class="container"> -->
<!-- <div class="fluid-row"> -->
<ul>
{%for option in question.option_details%}
<!-- <div class="col-xs-1"> -->
<li>
{{option.is_answer}}
<!-- </div> -->
<!-- <div class="col-xs-5"> -->
{{option.option_text}}
<!-- </div> -->
</li>
{%endfor%}
</ul>
<!-- </div> -->
<!-- </div> -->
</div>
</li>
{%endfor%}
</ul>
</div>
</div>
{%endblock%}
\ No newline at end of file
ARFA/ARFA_app/urls.py
View file @
26fb4de6
...
@@ -18,6 +18,7 @@ urlpatterns=[
...
@@ -18,6 +18,7 @@ urlpatterns=[
url
(
r'^success_mantra'
,
views
.
success_mantra
),
url
(
r'^success_mantra'
,
views
.
success_mantra
),
url
(
r'^timetable'
,
views
.
timetable
),
url
(
r'^timetable'
,
views
.
timetable
),
url
(
r'^students'
,
views
.
students
),
url
(
r'^students'
,
views
.
students
),
url
(
r'^view_my_test'
,
views
.
students
),
url
(
r'^faculty'
,
views
.
faculty
),
url
(
r'^faculty'
,
views
.
faculty
),
url
(
r'^ContactUs'
,
views
.
ContactUs
),
url
(
r'^ContactUs'
,
views
.
ContactUs
),
url
(
r'^send_mess'
,
views
.
send_mess
),
url
(
r'^send_mess'
,
views
.
send_mess
),
...
...
ARFA/ARFA_app/views.py
View file @
26fb4de6
...
@@ -340,11 +340,14 @@ def create_Test(request):
...
@@ -340,11 +340,14 @@ def create_Test(request):
for
q
in
data
.
keys
():
for
q
in
data
.
keys
():
try
:
try
:
if
q
[
0
]
!=
'i'
:
continue
;
int
(
q
)
int
(
q
)
containsObj
.
q_ID_id
=
q
containsObj
.
q_ID_id
=
q
print
q
#data[q] is an array ['True', 'pos_marks', 'neg_marks']
#data[q] is an array ['True', 'pos_marks', 'neg_marks']
containsObj
.
marks_pos
=
data
[
q
][
1
]
containsObj
.
marks_pos
=
data
[
q
+
"1"
]
containsObj
.
marks_neg
=
data
[
q
][
2
]
containsObj
.
marks_neg
=
data
[
q
+
"2"
]
containsObj
.
pk
=
None
containsObj
.
pk
=
None
containsObj
.
save
()
containsObj
.
save
()
except
ValueError
as
e
:
except
ValueError
as
e
:
...
@@ -354,7 +357,7 @@ def create_Test(request):
...
@@ -354,7 +357,7 @@ def create_Test(request):
# for q in data:
# for q in data:
print
data
print
data
return
render
(
request
,
'ARFA_app/view_personal_Test.html'
,
args
)
def
view_personal_Test
(
request
):
def
view_personal_Test
(
request
):
...
...
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