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
c9a9bb46
Commit
c9a9bb46
authored
Nov 14, 2022
by
randi480
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mental chronometry dashboard score route
parent
b5c9d309
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
web-app/backend/server.py
web-app/backend/server.py
+35
-1
web-app/frontend/src/components/activities/mentalChronometryEval/pairCancerlation/PairCancerlationContainer.jsx
...ometryEval/pairCancerlation/PairCancerlationContainer.jsx
+1
-1
No files found.
web-app/backend/server.py
View file @
c9a9bb46
...
...
@@ -432,6 +432,8 @@ def predictArithmetic():
return
jsonify
({
'error: Error during pipeline execution'
})
return
jsonify
({
'result: test'
})
# Mental Chronometry data management
@
app
.
route
(
'/mentalChromScores'
,
methods
=
[
'POST'
])
@
cross_origin
()
...
...
@@ -446,7 +448,7 @@ def mentalChromScores():
totalTime
=
body
[
'totalTime'
]
candidateID
=
body
[
'candidateID'
]
answerImage
=
body
[
'answerImage'
]
# db.users.insert_one({
db
.
db
[
'mentalChronomrtryScore'
]
.
insert_one
({
"activityName"
:
activityName
,
"score"
:
score
,
...
...
@@ -461,6 +463,38 @@ def mentalChromScores():
'status'
:
'MentalCrom scores are added to the system successfully!'
,
})
@
app
.
route
(
'/mentalChronometryScores/'
,
methods
=
[
'GET'
])
@
cross_origin
()
def
getMentalChromScores
():
allData
=
db
.
db
[
'mentalChronomrtryScore'
]
.
find
()
dataJson
=
[]
for
data
in
allData
:
id
=
data
[
'_id'
]
activityName
=
data
[
'activityName'
]
score
=
data
[
'score'
]
actualResult
=
data
[
'actualResult'
]
predResult
=
data
[
'predResult'
]
createdTime
=
data
[
'createdTime'
]
totalTime
=
data
[
'totalTime'
]
candidateID
=
data
[
'candidateID'
]
answerImage
=
data
[
'answerImage'
]
dataDict
=
{
'id'
:
str
(
id
),
'activityName'
:
activityName
,
'score'
:
score
,
'actualResult'
:
actualResult
,
'predResult'
:
predResult
,
'createdTime'
:
createdTime
,
'totalTime'
:
totalTime
,
'candidateID'
:
candidateID
,
'answerImage'
:
answerImage
}
dataJson
.
append
(
dataDict
)
return
jsonify
(
dataJson
)
# Knowledge IQ evaluation
@
app
.
route
(
'/predictKnowledgeIq'
,
methods
=
[
'POST'
,
'GET'
])
@
cross_origin
()
...
...
web-app/frontend/src/components/activities/mentalChronometryEval/pairCancerlation/PairCancerlationContainer.jsx
View file @
c9a9bb46
...
...
@@ -190,7 +190,7 @@ const PairCancerlationContainer = () => {
{
"
"
}
<
div
>
{
"
"
}
<
img
src=
{
Pair
[
activityIndex
]
}
alt=
"description"
/>
{
"
"
}
<
img
src=
{
Pair
[
activityIndex
]
}
/>
{
"
"
}
</
div
>
</
div
>
<
div
className=
"grid grid-cols-1 h-fit m-10"
>
...
...
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