LLMS_Table_Course_Students::get_export_data( string $key, obj $student )

Retrieve data for a cell in an export file Should be overridden in extending classes


Parameters Parameters

$key

(string) (Required) the column id / key

$student

(obj) (Required) Instance of the LLMS_Student


Top ↑

Return Return

(mixed)


Top ↑

Source Source

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

	public function get_export_data( $key, $student ) {

		switch ( $key ) {

			case 'id':
				$value = $student->get_id();
				break;

			case 'email':
				$value = $student->get( 'user_email' );
				break;

			case 'name_first':
				$value = $student->get( 'first_name' );
				break;

			case 'name_last':
				$value = $student->get( 'last_name' );
				break;

			case 'progress':
				$value = $student->get_progress( $this->course_id ) . '%';
				break;

			default:
				$value = $this->get_data( $key, $student );

		}// End switch().

		return $this->filter_get_data( $value, $key, $student, 'export' );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.15.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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