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

Exclude learners that completed the course from participants #27

Merged
merged 3 commits into from Mar 21, 2019

Conversation

@pgk
Copy link
Contributor

commented Mar 16, 2017

One caveat is that the count of learners will always show any learner status, because it is not part of the widget per se. Will look into fixing this as I go along.

closes #4

@pgk pgk added this to the 1.1.4 milestone Mar 16, 2017

@pgk pgk requested a review from danjjohnson Mar 16, 2017

@danjjohnson
Copy link
Contributor

left a comment

Reviewed functionality, and it works for me.

Code review will require a developer :)

@donnapep

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2018

As per #4 (comment), let's remove the setting as only showing the current learners should be the default behaviour.

We should also try to update the learner count:

screen shot 2018-02-08 at 12 55 11 pm

@jom jom force-pushed the add/4-exclude-completed branch 4 times, most recently from b82c21c to 33f61e5 Mar 20, 2019

@jom jom force-pushed the add/4-exclude-completed branch from 33f61e5 to b285516 Mar 20, 2019

@jom

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

I've rebased and removed the setting. I did add a filter sensei_course_participants_exclude_completed_participants that defaults to true, based on @donnapep's comments above.

Testing Instructions

Use this snippet. It should start to include completed participants in participant counts and lists when viewing the course. Without that snippet, completed participants will be excluded (new behavior).

add_filter( 'sensei_course_participants_exclude_completed_participants', '__return_false' );

@jom jom added the Hooks & Filters label Mar 20, 2019

@jom jom changed the title Add option to exclude learners that completed the course from participants Exclude learners that completed the course from participants Mar 20, 2019

@jom jom force-pushed the add/4-exclude-completed branch from 342b307 to e1aea78 Mar 20, 2019

@jom jom requested review from donnapep and alexsanford Mar 20, 2019

@alexsanford
Copy link
Contributor

left a comment

Looks good, works well! 👍

@donnapep
Copy link
Contributor

left a comment

LGTM! 👍

@jom jom merged commit d7247e5 into master Mar 21, 2019

@jom jom deleted the add/4-exclude-completed branch Mar 21, 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.