llms_get_student( mixed $user = null, bool $autoload = true )
Get an LLMS_Student.
Parameters #Parameters
- $user
-
(mixed) (Optional) WP_User ID, instance of WP_User, or instance of any student class extending this class.
Default value: null
- $autoload
-
(bool) (Optional) If
trueand$userinput is empty, the user will be loaded fromget_current_user_id().<br> If$useris not empty then this parameter has no impact.Default value: true
Return #Return
(LLMS_Student|false) LLMS_Student instance on success, false if user not found.
Source #Source
File: includes/functions/llms.functions.person.php
function llms_get_student( $user = null, $autoload = true ) {
$student = new LLMS_Student( $user, $autoload );
return $student->exists() ? $student : false;
}
Expand full source code Collapse full source code View on GitHub
Related #Related
Used By #Used By
| Used By | Description |
|---|---|
| includes/models/model.llms.quiz.php: LLMS_Quiz::can_be_resumed_by_student() |
Determine if a student can resume the quiz. |
| includes/models/model.llms.quiz.php: LLMS_Quiz::get_student_last_attempt_key() |
Gets quiz’s last attempt key of a user. |
| includes/models/model.llms.quiz.attempt.php: LLMS_Quiz_Attempt::is_last_attempt() |
Determine if the attempt is the last attempt of its quiz. |
| includes/models/model.llms.quiz.attempt.php: LLMS_Quiz_Attempt::has_resume_attempt_time_expired() |
Determine if the student’s resume quiz attempt time limit is expired. |
| includes/class.llms.ajax.php: LLMS_AJAX::favorite_object() |
Add Favorite / Unfavorite postmeta for an object. |
| includes/functions/llms.functions.templates.dashboard.php: llms_template_student_dashboard_my_favorites() |
Template for My Favorites section on dashboard index. |
| includes/functions/llms.functions.templates.dashboard.php: llms_template_my_favorites_loop() |
Get student’s favorites. |
| includes/functions/llms.functions.template.php: llms_is_focus_mode_enabled() |
Determine if Focus Mode is enabled for a specific post (lesson, quiz, or other post types via filter). |
| includes/shortcodes/class.llms.shortcode.favorites.php: LLMS_Shortcode_Favorites::get_favorites() |
Retrieve an array of Favorites from |
| includes/shortcodes/class.llms.shortcode.favorites.php: LLMS_Shortcode_Favorites::get_output() |
Retrieve the actual content of the shortcode. |
| includes/class-llms-beaver-builder.php: LLMS_Beaver_Builder::is_student_enrolled_in_one_thing() |
Detemine if a student is enrolled in at least one course or membership. |
| includes/admin/reporting/tables/llms.table.quiz.non.attempts.php: LLMS_Table_Quiz_Non_Attempts::get_results() |
Execute a query to retrieve results from the table. |
| includes/models/model.llms.order.php: LLMS_Order::set_user_data() |
Sets user-related metadata for the order. |
| includes/class-llms-engagement-handler.php: LLMS_Engagement_Handler::dupcheck() |
Check if the engagement for the specified template and related post has already been earned / awarded to a given user. |
| includes/admin/post-types/meta-boxes/class.llms.meta.box.award.engagement.submit.php: LLMS_Meta_Box_Award_Engagement_Submit::student_information() |
Current student information html. |
| includes/notifications/controllers/class.llms.notification.controller.upcoming.payment.reminder.php: LLMS_Notification_Controller_Upcoming_Payment_Reminder::get_test_settings() |
Get an array of LifterLMS Admin Page settings to send test notifications |
| includes/admin/class-llms-admin-users-table.php: LLMS_Admin_Users_Table::output_col() |
Register custom columns |
| includes/models/model.llms.instructor.php: LLMS_Instructor::has_student() |
Determines if the instructor is an instructor to a specific student. |
| includes/notifications/controllers/class.llms.notification.controller.student.welcome.php: LLMS_Notification_Controller_Student_Welcome::get_test_settings() |
Get an array of LifterLMS Admin Page settings to send test notifications |
| libraries/lifterlms-rest/includes/server/class-llms-rest-students-controller.php: LLMS_REST_Students_Controller::get_object() |
Get object. |
| libraries/lifterlms-rest/includes/server/class-llms-rest-enrollments-controller.php: LLMS_REST_Enrollments_Controller::enrollment_exists() |
Check enrollment existence. |
| libraries/lifterlms-rest/includes/server/class-llms-rest-students-progress-controller.php: LLMS_REST_Students_Progress_Controller::get_object() |
Get object. |
| includes/models/model.llms.section.php: LLMS_Section::get_percent_complete() |
Retrieve section completion percentage |
| includes/models/model.llms.order.php: LLMS_Order::init() |
Initializes a new order with user, plan, gateway, and coupon metadata. |
| includes/models/model.llms.lesson.php: LLMS_Lesson::get_available_date() |
Get the date a lesson became or will become available according to element drip settings |
| includes/models/model.llms.quiz.php: LLMS_Quiz::is_open() |
Determine if a student can take the quiz. |
| includes/models/model.llms.user.postmeta.php: LLMS_User_Postmeta::get_student() |
Retrieve a student obj for the meta item. |
| includes/models/model.llms.course.php: LLMS_Course::get_percent_complete() |
Get a user’s percentage completion through the course |
| includes/models/model.llms.quiz.attempt.php: LLMS_Quiz_Attempt::init() |
Initialize a new quiz attempt by quiz and lesson for a user. |
| includes/models/model.llms.quiz.attempt.php: LLMS_Quiz_Attempt::get_student() |
Get an LLMS_Student for the quiz |
| includes/llms.functions.core.php: llms_make_select2_student_array() |
Create an array that can be passed to metabox select elements configured as an llms-select2-student query-ier. |
| includes/abstracts/llms.abstract.privacy.php: LLMS_Abstract_Privacy::get_student_by_email() |
Retrieve an instance of an LLMS_Student from email address. |
| includes/abstracts/llms.abstract.user.data.php: LLMS_Abstract_User_Data::get_student() |
Allow extending classes to access the main student class |
| includes/class-llms-grades.php: LLMS_Grades::get_grade() |
Main grade getter function |
| includes/functions/llms.functions.templates.dashboard.php: lifterlms_template_student_dashboard_my_memberships() |
Template for My Memberships section on dashboard index |
| includes/functions/llms.functions.templates.dashboard.php: lifterlms_template_my_courses_loop() |
Get course tiles for a student’s courses |
| includes/functions/llms.functions.templates.dashboard.php: lifterlms_template_my_memberships_loop() |
Get course tiles for a student’s memberships |
| includes/functions/llms.functions.templates.dashboard.php: lifterlms_template_student_dashboard_my_achievements() |
Template for My Achievements on dashboard |
| includes/functions/llms.functions.templates.dashboard.php: lifterlms_template_student_dashboard_my_certificates() |
Template for My Certificates on dashboard |
| includes/functions/llms.functions.templates.dashboard.php: lifterlms_template_student_dashboard_my_courses() |
Template for My Courses section on dashboard index |
| includes/functions/llms.functions.templates.dashboard.php: lifterlms_template_student_dashboard_my_grades() |
Output the “My Grades” template screen on the student dashboard. |
| includes/functions/llms.functions.templates.certificates.php: lifterlms_template_certificates_loop() | |
| includes/functions/llms.functions.person.php: llms_can_user_bypass_restrictions() |
Determines whether or not a user can bypass enrollment, drip, and prerequisite restrictions. |
| includes/functions/llms.functions.person.php: llms_current_user_can() |
Checks LifterLMS user capabilities against an object |
| includes/functions/llms-functions-progression.php: llms_show_mark_complete_button() |
Determines whether or not a “Mark Complete” button should be displayed for a given lesson |
| includes/functions/llms.functions.templates.achievements.php: lifterlms_template_achievements_loop() | |
| includes/functions/llms.functions.order.php: llms_setup_pending_order() |
Setup a pending order which can be passed to an LLMS_Payment_Gateway for processing. |
| includes/functions/llms.functions.access.php: llms_is_post_restricted_by_membership() |
Determine if a WordPress post (of any type) is restricted to at least one LifterLMS Membership level. |
| includes/controllers/class.llms.controller.lesson.progression.php: LLMS_Controller_Lesson_Progression::quiz_maybe_prevent_lesson_completion() |
Before a lesson is marked as complete, check if all the lesson’s quiz requirements are met |
| includes/shortcodes/class.llms.shortcode.course.outline.php: LLMS_Shortcode_Course_Outline::get_output() |
Retrieve the actual content of the shortcode |
| includes/shortcodes/class.llms.shortcode.my.achievements.php: LLMS_Shortcode_My_Achievements::get_output() |
Retrieve the actual content of the shortcode |
| includes/shortcodes/class.llms.shortcode.courses.php: LLMS_Shortcode_Courses::get_output() |
Retrieve the actual content of the shortcode |
| includes/shortcodes/class.llms.shortcode.courses.php: LLMS_Shortcode_Courses::get_post__in() |
Retrieve an array of post ids based on submitted ID parameter and the mine parameter |
| includes/admin/reporting/tabs/class.llms.admin.reporting.tab.students.php: LLMS_Admin_Reporting_Tab_Students::output() |
Output HTML for the current view within the students tab |
| includes/admin/post-types/post-tables/class.llms.admin.post.table.orders.php: LLMS_Admin_Post_Table_Orders::manage_columns() |
Order post: Queries data based on column name. |
| includes/admin/post-types/tables/class.llms.table.student.management.php: LLMS_Table_StudentManagement::get_data() |
Retrieve data for the columns |
| includes/admin/post-types/meta-boxes/class.llms.meta.box.order.enrollment.php: LLMS_Meta_Box_Order_Enrollment::output() |
Function to field WP::output() method call |
| includes/emails/class.llms.email.php: LLMS_Email::add_recipient() |
Add a single recipient for sending to, cc, or bcc |
| includes/notifications/controllers/class.llms.notification.controller.quiz.failed.php: LLMS_Notification_Controller_Quiz_Failed::get_test_settings() |
Get an array of LifterLMS Admin Page settings to send test notifications. |
| includes/notifications/controllers/class.llms.notification.controller.purchase.receipt.php: LLMS_Notification_Controller_Purchase_Receipt::get_test_settings() |
Get an array of LifterLMS Admin Page settings to send test notifications |
| includes/notifications/controllers/class.llms.notification.controller.quiz.passed.php: LLMS_Notification_Controller_Quiz_Passed::get_test_settings() |
Get an array of LifterLMS Admin Page settings to send test notifications |
| includes/notifications/controllers/class.llms.notification.controller.quiz.graded.php: LLMS_Notification_Controller_Quiz_Graded::get_test_settings() |
Get an array of LifterLMS Admin Page settings to send test notifications |
| libraries/lifterlms-blocks/includes/class-llms-blocks-visibility.php: LLMS_Blocks_Visibility::get_enrollment_count_by_type() |
Get the number of enrollments for a user by post type. |
Changelog #Changelog
| Version | Description |
|---|---|
| 7.1.0 | Added the $autoload parameter. |
| 3.9.0 | Unknown |
| 3.8.0 | Introduced. |