-
Notifications
You must be signed in to change notification settings - Fork 134
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
Refactor LLMS_Engagements
#1771
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's overall good.
Although I think we should avoid sending delayed engagements when the related post has been trashed/deleted, and when the engagement status is not publish
.
* @return void | ||
*/ | ||
private function __construct() { | ||
|
||
if ( defined( 'LLMS_ENGAGEMENT_DEBUG' ) && LLMS_ENGAGEMENT_DEBUG ) { | ||
_deprecated_function( 'Constant: LLMS_ENGAGEMENT_DEBUG', '[version]' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remember to modify this doc:
https://lifterlms.com/docs/enable-engagement-debug-logging/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, although, and sorry for being nitpick, I think we still miss this part:
what do we do when the related post (course/lesson/access plan etc.) is trashed/deleted?
I'd say that we should unschedule the engagement as well, although I guess we don't have a way to determine what's the scheduled action to unschedule though...We could, when processing the delayed engagements, at least avoid the certificates/achievements to be earned if the related post doesn't exist anymore. What do you think?
Right?
And I think we should check also that the engagement type is publish
, I mean the achievement/email/certificate template actually exist and is publish otherwise what do we "send" (we might end up producing a fatal btw)?
…ading strategy for backwards compat
@eri-trabiccolo, forgive me for what I have done. |
…ms into engagement-refactoring
…_certificate post type doesn't support
Enable the block editor for certificates
Description
Refactors a significant portion of certificate and engagement related code, deprecates a lot of code and simplifies the process of generating earned certificates and achievements.
preprare_query()
#859TODO
LLMS_Student
model to use a WP_Query. We might have to deprecate the existing methods and create new ones, I haven't looked at this too thoroughly yet. Possibly create custom class for this, likeLLMS_Engagements_Query
LLMS_Achievments::trigger_engagement()
class (like certificates has been deprecated)How has this been tested?
Screenshots
Types of changes
Checklist: