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

	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.