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

Replace usages of Sensei_Utils::user_started_course in course methods #2962

Merged
merged 2 commits into from Mar 6, 2020

Conversation

jom
Copy link
Member

@jom jom commented Mar 5, 2020

Changes proposed in this Pull Request:

  • Updates deprecated usage of Sensei_Utils::user_started_course in courses related code.
  • For all usages in Sensei_Course, it was pretty clearly checking for enrolment.
  • For the results page status, I used has_started_course. The reason being, if someone has progress and goes to /courses/{slug}/results, they should be able see their actual progress.

Testing instructions:

  • Course results page should show proper message if user has ever started course (and hasn't had progress reset when not enrolled).
  • When viewing a course you're enrolled in, the course progress meter and message at the top should show up correctly. If you aren't enrolled and there aren't products associated with it, you should see action button to start taking course.
  • If your course has preview lessons, when you aren't enrolled you should see button Preview this course.

@jom jom added this to the 3.0.0 milestone Mar 5, 2020
@jom jom requested a review from a team March 5, 2020 22:14
@jom jom self-assigned this Mar 5, 2020
@jom jom changed the title Change/user started course courses Remove usages of Sensei_Utils::user_started_course in course methods Mar 5, 2020
@jom jom force-pushed the change/user-started-course-courses branch from 076747a to 85665f9 Compare March 5, 2020 22:20
Copy link
Contributor

@yscik yscik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the results page status, I used has_started_course. The reason being, if someone has progress and goes to /courses/{slug}/results, they should be able see their actual progress.

The rendering of the lesson list on that page currently checks for enrollment, we should probably make it consistent. This sounds more reasonable, I'll update the other PR.

Otherwise all looks good and works as advertised. :shipit:

@jom jom merged commit ae55b03 into master Mar 6, 2020
@jom jom deleted the change/user-started-course-courses branch March 6, 2020 15:25
@donnapep donnapep changed the title Remove usages of Sensei_Utils::user_started_course in course methods Replace usages of Sensei_Utils::user_started_course in course methods Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants