diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js index f5d69ec40..3b9a934e5 100644 --- a/js/qsm-quiz.js +++ b/js/qsm-quiz.js @@ -755,7 +755,7 @@ function qmnValidation(element, quiz_form_id) { by_pass = false; } - if (localStorage.getItem('mlw_time_quiz' + quiz_id) === null || 0 == localStorage.getItem('mlw_time_quiz' + quiz_id) || localStorage.getItem('mlw_time_quiz' + quiz_id) > 0.08 || by_pass === false) { + if (localStorage.getItem('mlw_time_quiz' + quiz_id) === null || (0 == localStorage.getItem('mlw_time_quiz' + quiz_id) && by_pass == false) || localStorage.getItem('mlw_time_quiz' + quiz_id) > 0.08 || by_pass === false) { if (jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value === "" && +this.value != NaN) { qmnDisplayError(error_messages.number_error_text, jQuery(this), quiz_form_id); show_result_validation = false; @@ -1331,9 +1331,9 @@ function qmnInitPagination(quiz_id) { jQuery(document).trigger('qsm_init_pagination_after', [quiz_id, qmn_quiz_data]); } jQuery(document).on('qsm_next_button_click_after qsm_previous_button_click_after', function(event, quiz_id) { - let video_sections = jQuery(`.qsm-quiz-container-${quiz_id}.qmn_quiz_container`).find('video'); - let iframeVideos = jQuery(`.qsm-quiz-container-${quiz_id}.qmn_quiz_container`).find('iframe'); - + let video_sections = jQuery('.qsm-quiz-container-' + quiz_id + '.qmn_quiz_container').find('video'); + let iframeVideos = jQuery('.qsm-quiz-container-' + quiz_id + '.qmn_quiz_container .qsm-page, .qsm-quiz-container-' + quiz_id + '.qmn_quiz_container .qsm-auto-page-row').find('iframe'); + let audio_sections = jQuery('.qsm-quiz-container-' + quiz_id + '.qmn_quiz_container').find('audio'); iframeVideos.each(function() { let src = this.src; jQuery(this).attr('src', src); @@ -1343,6 +1343,11 @@ jQuery(document).on('qsm_next_button_click_after qsm_previous_button_click_after this.pause(); } }); + audio_sections.each(function() { + if (!this.paused) { + this.pause(); + } + }); }); function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id, share_url) { var sTop = window.screen.height / 2 - (218); diff --git a/mlw_quizmaster2.php b/mlw_quizmaster2.php index b4130e1b5..628392474 100644 --- a/mlw_quizmaster2.php +++ b/mlw_quizmaster2.php @@ -2,7 +2,7 @@ /** * Plugin Name: Quiz And Survey Master * Description: Easily and quickly add quizzes and surveys to your website. - * Version: 8.2.1 + * Version: 8.2.2 * Author: ExpressTech * Author URI: https://quizandsurveymaster.com/ * Plugin URI: https://expresstech.io/ @@ -43,7 +43,7 @@ class MLWQuizMasterNext { * @var string * @since 4.0.0 */ - public $version = '8.2.1'; + public $version = '8.2.2'; /** * QSM Alert Manager Object diff --git a/php/admin/options-page-text-tab.php b/php/admin/options-page-text-tab.php index 438cc7bb2..86ab33027 100644 --- a/php/admin/options-page-text-tab.php +++ b/php/admin/options-page-text-tab.php @@ -96,10 +96,7 @@ function mlw_options_text_tab_content() { wp_editor( htmlspecialchars_decode( $value_answer, ENT_QUOTES ), 'qsm_question_text_message', array( 'editor_height' => 250, 'textarea_rows' => 10, - 'tinymce' => array( - 'toolbar1' => 'formatselect,bold,italic,underline,bullist,numlist,blockquote,alignleft,aligncenter,alignright,alignjustify,link,wp_more,fullscreen,wp_adv', - 'toolbar2' => 'strikethrough,hr,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help', - ), + 'tinymce' => true, ) ); ?> @@ -152,10 +149,7 @@ function mlw_options_text_tab_content() { wp_editor( htmlspecialchars_decode( $value_answer, ENT_QUOTES ), 'qsm_question_text_message_variable', array( 'editor_height' => 250, 'textarea_rows' => 10, - 'tinymce' => array( - 'toolbar1' => 'formatselect,bold,italic,underline,bullist,numlist,blockquote,alignleft,aligncenter,alignright,alignjustify,link,wp_more,fullscreen,wp_adv', - 'toolbar2' => 'strikethrough,hr,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help', - ), + 'tinymce' => true, ) ); ?> diff --git a/php/admin/settings-page.php b/php/admin/settings-page.php index 3cd1e4058..0c9a05609 100644 --- a/php/admin/settings-page.php +++ b/php/admin/settings-page.php @@ -484,10 +484,7 @@ public function results_details_template() { } wp_editor( $template, 'results_template', array( 'textarea_name' => 'qmn-settings[results_details_template]', - 'tinymce' => array( - 'toolbar1' => 'formatselect,bold,italic,underline,bullist,numlist,blockquote,alignleft,aligncenter,alignright,alignjustify,link,wp_more,fullscreen,wp_adv', - 'toolbar2' => 'strikethrough,hr,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help', - ), + 'tinymce' => true, ) ); } diff --git a/php/classes/class-qsm-fields.php b/php/classes/class-qsm-fields.php index 8ec0a5b4a..3564ac1f1 100644 --- a/php/classes/class-qsm-fields.php +++ b/php/classes/class-qsm-fields.php @@ -597,12 +597,10 @@ public static function generate_editor_field( $field, $value ) {