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
5ca0fc72
Commit
5ca0fc72
authored
Nov 27, 2018
by
SANCHIT JAIN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove prints
parent
82070acd
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2617 additions
and
70 deletions
+2617
-70
ARFA/ARFA/settings.py
ARFA/ARFA/settings.py
+1
-1
ARFA/ARFA_app/migrations/0001_initial.py
ARFA/ARFA_app/migrations/0001_initial.py
+1
-1
ARFA/ARFA_app/templates/ARFA_app/performance.html
ARFA/ARFA_app/templates/ARFA_app/performance.html
+15
-6
ARFA/ARFA_app/templates/ARFA_app/student_performance.html
ARFA/ARFA_app/templates/ARFA_app/student_performance.html
+13
-5
ARFA/ARFA_app/utilities.py
ARFA/ARFA_app/utilities.py
+5
-11
ARFA/ARFA_app/views.py
ARFA/ARFA_app/views.py
+4
-46
ARFA/with_prvate_public_q.sql
ARFA/with_prvate_public_q.sql
+2578
-0
No files found.
ARFA/ARFA/settings.py
View file @
5ca0fc72
...
...
@@ -88,7 +88,7 @@ DATABASES = {
'USERNAME'
:
'arfa_username'
,
'USER'
:
'arfa_username'
,
'PASSWORD'
:
''
,
'HOST'
:
'1
27.0.0.1
'
,
'HOST'
:
'1
0.42.0.43
'
,
'PORT'
:
'5430'
}
}
...
...
ARFA/ARFA_app/migrations/0001_initial.py
View file @
5ca0fc72
# -*- coding: utf-8 -*-
# Generated by Django 1.11.1
6 on 2018-11-27 03:40
# Generated by Django 1.11.1
5 on 2018-11-27 04:14
from
__future__
import
unicode_literals
import
django.core.validators
...
...
ARFA/ARFA_app/templates/ARFA_app/performance.html
View file @
5ca0fc72
...
...
@@ -29,7 +29,7 @@ chart.draw(data, {width: 500, height: 300, title: "Scores Distribution"});
{%block body%}
<h1
style=
"text-align:center"
>
Test Performance
</h1>
<
link
rel=
"stylesheet"
href=
"//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"
>
<
!-- <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"
>
...
...
@@ -97,15 +97,24 @@ chart.draw(data, {width: 500, height: 300, title: "Scores Distribution"});
<h3
class=
"panel-title"
>
Per Question stats
</h3>
</div>
<ul
class=
"list-group"
>
{%for q in question_stats%}
{%for q
uestion
in question_stats%}
<li
class=
"list-group-item"
>
<!-- <li> -->
<div
class=
"row toggle"
>
<div
class=
"col-xs-10"
>
<p>
Difficulty set: {{q.difficulty_set}}
</p>
<p>
Difficulty observed: {{q.difficulty_observed}}
</p>
<p>
Question: {{q.question_text}}
</p>
{{question.question_text}}
</br>
<p
style=
"float:right;"
><b>
Difficulty:
</b>
{{question.difficulty_set}}
</p>
{%if question.ip%}
{%load static%}
<div
align=
"center"
>
<img
src =
"{% static "
"
%}{{
question
.
ip
|
slice:
"
16:
"
}}"
width=
"35%"
height=
"35%"
>
<p
style=
"margin-top:5px"
>
{{question.imdesc}}
</p>
</div>
{%endif%}
</div>
</div>
<div>
...
...
@@ -114,7 +123,7 @@ chart.draw(data, {width: 500, height: 300, title: "Scores Distribution"});
<!-- <div class="container"> -->
<!-- <div class="fluid-row"> -->
<ul>
{%for option in q.option_details%}
{%for option in q
uestion
.option_details%}
{%if option.is_answer %}
<li>
<p
style=
"color: green"
>
{{option.option_text}}
</p>
...
...
ARFA/ARFA_app/templates/ARFA_app/student_performance.html
View file @
5ca0fc72
...
...
@@ -120,15 +120,23 @@ chart.draw(data, {width: 500, height: 300, title: "Scores Distribution"});
<h3
class=
"panel-title"
>
Per Question stats
</h3>
</div>
<ul
class=
"list-group"
>
{%for q in question_stats%}
{%for q
uestion
in question_stats%}
<li
class=
"list-group-item"
>
<!-- <li> -->
<div
class=
"row toggle"
>
<div
class=
"col-xs-10"
>
<p>
Difficulty set: {{q.difficulty_set}}
</p>
<p>
Difficulty observed: {{q.difficulty_observed}}
</p>
<p>
Question: {{q.question_text}}
</p>
{{question.question_text}}
</br>
<p
style=
"float:right;"
><b>
Difficulty:
</b>
{{question.difficulty_set}}
</p>
{%if question.ip%}
{%load static%}
<div
align=
"center"
>
<img
src =
"{% static "
"
%}{{
question
.
ip
|
slice:
"
16:
"
}}"
width=
"35%"
height=
"35%"
>
<p
style=
"margin-top:5px"
>
{{question.imdesc}}
</p>
</div>
{%endif%}
</div>
</div>
<div>
...
...
@@ -137,7 +145,7 @@ chart.draw(data, {width: 500, height: 300, title: "Scores Distribution"});
<!-- <div class="container"> -->
<!-- <div class="fluid-row"> -->
<ul>
{%for option in q.option_details%}
{%for option in q
uestion
.option_details%}
{%if option.is_answer %}
<li>
<p
style=
"color: green"
>
{{option.option_text}}
</p>
...
...
ARFA/ARFA_app/utilities.py
View file @
5ca0fc72
...
...
@@ -31,16 +31,11 @@ def evaluate(responses, otherData):
if
len
(
responses
)
==
0
:
return
#debugging:
print
"responses:"
print
responses
#marks for each question:
#list of question ids
print
"QList"
QList
=
[
int
(
question
)
for
[(
question
,
_
)]
in
[
response
.
items
()
for
response
in
responses
]]
print
QList
#select contains objects for which test_ID=tetsID, q_ID belongs to list QList
contains
=
models
.
Contains
.
objects
.
filter
(
test_ID
=
otherData
[
'testID'
],
q_ID__in
=
QList
)
...
...
@@ -71,7 +66,6 @@ def evaluate(responses, otherData):
# evalObj.marks = 1
responseList
=
options
print
correctAnswer
if
len
(
responseList
)
==
len
(
correctAnswer
)
and
sorted
(
responseList
)
==
sorted
(
correctAnswer
):
evalObj
.
marks
=
marksDict
[
question
][
0
]
#0 - first in the list, marks_pos
...
...
@@ -208,7 +202,6 @@ def result_analysis(request,test_ID):
def
get_questions_dict
(
cursor
):
rows
=
cursor
.
fetchall
()
print
rows
columns
=
[
col
[
0
]
for
col
in
cursor
.
description
]
res
=
[]
options_so_far
=
[]
...
...
@@ -237,9 +230,10 @@ def get_questions_dict(cursor):
def
get_responses_side_by_side
(
test
,
student
):
cursor
=
connection
.
cursor
()
cursor
.
execute
(
''' SELECT q."q_ID" as q_ID,q.question_text,
cursor
.
execute
(
''' SELECT q."q_ID" as q_ID,q.question_text,
q.image as ip , q."imageDesc" as imdesc,
o."option_Value" as option_details,o."is_Answer"
FROM "ARFA_app_contains" as c,"ARFA_app_question" as q,
FROM "ARFA_app_contains" as c, ("ARFA_app_question" as u LEFT OUTER JOIN "ARFA_app_questionimage" as v ON
u."q_ID" = v."q_ID_id") as q,
"ARFA_app_options" as o, "ARFA_app_subject" as s
WHERE o."q_ID_id" = q."q_ID" and c."q_ID_id" = q."q_ID" and q."subject_ID_id" = s."subject_ID"
and c."test_ID_id" =
%
s
...
...
ARFA/ARFA_app/views.py
View file @
5ca0fc72
...
...
@@ -242,7 +242,6 @@ def studentTestHome(request):
data
[
'username'
]
=
username
data
[
'is_session'
]
=
True
data
[
'activeTests'
]
=
[]
#data['activeTests'] is a list of dicts. Each dict contains info about a test
for
t
in
activeTests
:
hasTaken
=
models
.
Takes
.
objects
.
filter
(
test_ID_id
=
t
.
test_ID
,
student_id
=
username
)
.
exists
()
data
[
'activeTests'
]
.
append
({
'test_ID'
:
t
.
test_ID
,
'test_name'
:
t
.
test_name
,
...
...
@@ -441,34 +440,7 @@ def create_Test(request):
data
.
pop
(
'csrfmiddlewaretoken'
)
if
not
data
:
#only csrf token was sent, display create test page
return
render
(
request
,
'ARFA_app/create_Test.html'
,
args
)
print
data
form
=
forms
.
TestForm
(
request
.
POST
)
#A failed attempt to make html datetimeinput work.
#refer to this when you want to try again.
# """dirty workaround"""
# #the data in request.POST must be modified to be valid in the form
# data['start_time'] = data['start_time'][0].replace('T', ' ') #remove the 'T' in HTML returned string
# data['expected_time_for_completion'] = data['expected_time_for_completion'][0]+":00"
# #add seconds to duration string
# data['max_marks'] = int(data['max_marks'][0]) #convert max_marks from string to int
# #if these are not in these exact formats everything may break.
# #see form cleanup for a potentially better solution
# qdict = QueryDict("", mutable=True)
# qdict.update(data)
# form2 = forms.TestForm(request.POST)
# print "form2:"
# print vars(form2)
# print "\n\n\n"
# #debug
# print "start time"
# print form
# print vars(form)
# #debug
max_marks
=
0
test
=
None
...
...
@@ -519,18 +491,13 @@ def create_Test(request):
containsObj
.
pk
=
None
containsObj
.
save
()
print
"success"
print
containsObj
except
ValueError
as
e
:
data
.
pop
(
q
)
print
e
continue
#schedule ranking function when test is finished
print
type
(
test
.
start_time
)
print
type
(
test
.
expected_time_for_completion
)
tasks
.
testRanks
(
test
.
test_ID
,
schedule
=
(
test
.
start_time
+
test
.
expected_time_for_completion
))
print
test
.
start_time
+
test
.
expected_time_for_completion
print
"testRanks being called
\n\n\n\n
"
return
view_personal_Test
(
request
)
...
...
@@ -566,7 +533,6 @@ def add_question(request):
try
:
question_data
=
dict
(
json
.
loads
(
request
.
POST
[
'client_response'
]))
args
=
question_data
[
'question_data'
]
print
args
[
'question_text'
]
if
args
[
'question_text'
]
==
''
:
print
'failed'
return
HttpResponse
(
json
.
dumps
({
'status'
:
'Failed'
,
'reason'
:
'No question provided'
}))
...
...
@@ -608,7 +574,6 @@ def view_personal_Test(request):
WHERE c."test_ID_id" = t."test_ID" and c.faculty_id =
%
s
order by t.start_time desc '''
,[
request
.
session
[
'username'
]])
rows
=
cursor
.
fetchall
()
print
rows
columns
=
[
col
[
0
]
for
col
in
cursor
.
description
]
res
=
[]
for
val
in
rows
:
...
...
@@ -630,7 +595,6 @@ def view_all_Test(request):
WHERE t.start_time < current_timestamp
order by t.start_time desc '''
)
rows
=
cursor
.
fetchall
()
print
rows
columns
=
[
col
[
0
]
for
col
in
cursor
.
description
]
res
=
[]
for
val
in
rows
:
...
...
@@ -645,23 +609,17 @@ def analyse_test(request):
return
render
(
request
,
'ARFA_app/login.html'
)
test_ID
=
0
print
request
.
POST
if
request
.
method
==
"GET"
:
test_ID
=
request
.
GET
[
"test_ID"
]
if
request
.
method
==
"POST"
:
test_ID
=
request
.
POST
[
"test_ID"
]
print
"test_ID"
print
test_ID
test
=
models
.
Test
.
objects
.
filter
(
test_ID
=
test_ID
,
start_time__lte
=
datetime
.
timedelta
(
minutes
=
5
)
+
datetime
.
datetime
.
now
()
-
F
(
'expected_time_for_completion'
))
.
all
()
# n = models.Created_BY().objects.filter(test_ID=test).all()
# print datetime.timedelta(minutes=5) + datetime.datetime.now() - F('expected_time_for_completion')
if
len
(
test
)
==
0
:
return
HttpResponse
(
"test does not exist/not completed"
)
# if test[0].start_time < datetime.datetime.now():
args
=
result_analysis
(
request
,
test_ID
)
args
.
update
(
request
.
session
.
get
(
'args'
,
None
))
return
render
(
request
,
'ARFA_app/performance.html'
,
args
)
...
...
@@ -681,7 +639,7 @@ def student_results(request):
test_ID
=
request
.
POST
[
"test_ID"
]
test
=
models
.
Test
.
objects
.
filter
(
test_ID
=
test_ID
,
start_time__lte
=
datetime
.
timedelta
(
minutes
=
5
)
+
datetime
.
datetime
.
now
()
-
F
(
'expected_time_for_completion'
))
.
all
()
start_time__lte
=
-
datetime
.
timedelta
(
minutes
=
5
)
+
datetime
.
datetime
.
now
()
-
F
(
'expected_time_for_completion'
))
.
all
()
if
len
(
test
)
==
0
:
...
...
@@ -727,7 +685,7 @@ def student_responses(request):
test
=
models
.
Test
.
objects
.
filter
(
test_ID
=
test_ID
,
start_time__lte
=
datetime
.
timedelta
(
minutes
=
5
)
+
datetime
.
datetime
.
now
()
-
F
(
'expected_time_for_completion'
))
.
all
()
start_time__lte
=
-
datetime
.
timedelta
(
minutes
=
5
)
+
datetime
.
datetime
.
now
()
-
F
(
'expected_time_for_completion'
))
.
all
()
if
len
(
test
)
==
0
:
...
...
ARFA/with_prvate_public_q.sql
0 → 100644
View file @
5ca0fc72
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.14
-- Dumped by pg_dump version 9.5.14
SET
statement_timeout
=
0
;
SET
lock_timeout
=
0
;
SET
client_encoding
=
'UTF8'
;
SET
standard_conforming_strings
=
on
;
SELECT
pg_catalog
.
set_config
(
'search_path'
,
''
,
false
);
SET
check_function_bodies
=
false
;
SET
client_min_messages
=
warning
;
SET
row_security
=
off
;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE
EXTENSION
IF
NOT
EXISTS
plpgsql
WITH
SCHEMA
pg_catalog
;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT
ON
EXTENSION
plpgsql
IS
'PL/pgSQL procedural language'
;
SET
default_tablespace
=
''
;
SET
default_with_oids
=
false
;
--
-- Name: ARFA_app_contactus; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_contactus"
(
id
integer
NOT
NULL
,
name
character
varying
(
200
)
NOT
NULL
,
phone_number
character
varying
(
10
)
NOT
NULL
,
"email_ID"
character
varying
(
200
)
NOT
NULL
,
text
character
varying
(
200
)
NOT
NULL
);
ALTER
TABLE
public
.
"ARFA_app_contactus"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_contactus_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_contactus_id_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_contactus_id_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_contactus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_contactus_id_seq"
OWNED
BY
public
.
"ARFA_app_contactus"
.
id
;
--
-- Name: ARFA_app_contains; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_contains"
(
id
integer
NOT
NULL
,
marks_pos
double
precision
,
marks_neg
double
precision
,
"q_ID_id"
integer
,
"test_ID_id"
integer
);
ALTER
TABLE
public
.
"ARFA_app_contains"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_contains_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_contains_id_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_contains_id_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_contains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_contains_id_seq"
OWNED
BY
public
.
"ARFA_app_contains"
.
id
;
--
-- Name: ARFA_app_created_by; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_created_by"
(
id
integer
NOT
NULL
,
faculty_id
character
varying
(
200
),
"test_ID_id"
integer
);
ALTER
TABLE
public
.
"ARFA_app_created_by"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_created_by_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_created_by_id_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_created_by_id_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_created_by_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_created_by_id_seq"
OWNED
BY
public
.
"ARFA_app_created_by"
.
id
;
--
-- Name: ARFA_app_evaluation; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_evaluation"
(
id
integer
NOT
NULL
,
marks
double
precision
,
"q_ID_id"
integer
,
student_id
character
varying
(
200
),
"test_ID_id"
integer
);
ALTER
TABLE
public
.
"ARFA_app_evaluation"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_evaluation_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_evaluation_id_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_evaluation_id_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_evaluation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_evaluation_id_seq"
OWNED
BY
public
.
"ARFA_app_evaluation"
.
id
;
--
-- Name: ARFA_app_faculty; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_faculty"
(
name
character
varying
(
200
)
NOT
NULL
,
phone_number
character
varying
(
10
)
NOT
NULL
,
"email_ID"
character
varying
(
200
)
NOT
NULL
,
address
character
varying
(
400
)
NOT
NULL
,
username
character
varying
(
200
)
NOT
NULL
,
password
character
varying
(
200
)
NOT
NULL
,
salary
integer
NOT
NULL
,
"subject_ID_id"
character
varying
(
20
)
NOT
NULL
);
ALTER
TABLE
public
.
"ARFA_app_faculty"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_options; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_options"
(
id
integer
NOT
NULL
,
"option_ID"
integer
NOT
NULL
,
"option_Value"
character
varying
(
1000
)
NOT
NULL
,
"is_Answer"
boolean
NOT
NULL
,
"q_ID_id"
integer
NOT
NULL
);
ALTER
TABLE
public
.
"ARFA_app_options"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_options_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_options_id_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_options_id_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_options_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_options_id_seq"
OWNED
BY
public
.
"ARFA_app_options"
.
id
;
--
-- Name: ARFA_app_question; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_question"
(
"q_ID"
integer
NOT
NULL
,
topic
character
varying
(
20
)
NOT
NULL
,
subtopic
character
varying
(
20
)
NOT
NULL
,
time_stamp
timestamp
with
time
zone
NOT
NULL
,
source
character
varying
(
200
)
NOT
NULL
,
difficulty_set
character
varying
(
20
)
NOT
NULL
,
difficulty_observed
character
varying
(
20
)
NOT
NULL
,
question_text
character
varying
(
1000
)
NOT
NULL
,
num_appeared
integer
NOT
NULL
,
num_correct
integer
NOT
NULL
,
visibility
character
varying
(
20
)
NOT
NULL
,
ownership
character
varying
(
20
)
NOT
NULL
,
faculty_id
character
varying
(
200
),
"subject_ID_id"
character
varying
(
20
)
NOT
NULL
);
ALTER
TABLE
public
.
"ARFA_app_question"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_question_q_ID_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_question_q_ID_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_question_q_ID_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_question_q_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_question_q_ID_seq"
OWNED
BY
public
.
"ARFA_app_question"
.
"q_ID"
;
--
-- Name: ARFA_app_questionimage; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_questionimage"
(
image_id
integer
NOT
NULL
,
image
character
varying
(
100
)
NOT
NULL
,
"imageDesc"
character
varying
(
100
)
NOT
NULL
,
"orderNum"
integer
NOT
NULL
,
"q_ID_id"
integer
);
ALTER
TABLE
public
.
"ARFA_app_questionimage"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_questionimage_image_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_questionimage_image_id_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_questionimage_image_id_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_questionimage_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_questionimage_image_id_seq"
OWNED
BY
public
.
"ARFA_app_questionimage"
.
image_id
;
--
-- Name: ARFA_app_responses; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_responses"
(
id
integer
NOT
NULL
,
"Response_value"
boolean
NOT
NULL
,
"option_ID_id"
integer
NOT
NULL
,
"q_ID_id"
integer
NOT
NULL
,
"student_ID_id"
character
varying
(
200
)
NOT
NULL
,
"test_ID_id"
integer
NOT
NULL
);
ALTER
TABLE
public
.
"ARFA_app_responses"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_responses_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_responses_id_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_responses_id_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_responses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_responses_id_seq"
OWNED
BY
public
.
"ARFA_app_responses"
.
id
;
--
-- Name: ARFA_app_student; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_student"
(
name
character
varying
(
200
)
NOT
NULL
,
phone_number
character
varying
(
10
)
NOT
NULL
,
"email_ID"
character
varying
(
200
)
NOT
NULL
,
address
character
varying
(
400
)
NOT
NULL
,
username
character
varying
(
200
)
NOT
NULL
,
password
character
varying
(
200
)
NOT
NULL
,
"Standard"
integer
NOT
NULL
);
ALTER
TABLE
public
.
"ARFA_app_student"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_subject; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_subject"
(
"subject_ID"
character
varying
(
20
)
NOT
NULL
,
subject
character
varying
(
20
)
NOT
NULL
);
ALTER
TABLE
public
.
"ARFA_app_subject"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_takes; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_takes"
(
id
integer
NOT
NULL
,
time_stamp
timestamp
with
time
zone
NOT
NULL
,
total_marks
double
precision
,
rank
integer
NOT
NULL
,
student_id
character
varying
(
200
),
"test_ID_id"
integer
);
ALTER
TABLE
public
.
"ARFA_app_takes"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_takes_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_takes_id_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_takes_id_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_takes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_takes_id_seq"
OWNED
BY
public
.
"ARFA_app_takes"
.
id
;
--
-- Name: ARFA_app_test; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
"ARFA_app_test"
(
"test_ID"
integer
NOT
NULL
,
test_name
character
varying
(
200
)
NOT
NULL
,
expected_time_for_completion
interval
NOT
NULL
,
start_time
timestamp
with
time
zone
NOT
NULL
,
max_marks
integer
);
ALTER
TABLE
public
.
"ARFA_app_test"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_test_test_ID_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
"ARFA_app_test_test_ID_seq"
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
TABLE
public
.
"ARFA_app_test_test_ID_seq"
OWNER
TO
arfa_username
;
--
-- Name: ARFA_app_test_test_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: arfa_username
--
ALTER
SEQUENCE
public
.
"ARFA_app_test_test_ID_seq"
OWNED
BY
public
.
"ARFA_app_test"
.
"test_ID"
;
--
-- Name: auth_group; Type: TABLE; Schema: public; Owner: arfa_username
--
CREATE
TABLE
public
.
auth_group
(
id
integer
NOT
NULL
,
name
character
varying
(
80
)
NOT
NULL
);
ALTER
TABLE
public
.
auth_group
OWNER
TO
arfa_username
;
--
-- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: arfa_username
--
CREATE
SEQUENCE
public
.
auth_group_id_seq
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE