Skip to content

Finish Course resets enrollment and marks course as retaken #632

Description

@axl4life

Finish Course resets enrollment and marks course as retaken

I don't know if anybody else has experienced this.

Clicking Finish Course unexpectedly resets the student's enrollment instead of simply completing the course.

Environment

  • LearnPress 4.4.0
  • LearnPress WooCommerce Add-on 4.2.0
  • LearnPress Content Drip 4.0.7

Course settings

  • Duration: 27 weeks
  • Block content on expiration: Enabled
  • Allow Repurchase: Disabled
  • Re-take Course: 100
  • Show the Finish Course button even if the student has completed all items but has not passed the course assessment: Enabled

Observed behavior

After the student clicked Finish Course, the following changes occurred:

  • _lp_retaken_count was incremented to 1.
  • learnpress_user_items.status was reset to enrolled.
  • graduation was reset to in-progress.
  • start_time was reset to the current date (the original enrollment was overwritten).
  • No new WooCommerce order was created.
  • No new LearnPress order was created.
  • The same user_item_id was reused.
  • learnpress_user_item_results contained:
    • one valid passing result (pass = 1, score = 82.55%);
    • one new NULL result row.

Expected behavior

Clicking Finish Course should mark the course as completed. It should not reset the existing enrollment or mark the course as retaken unless the student explicitly chooses to retake the course.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions