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_Privacy_Exporters::get_quiz_attempt_data( LLMS_Quiz_Attempt $attempt )
Get export data for a single quiz attempt
Parameters Parameters
- $attempt
-
(LLMS_Quiz_Attempt) (Required) Quiz attempt object.
Return Return
(array)
Source Source
File: includes/privacy/class-llms-privacy-exporters.php
private static function get_quiz_attempt_data( $attempt ) { $data = array(); $quiz = $attempt->get_quiz(); if ( $quiz ) { $data[] = array( 'name' => __( 'Title', 'lifterlms' ), 'value' => $quiz->get( 'title' ), ); } $data[] = array( 'name' => __( 'Attempt ID', 'lifterlms' ), 'value' => $attempt->get_key(), ); $data[] = array( 'name' => __( 'Attempt Number', 'lifterlms' ), 'value' => $attempt->get( 'attempt' ), ); $data[] = array( 'name' => __( 'Status', 'lifterlms' ), 'value' => $attempt->l10n( 'status' ), ); $grade = $attempt->get( 'grade' ); $data[] = array( 'name' => __( 'Grade', 'lifterlms' ), 'value' => is_numeric( $grade ) ? $grade . '%' : '–', ); return $data; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.18.0 | Introduced. |