llms_update_3160_update_quiz_settings()
Add yes/no vals for quiz new quiz settings
Return Return
(void)
Source Source
File: includes/functions/updates/llms-functions-updates-3160.php
function llms_update_3160_update_quiz_settings() { global $wpdb; $ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'llms_quiz'" ); foreach ( $ids as $id ) { $quiz = llms_get_post( $id ); if ( $quiz->get( 'time_limit' ) > 0 ) { $quiz->set( 'limit_time', 'yes' ); } if ( $quiz->get( 'allowed_attempts' ) > 0 ) { $quiz->set( 'limit_attempts', 'yes' ); } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.0 | Introduced. |