dozent_attempt_statuses( null $status = null )
Get all attempt statuses or any single status text retrieve by status key
Description
This function used for translation purpose of DB status key
Example usage:
$status_text = dozent_attempt_statuses( 'in_review' ); // In Review
Parameters
- $status
-
(null) (Optional)
Default value: null
Return
(mixed|void)
Source
File: includes/quiz-functions.php
function dozent_attempt_statuses( $status = null ) { $statuses = [ 'started' => __( 'Started', 'dozent' ), 'in_review' => __( 'In Review', 'dozent' ), 'finished' => __( 'Finished', 'dozent' ), 'timeout' => __( 'Timeout', 'dozent' ), 'abandon' => __( 'Abandon', 'dozent' ), 'autosubmitted' => __( 'Auto Submitted', 'dozent' ), ]; if ( $status ) { /** * Filter output returns by dozent_attempt_statuses(); * * @since DozentLMS 1.0.0 * * @param string $value Status value * @param string $status Status Key * @param array $statuses All status of attempt */ return apply_filters( 'dozent_attempt_statuses', dozent_array_get( $status, $statuses ), $status, $statuses ); } /** * Filter output returns by dozent_attempt_statuses(); * * @since DozentLMS 1.0.0 * * @param array $statuses All status of attempt */ return apply_filters( 'dozent_attempt_statuses', $statuses ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |