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

Set the status of the attempt

Parameters Parameters


(string) (Required) Status value.


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

Default value: false

Top ↑

Return Return


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

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.