LLMS_Quiz_Attempt::set_status( string $status, boolean $save = false )

Set the status of the attempt


Parameters Parameters

$status

(string) (Required) Status value.

$save

(boolean) (Optional) If true, immediately persists to database.

Default value: false


Top ↑

Return Return

(false|LLMS_Quiz_Attempt)


Top ↑

Source Source

File: includes/models/model.llms.quiz.attempt.php

	public function set_status( $status, $save = false ) {

		$statuses = array_keys( llms_get_quiz_attempt_statuses() );
		if ( ! in_array( $status, $statuses, true ) ) {
			return false;
		}
		return $this->set( 'status', $status );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.0.0 Use strict comparisons.
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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