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

Change progress status to Completed in modules #2342

Merged

Conversation

Projects
None yet
2 participants
@tonytettinger
Copy link
Contributor

commented Nov 24, 2018

Issue

As stated in issue #2313 the status doesn't change from "In Progress" to "Completed" even if all modules are marked completed.

Problem description

The template-function.php file calls the get_user_module_progress() function from the class-sensei-modules.php. The resulting progress number is determining the output for the progress tab on the page. The problem is that when the get_user_module_progress() runs it doesn't get the correct input.

Solution

To solve this I have added one line of code, calling a function to make sure that the progress data is up to date and saved to the metadata, so the input is correct before it's processed and sent back to determine the status of the module.

sens1

sens2

Test

To test load a page with all completed lessons and also add new lessons and mark them as completed to check correct functionaity.

@donnapep donnapep changed the base branch from master to release/2.0 Feb 25, 2019

@donnapep donnapep self-requested a review Feb 25, 2019

@donnapep donnapep added this to the 2.0.0 milestone Feb 25, 2019

@donnapep donnapep merged commit a5f66cc into Automattic:release/2.0 Feb 25, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@tonytettinger tonytettinger deleted the tonytettinger:fix/showing-completed-module branch Feb 26, 2019

alexsanford added a commit that referenced this pull request Mar 25, 2019

@donnapep donnapep modified the milestones: 2.0.0, 1.12.3 Mar 27, 2019

@donnapep donnapep changed the title Fix bug: Change progress status to Completed in Modules Change progress status to Completed in modules Mar 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.