Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-073
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-073
2022-073
Commits
dcdea8c5
Commit
dcdea8c5
authored
Nov 14, 2022
by
NilanDMeegoda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reasoning iq and attention span endpoint
parent
b51ef1fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
web-app/backend/server.py
web-app/backend/server.py
+48
-0
No files found.
web-app/backend/server.py
View file @
dcdea8c5
...
...
@@ -557,6 +557,54 @@ def getKnowledgeIQscores():
dataJson
.
append
(
dataDict
)
return
jsonify
(
dataJson
)
@
app
.
route
(
'/resoningIQSocres/'
,
methods
=
[
'GET'
])
@
cross_origin
()
def
getReasoningIQscores
():
allData
=
db
.
db
[
'reasoningIQScore'
]
.
find
()
dataJson
=
[]
for
data
in
allData
:
id
=
data
[
'_id'
]
activityName
=
data
[
'activityName'
]
candidateID
=
data
[
'candidateID'
]
questionIndex
=
data
[
'questionIndex'
]
transcription
=
data
[
'transcription'
]
score
=
data
[
'score'
]
expectedAnswer
=
data
[
'expectedAnswer'
]
dataDict
=
{
'id'
:
str
(
id
),
'activityName'
:
activityName
,
'candidateID'
:
candidateID
,
'questionIndex'
:
questionIndex
,
'transcription'
:
transcription
,
'score'
:
score
,
'expectedAnswer'
:
expectedAnswer
,
}
dataJson
.
append
(
dataDict
)
return
jsonify
(
dataJson
)
@
app
.
route
(
'/attentionSpanScores/'
,
methods
=
[
'GET'
])
@
cross_origin
()
def
getattentionSpanscores
():
allData
=
db
.
db
[
'attentionlevelScore'
]
.
find
()
dataJson
=
[]
for
data
in
allData
:
id
=
data
[
'_id'
]
activityName
=
data
[
'activityName'
]
candidateID
=
data
[
'candidateID'
]
questionIndex
=
data
[
'questionIndex'
]
attentionLevelScore
=
data
[
'attentionLevelScore'
]
createdAt
=
data
[
'createdAt'
]
dataDict
=
{
'id'
:
str
(
id
),
'activityName'
:
activityName
,
'candidateID'
:
candidateID
,
'questionIndex'
:
questionIndex
,
'attentionLevelScore'
:
attentionLevelScore
,
'createdAt'
:
createdAt
,
}
dataJson
.
append
(
dataDict
)
return
jsonify
(
dataJson
)
# @app.route("/testDB")
# def test():
# db.db.collection.insert_one({"name": "John"})
...
...
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