This section applies only if the site is already using H5P for LearnDash version 2.0.9 or earlier. Please read and understand this section carefully, as it addresses significant changes.
Key Changes in Version 3
The H5P for LearnDash plugin introduces a new feature: Context. This change makes the data saved in the database by version 2.0.9 or earlier obsolete. When version 3 or later detects legacy data in the database it,
- Automatically enables the Mark Complete and/or Start Quiz buttons.
- Replaces legacy data with the new format, which includes context information.
How Does It Works?
When upgrading from version 2.0.9 or earlier to version 3 or higher, the following rules apply to enabling/disabling the Mark Complete and/or Start Quiz buttons:
1. Legacy Data Detection
If a LearnDash course step (lesson, topic, or quiz) was last updated before the plugin update date, and the H5P content was successfully completed, the Mark Complete and/or Start Quiz buttons will be enabled the first time the plugin encounters legacy data in wp_usermeta.
2. Post-Update Modifications:
If a LearnDash course step was updated after the plugin update date, legacy data will be ignored and deleted. Users must complete and pass the H5P activity again to enable the Mark Complete and/or Start Quiz buttons.
Example Use Case
To illustrate these rules, consider the following scenario:
Test Course One contains a lesson named Lesson One, which includes the shortcode [h5p id=”1″]. After updating the site with H5P for LearnDash version 3 or later:
If Lesson One was last updated before the plugin update, and if the H5P activity [h5p id=”1″] was previously completed successfully, the Mark Complete and/or Start Quiz buttons will be enabled.
If Lesson One was last updated after the plugin update, the legacy data will be ignored, and the Mark Complete and/or Start Quiz buttons will remain disabled until the user successfully completes the H5P activity.