LLMS_Table_Students::get_results( array $args = array() )

Execute a query to retrieve results from the table


Parameters Parameters

$args

(array) (Optional) Array of query args.

Default value: array()


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/admin/reporting/tables/llms.table.students.php

439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
public function get_results( $args = array() ) {
 
    // Current user can't access this report.
    if ( ! current_user_can( 'view_others_lifterlms_reports' ) && ! current_user_can( 'view_lifterlms_reports' ) ) {
        return;
    }
 
    $this->parse_args( $args );
 
    $query_args = $this->get_query_args();
 
    if ( current_user_can( 'view_others_lifterlms_reports' ) ) {
 
        $query = new LLMS_Student_Query( $query_args );
 
    } elseif ( current_user_can( 'view_lifterlms_reports' ) ) {
 
        $instructor = llms_get_instructor();
        if ( ! $instructor ) {
            return;
        }
        $query = $instructor->get_students( $query_args );
 
    }
 
    $this->max_pages    = $query->get_max_pages();
    $this->is_last_page = $query->is_last_page();
 
    $this->tbody_data = $query->get_students();
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Don't access LLMS_Student_Query properties directly.
3.28.0 Unknown.
3.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.