* Fix tutorial score bug

This commit is contained in:
滔哥
2017-11-07 12:59:31 +08:00
parent e7e5d2501c
commit 4ba312f1eb
2 changed files with 4 additions and 7 deletions
+3 -6
View File
@@ -440,15 +440,12 @@ $(function()
$('.task-num-finish').text(finishCount);
var isFinishAll = finishCount >= totalCount;
if(isFinishAll)
{
$.getJSON(createLink('tutorial', 'ajaxFinish'));
current = $tasks.children('li').first().data('name');
}
if(isFinishAll) current = $tasks.children('li').first().data('name');
var progress = Math.round(100*finishCount/totalCount);
$progress.toggleClass('finish', isFinishAll).find('.progress-bar').css('width', (100*finishCount/totalCount) + '%');
$progress.find('.progress-text').text(progress + '%');
if(progress == 100) $.getJSON(createLink('tutorial', 'ajaxFinish'));
showTask(current);
};