summaryrefslogtreecommitdiff
path: root/web/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'web/scripts')
-rw-r--r--web/scripts/growth.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/scripts/growth.js b/web/scripts/growth.js
index 0e66bbc..a79465c 100644
--- a/web/scripts/growth.js
+++ b/web/scripts/growth.js
@@ -165,6 +165,8 @@ function displayPlayer()
function reportVideoComplete(data)
{
notice("You finished \u201C" + data.title + ".\u201D");
+ var completedBefore = $('#videos article .completed').length;
+
$('#' + data.id).addClass('completed');
var completed = $('#videos article .completed').length;
@@ -185,7 +187,7 @@ function reportVideoComplete(data)
notice('Could not record video completiton due to ' + error + '. If the problem persists, please contact us.');
});
- if (completed == total) {
+ if (completed == total && completedBefore != completed) {
chapterComplete();
}
}
@@ -202,4 +204,5 @@ function closeVideo()
function chapterComplete()
{
notice("You've completed this chapter!");
+ location.href += "/completed";
}