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_Student_Course::get_actions_html( obj $lesson )

Get the HTML for the actions column on the table


Parameters Parameters

$lesson

(obj) (Required) LLMS_Lesson..


Top ↑

Return Return

(string)


Top ↑

Source Source

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

	private function get_actions_html( $lesson ) {

		$html = '';

		if ( llms_show_mark_complete_button( $lesson ) ) {

			if ( $this->student->is_complete( $lesson->get( 'id' ) ) ) {
				$action = 'incomplete';
				$icon   = 'exclamation-triangle';
				$text   = __( 'Mark Incomplete', 'lifterlms' );
			} else {
				$action = 'complete';
				$icon   = 'check';
				$text   = __( 'Mark Complete', 'lifterlms' );
			}
			$html = '
				<form action="" method="POST">
					<input name="student_id" type="hidden" value="' . $this->student->get( 'id' ) . '">
					<input name="lesson_id" type="hidden" value="' . $lesson->get( 'id' ) . '">
					<button class="llms-button-secondary square small tip--bottom-left" data-tip="' . esc_attr( $text ) . '" name="llms-lesson-action" type="submit" value="' . $action . '">
						<i class="fa fa-' . $icon . '" aria-hidden="true"></i>
					</button>
					' . wp_nonce_field( 'llms-admin-lesson-progression', 'llms-admin-progression-nonce', false, false ) . '
				</form>
			';

		}
		return $html;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.29.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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