summaryrefslogtreecommitdiff
path: root/src/com/p4square/grow/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/p4square/grow/frontend')
-rw-r--r--src/com/p4square/grow/frontend/AssessmentResultsPage.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/p4square/grow/frontend/AssessmentResultsPage.java b/src/com/p4square/grow/frontend/AssessmentResultsPage.java
index 9c69c69..95c3f6a 100644
--- a/src/com/p4square/grow/frontend/AssessmentResultsPage.java
+++ b/src/com/p4square/grow/frontend/AssessmentResultsPage.java
@@ -82,6 +82,9 @@ public class AssessmentResultsPage extends FreeMarkerPageResource {
return new StringRepresentation("Redirecting to " + nextPage);
}
+ // Publish results in F1
+ publishScoreInF1(response.getMap());
+
root.put("stage", score);
return new TemplateRepresentation(t, root, MediaType.TEXT_HTML);
@@ -92,6 +95,17 @@ public class AssessmentResultsPage extends FreeMarkerPageResource {
}
}
+ private void publishScoreInF1(Map results) {
+ if (!(getRequest().getClientInfo().getUser() instanceof F1User)) {
+ // Only useful if the user is from F1.
+ return;
+ }
+
+ F1User user = (F1User) getRequest().getClientInfo().getUser();
+
+ // TODO: Update the attribute.
+ }
+
/**
* @return The backend endpoint URI
*/