From 79b8aacbb7b347bba9d14b1332666e7263a3a058 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sun, 8 Oct 2017 17:29:48 -0700 Subject: Attempt to update chapter completion on every request. I'm still seeing occasional users with missing progress information in CCB. Currently, the progress is only updated when the user completes a chapter. With this change, the progress will be updated every time the training page is loaded. CCBProgressReporter does not actually update the user's profile unless the new level is greater than the existing level. This provision will prevent needlessly calling the CCB API. Additionally, this update will execute in a background thread to avoid impacting the page load. --- src/main/java/com/p4square/grow/ccb/CCBProgressReporter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/p4square/grow/ccb') diff --git a/src/main/java/com/p4square/grow/ccb/CCBProgressReporter.java b/src/main/java/com/p4square/grow/ccb/CCBProgressReporter.java index 6eb9c15..c352fc7 100644 --- a/src/main/java/com/p4square/grow/ccb/CCBProgressReporter.java +++ b/src/main/java/com/p4square/grow/ccb/CCBProgressReporter.java @@ -57,7 +57,7 @@ public class CCBProgressReporter implements ProgressReporter { if (currentLevel != null) { if (Score.numericScore(chapter) <= Score.numericScore(currentLevel.getSelection().getLabel())) { - LOG.info("Not updating level for " + user.getIdentifier() + LOG.debug("Not updating level for " + user.getIdentifier() + " because current level (" + currentLevel.getSelection().getLabel() + ") is greater than new level (" + chapter + ")"); return; -- cgit v1.2.3