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_Meta_Box_Award_Engagement_Submit::student_information()

Current student information html.


Return Return

(string)


Top ↑

Source Source

File: includes/admin/post-types/meta-boxes/class.llms.meta.box.award.engagement.submit.php

	private function student_information() {

		$post_type  = get_post_type( $this->post->ID );
		$student_id = $this->current_student_id();
		$student    = $student_id ? llms_get_student( $student_id ) : $student_id;

		// Bail if no student.
		if ( empty( $student ) ) {
			return '';
		}

		$first = $student->get( 'first_name' );
		$last  = $student->get( 'last_name' );

		if ( ! $first || ! $last ) {
			$name = $student->get( 'display_name' );
		} else {
			$name = $last . ', ' . $first;
		}

		$url = add_query_arg(
			array(
				'page'       => 'llms-reporting',
				'tab'        => 'students',
				'student_id' => $student_id,
				'stab'       => $this->post_types[ $post_type ]['reporting_stab'],
			),
			admin_url( 'admin.php' )
		);

		return sprintf(
			'<li class="llms-mb-list student-info"> <b>%1$s:</b>&nbsp;<span>%2$s</span></li>',
			__( 'Student', 'lifterlms' ),
			sprintf(
				'<a href="%1$s" target="_blank">%2$s &lt;%3$s&gt;</a>',
				esc_url( $url ),
				$name,
				$student->get( 'user_email' )
			)
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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