Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
knowledge-platform
Commits
e8be5b00
Commit
e8be5b00
authored
5 years ago
by
Pradyumna Nagendra
Browse files
Options
Download
Patches
Plain Diff
Issue #devcon fix: School API fix
parent
4ff0954b
devcon-2020
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
learning-api/content-service/app/controllers/v3/TeacherController.scala
+1
-1
...ontent-service/app/controllers/v3/TeacherController.scala
with
1 addition
and
1 deletion
+1
-1
learning-api/content-service/app/controllers/v3/TeacherController.scala
+
1
−
1
View file @
e8be5b00
...
...
@@ -69,7 +69,7 @@ class TeacherController @Inject()(@Named(ActorNames.SCHOOL_ACTOR) schoolActor: A
}
def
getAssessmentScore
(
sessionId
:
String
)
=
Action
{
implicit
request
=>
val
cmd
=
Seq
(
"curl"
,
"-X"
,
"POST"
,
s
"http://50.1.0.12:8082/druid/v2"
,
"-H"
,
"Content-Type: application/json"
,
"-H"
,
"Content-Type: application/json"
,
"-d"
,
"{
\n
\"queryType\":
\"groupBy\",
\n
\"dataSource\":
\"devcon-events\",
\n
\"dimensions\":
[
\n
\"profileId\",
\n
\"profileName\",
\"edata_profile_url\"
],
\n
\"aggregations\":
[\n {\n
\"fieldName\":
\"edata_duration\",
\n
\"fieldNames\":
[
\n
\"edata_duration\"
\n ],\n
\"type\":
\"doubleSum\",
\n
\"name\":
\"
SUM(edata_
duration
)
\"
\n },\n {\n
\"fieldName\":
\"edata_score\",
\n
\"fieldNames\":
[
\n
\"edata_score\"
\n ],\n
\"type\":
\"doubleSum\",
\n
\"name\":
\"
SUM(edata_
score
)
\"
\n }\n ],\n
\"granularity\":
\"all\",
\n
\"postAggregations\":
[],
\n
\"intervals\":
\"2020-02-1
5
T00:00:00+00:00/2020-02-23T00:00:00+00:00\",
\n
\"filter\":
{
\n
\"type\":
\"and\",
\n
\"fields\":
[\n {\n
\"type\":
\"selector\",
\n
\"dimension\":
\"sid\",
\n
\"value\":
\""
+
sessionId
+
"\"
\n },\n {\n
\"type\":
\"selector\",
\n
\"dimension\":
\"eid\",
\n
\"value\":
\"DC_ASSESS\"
\n }\n ]\n },\n
\"limitSpec\":
{\n
\"type\":
\"default\",
\n
\"limit\":
10000,
\n
\"columns\":
[\n {\n
\"dimension\":
\"
SUM(edata_
duration
)
\",
\n
\"direction\":
\"descending\"
\n }\n ]\n }\n
}"
)
val
cmd
=
Seq
(
"curl"
,
"-X"
,
"POST"
,
s
"http://50.1.0.12:8082/druid/v2"
,
"-H"
,
"Content-Type: application/json"
,
"-H"
,
"Content-Type: application/json"
,
"-d"
,
"{\"queryType\":\"groupBy\",\"dataSource\":\"devcon-events\",\"dimensions\":[\"profileId\",\"profileName\",\"edata_profile_url\"],\"aggregations\":
[{
\"fieldName\":\"edata_duration\",\"fieldNames\":[\"edata_duration\"
],
\"type\":\"doubleSum\",\"name\":\"duration\"
},{
\"fieldName\":\"edata_score\",\"fieldNames\":[\"edata_score\"
],
\"type\":\"doubleSum\",\"name\":\"score\"
}],
\"granularity\":\"all\",\"postAggregations\":[],\"intervals\":\"2020-02-1
6
T00:00:00+00:00/2020-02-23T00:00:00+00:00\",\"filter\":{\"type\":\"and\",\"fields\":
[{
\"type\":\"selector\",\"dimension\":\"sid\",\"value\":\""
+
sessionId
+
"\"
},{
\"type\":\"selector\",\"dimension\":\"eid\",\"value\":\"DC_ASSESS\"
}]},
\"limitSpec\":
{
\"type\":\"default\",\"limit\":10000,\"columns\":
[{
\"dimension\":\"
score\",\"direction\":\"descending\"},{\"dimension\":\"
duration\",\"direction\":\"descending\"
}]}
}"
)
val
result
=
cmd
.!!
Ok
(
result
).
as
(
"application/json"
)
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets