LLMS_Student
LLMS_Student model class
Description Description
Manages data and interactions with a LifterLMS Student.
Source Source
File: includes/models/model.llms.student.php
Changelog Changelog
Version | Description |
---|---|
4.2.0 | The $enrollment_trigger parameter was added to the 'llms_user_enrollment_deleted' action hook. Added new filter to allow customization of object completion data. |
4.0.0 | Remove previously deprecated methods. |
3.37.9 | Added filters llms_user_enrollment_allowed_post_types & llms_user_enrollment_status_allowed_post_types which allow 3rd parties to enroll users into additional post types via core enrollment methods. |
3.36.2 | Added logic to physically remove from the membership level and remove enrollments data on related products, when deleting a membership enrollment. |
3.35.0 | Prepare all variables when querying for enrollment date. |
3.34.0 | Added new filters for differentiating between enrollment update and creation; Added the ability to check enrollment from a section. |
3.33.0 | Added the delete_enrollment_postmeta private method that allows student's enrollment postmeta deletion. |
2.2.3 | Introduced. |
Methods Methods
- add_membership_level — Add the student to a LifterLMS Membership
- delete_enrollment — Delete a student enrollment.
- delete_enrollment_postmeta — Remove student enrollment postmeta for a given product.
- enroll — Enroll the student into a course or membership
- get_achievements — Retrieve achievements that a user has earned
- get_avatar
- get_certificates — Retrieve certificates that a user has earned
- get_completed_courses — Retrieve IDs of courses a user has completed
- get_completion_date — Get the formatted date when a course or lesson was completed by the student
- get_courses — Retrieve IDs of user's courses based on supplied criteria
- get_enrollment_date — Get the formatted date when a user initially enrolled in a product or when they were last updated
- get_enrollment_order — Retrieve the order which enrolled a student in a given course or membership Retrieves the most recently updated order for the given product
- get_enrollment_status — Get the current enrollment status of a student for a particular product
- get_enrollment_trigger — Get the enrollment trigger for a the student's enrollment in a course
- get_enrollment_trigger_id — Get the enrollment trigger id for a the student's enrollment in a course
- get_enrollments — Retrieve IDs of user's enrollments by post type (and additional criteria)
- get_events — Retrieve postmeta events related to the student
- get_grade — Get the students grade for a lesson / course All grades are based on quizzes assigned to lessons
- get_last_completed_lesson — Get the students last completed lesson in a course
- get_membership_levels — Retrieve an array of Membership Levels for a user
- get_memberships — Retrieve IDs of user's memberships based on supplied criteria
- get_name — Get the full name of a student
- get_next_lesson — Get the next lesson a student needs to complete in a course
- get_notification_subscription — Retrieve a user's notification subscription preferences for a given type & trigger
- get_orders
- get_overall_grade — Retrieve the student's overall grade
- get_overall_progress — Retrieve a student's overall progress Overall progress is the total percentage completed based on all courses the student is enrolled in Cached data is cleared every time the student completes a lesson
- get_progress — Get students progress through a course or track
- get_registration_date — Retrieve the Students original registration date in chosen format
- insert_completion_postmeta — Add student postmeta data for completion of a lesson, section, course or track
- insert_enrollment_postmeta — Add student postmeta data for enrollment into a course or membership
- insert_incompletion_postmeta — Add student postmeta data for incompletion of a lesson, section, course or track An "_is_complete" value of "no" is inserted into postmeta
- insert_status_postmeta — Add a new status record to the user postmeta table for a specific product
- instructor — Retrieve an instance of the LLMS_Instructor model for the current user
- is_active — Determine if the student is active in at least one course or membership
- is_complete — Determine if the student has completed a course, track, or lesson
- is_enrolled — Determine if a student is enrolled in a Course or Membership.
- is_instructor — Determine if the student is a LifterLMS Instructor (of any kind)
- mark_complete — Mark a lesson, section, course, or track complete for the given user
- mark_incomplete — Mark a lesson, section, course, or track incomplete for the given user Gives an "_is_complete" value of "no" for the given object
- quizzes — Retrieve an instance of the student quiz data model
- remove_membership_level — Remove a student from a membership level.
- unenroll — Remove a student from a LifterLMS course or membership
- update_completion_status — Update the completion status of a track, course, section, or lesson for the current student