LLMS_Quiz_Data::get_attempt_count( string $period = 'current' )
Retrieve # of quiz attempts within the period
Parameters Parameters
- $period
-
(string) (Optional) date period [current|previous]
Default value: 'current'
Return Return
(int)
Source Source
File: includes/class.llms.quiz.data.php
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | public function get_attempt_count( $period = 'current' ) { global $wpdb ; return $wpdb ->get_var( $wpdb ->prepare( " SELECT COUNT ( id ) FROM { $wpdb ->prefix}lifterlms_quiz_attempts WHERE quiz_id = %d AND update_date BETWEEN %s AND %s ", $this ->post_id, $this ->get_date( $period , 'start' ), $this ->get_date( $period , 'end' ) ) ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.0 | Introduced. |