Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Table_Students::get_sort()

Setup the array of sort arguments to pass to the LLMS_Student_Query for the table


Return Return

(array)


Top ↑

Source Source

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

478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
private function get_sort() {
 
    $sort = array();
    switch ( $this->get_orderby() ) {
 
        case 'id':
            $sort = array(
                'id' => $this->get_order(),
            );
            break;
 
        case 'name':
            $sort = array(
                'last_name'  => $this->get_order(),
                'first_name' => 'ASC',
                'id'         => 'ASC',
            );
            break;
 
        case 'overall_grade':
            $sort = array(
                'overall_grade' => $this->get_order(),
                'last_name'     => 'ASC',
                'first_name'    => 'ASC',
                'id'            => 'ASC',
            );
            break;
 
        case 'overall_progress':
            $sort = array(
                'overall_progress' => $this->get_order(),
                'last_name'        => 'ASC',
                'first_name'       => 'ASC',
                'id'               => 'ASC',
            );
            break;
 
        case 'registered':
            $sort = array(
                'registered' => $this->get_order(),
                'last_name'  => 'ASC',
                'first_name' => 'ASC',
                'id'         => 'ASC',
            );
            break;
 
    }
 
    return $sort;
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.28.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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