LLMS_Quiz_Data::get_count_by_status( string $status, string $period = 'current' )
Retrieve the number assignments with a given status
Parameters Parameters
- $status
-
(string) (Required) status name
- $period
-
(string) (Optional) date period [current|previous]
Default value: 'current'
Return Return
(int)
Source Source
File: includes/class.llms.quiz.data.php
public function get_count_by_status( $status, $period = 'current' ) {
global $wpdb;
return $wpdb->get_var(
$wpdb->prepare(
"
SELECT COUNT( id )
FROM {$wpdb->prefix}lifterlms_quiz_attempts
WHERE quiz_id = %d
AND status = %s
AND update_date BETWEEN %s AND %s
",
$this->post_id,
$status,
$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.24.0 | Introduced. |