Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress bar goes over 100% in new task #41

Open
bcfuchs opened this issue Nov 11, 2014 · 2 comments
Open

Progress bar goes over 100% in new task #41

bcfuchs opened this issue Nov 11, 2014 · 2 comments

Comments

@bcfuchs
Copy link

bcfuchs commented Nov 11, 2014

Resets on completion of first subtask
Not sure if this is the right issues list for this...
screen shot 2014-11-11 at 21 07 32

@bcfuchs bcfuchs changed the title task percent bar goes over 100% in new task Progress bar goes over 100% in new task Nov 11, 2014
@bcfuchs
Copy link
Author

bcfuchs commented Nov 11, 2014

Looks like this is caused by the last button "save it and load another" being counted as a "step" in this part of the code:

$('.btn-answer').off('click').on('click', function(evt) {
// Get value of pressed button
var tmp = $(evt.target).attr("value");

        // PAGINATION

        var pag_max_steps = $(".steps").length;
        var pag_n_steps = $(".steps").index($(".steps:visible"));
        var pag_perc=(((pag_n_steps+1)/(pag_max_steps-1))*100).toFixed(0);
        $("#progress_bar_task").css("width",pag_perc+"%");
        $("#progress_bar_task").html(pag_perc+"%");

@cobismith
Copy link

thanks Brian! I just added you to the geotagx organization group, so if you want to commit changes to code in future you can :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants