Quiz And Survey Master (Formerly Quiz Master Next) - Version 5.1.3

Version Description

(November 18, 2017) = * Closed Bug: MathJax library not loading - (Issue #590) * Closed Bug: Fatal error: Call to a member function register_question_type - (Issue #509)

Download this release

Release Info

Developer fpcorso
Plugin Icon 128x128 Quiz And Survey Master (Formerly Quiz Master Next)
Version 5.1.3
Comparing to
See all releases

Code changes from version 5.1.2 to 5.1.3

ISSUE_TEMPLATE.md CHANGED
@@ -1,7 +1,7 @@
1
  Please provide the following information when creating your issues:
2
 
3
  ## General description
4
- If this is a bug, give a general description of what you are experiencing. If this is a feature request, include what the feature your are requesting.
5
 
6
  ## Expected behavior
7
  If you are reporting a bug, please describe what you are expecting the plugin to do. If this is a feature request, delete this section.
1
  Please provide the following information when creating your issues:
2
 
3
  ## General description
4
+ If this is a bug, give a general description of what you are experiencing. If this is a feature request, include what the feature is that you are requesting.
5
 
6
  ## Expected behavior
7
  If you are reporting a bug, please describe what you are expecting the plugin to do. If this is a feature request, delete this section.
mlw_quizmaster2.php CHANGED
@@ -2,14 +2,14 @@
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
- * Version: 5.1.2
6
  * Author: Frank Corso
7
  * Author URI: https://www.quizandsurveymaster.com/
8
  * Plugin URI: https://www.quizandsurveymaster.com/
9
  * Text Domain: quiz-master-next
10
  *
11
  * @author Frank Corso
12
- * @version 5.1.2
13
  */
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
@@ -29,7 +29,7 @@ class MLWQuizMasterNext {
29
  * @var string
30
  * @since 4.0.0
31
  */
32
- public $version = '5.1.2';
33
 
34
  /**
35
  * QSM Alert Manager Object
@@ -287,6 +287,7 @@ class MLWQuizMasterNext {
287
  }
288
  }
289
 
 
290
  $mlwQuizMasterNext = new MLWQuizMasterNext();
291
  register_activation_hook( __FILE__, array( 'QSM_Install', 'install' ) );
292
  ?>
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
+ * Version: 5.1.3
6
  * Author: Frank Corso
7
  * Author URI: https://www.quizandsurveymaster.com/
8
  * Plugin URI: https://www.quizandsurveymaster.com/
9
  * Text Domain: quiz-master-next
10
  *
11
  * @author Frank Corso
12
+ * @version 5.1.3
13
  */
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
29
  * @var string
30
  * @since 4.0.0
31
  */
32
+ public $version = '5.1.3';
33
 
34
  /**
35
  * QSM Alert Manager Object
287
  }
288
  }
289
 
290
+ global $mlwQuizMasterNext;
291
  $mlwQuizMasterNext = new MLWQuizMasterNext();
292
  register_activation_hook( __FILE__, array( 'QSM_Install', 'install' ) );
293
  ?>
php/about-page.php CHANGED
@@ -54,6 +54,7 @@ function mlw_generate_about_page() {
54
  </div>
55
  <div class="qsm-tab-content tab-2" style="display: none;">
56
  <h2>Changelog</h2>
 
57
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 41 ); ?>
58
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 40 ); ?>
59
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 25 ); ?>
54
  </div>
55
  <div class="qsm-tab-content tab-2" style="display: none;">
56
  <h2>Changelog</h2>
57
+ <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 43 ); ?>
58
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 41 ); ?>
59
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 40 ); ?>
60
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 25 ); ?>
php/class-qmn-quiz-manager.php CHANGED
@@ -253,14 +253,13 @@ class QMNQuizManager {
253
  * @uses QMNQuizManager:display_end_section() Creates display for end section
254
  * @return string The content for the quiz page section
255
  */
256
- public function display_quiz($qmn_quiz_options, $qmn_quiz_questions, $qmn_quiz_answers, $qmn_array_for_variables)
257
- {
258
  global $qmn_allowed_visit;
259
  global $mlwQuizMasterNext;
260
  $quiz_display = '';
261
- $quiz_display = apply_filters('qmn_begin_quiz', $quiz_display, $qmn_quiz_options, $qmn_array_for_variables);
262
- if (!$qmn_allowed_visit)
263
- {
264
  return $quiz_display;
265
  }
266
  wp_enqueue_script( 'json2' );
@@ -278,7 +277,7 @@ class QMNQuizManager {
278
 
279
  wp_enqueue_script( 'qmn_quiz', plugins_url( '../js/qmn_quiz.js' , __FILE__ ), array( 'jquery', 'jquery-ui-tooltip' ), $mlwQuizMasterNext->version );
280
  wp_localize_script( 'qmn_quiz', 'qmn_ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); // setting ajaxurl
281
- wp_enqueue_script( 'math_jax', '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' );
282
 
283
  global $qmn_total_questions;
284
  $qmn_total_questions = 0;
@@ -522,8 +521,7 @@ class QMNQuizManager {
522
  * @uses QMNQuizManager:send_admin_email() Creates display for end section
523
  * @return string The content for the results page section
524
  */
525
- public function submit_results($qmn_quiz_options, $qmn_quiz_questions, $qmn_quiz_answers, $qmn_array_for_variables)
526
- {
527
  global $qmn_allowed_visit;
528
  $result_display = '';
529
 
@@ -533,9 +531,8 @@ class QMNQuizManager {
533
  $qmn_array_for_variables['user_ip'] = "Unknown";
534
  }
535
 
536
- $result_display = apply_filters('qmn_begin_results', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
537
- if (!$qmn_allowed_visit)
538
- {
539
  return $result_display;
540
  }
541
 
@@ -546,21 +543,21 @@ class QMNQuizManager {
546
  $qmn_array_for_variables['user_phone'] = 'None';
547
  $contact_responses = QSM_Contact_Manager::process_fields( $qmn_quiz_options );
548
  foreach ( $contact_responses as $field ) {
549
- if ( isset( $field['use'] ) ) {
550
- if ( 'name' === $field['use'] ) {
551
- $qmn_array_for_variables['user_name'] = $field["value"];
552
- }
553
- if ( 'comp' === $field['use'] ) {
554
- $qmn_array_for_variables['user_business'] = $field["value"];
555
- }
556
- if ( 'email' === $field['use'] ) {
557
- $qmn_array_for_variables['user_email'] = $field["value"];
558
- }
559
- if ( 'phone' === $field['use'] ) {
560
- $qmn_array_for_variables['user_phone'] = $field["value"];
561
- }
562
- }
563
- }
564
 
565
  $mlw_qmn_timer = isset($_POST["timer"]) ? intval( $_POST["timer"] ) : 0;
566
  $qmn_array_for_variables['user_id'] = get_current_user_id();
@@ -568,8 +565,7 @@ class QMNQuizManager {
568
  $qmn_array_for_variables['time_taken'] = date("h:i:s A m/d/Y", current_time( 'timestamp' ) );
569
  $qmn_array_for_variables['contact'] = $contact_responses;
570
 
571
- if (!isset($_POST["mlw_code_captcha"]) || (isset($_POST["mlw_code_captcha"]) && $_POST["mlw_user_captcha"] == $_POST["mlw_code_captcha"]))
572
- {
573
 
574
  $qmn_array_for_variables = array_merge($qmn_array_for_variables,$this->check_answers($qmn_quiz_questions, $qmn_quiz_answers, $qmn_quiz_options, $qmn_array_for_variables));
575
  $result_display = apply_filters('qmn_after_check_answers', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
@@ -579,12 +575,8 @@ class QMNQuizManager {
579
  $result_display = apply_filters('qmn_after_results_text', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
580
  $result_display .= $this->display_social($qmn_quiz_options, $qmn_array_for_variables);
581
  $result_display = apply_filters('qmn_after_social_media', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
582
- $this->send_user_email($qmn_quiz_options, $qmn_array_for_variables);
583
- $result_display = apply_filters('qmn_after_send_user_email', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
584
- $this->send_admin_email($qmn_quiz_options, $qmn_array_for_variables);
585
- $result_display = apply_filters('qmn_after_send_admin_email', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
586
 
587
- //Save the results into database
588
  $mlw_quiz_results_array = array(
589
  intval($qmn_array_for_variables['timer']),
590
  $qmn_array_for_variables['question_answers_array'],
@@ -636,6 +628,12 @@ class QMNQuizManager {
636
  '%d'
637
  )
638
  );
 
 
 
 
 
 
639
  $result_display = apply_filters('qmn_end_results', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
640
  //Legacy Code
641
  do_action('mlw_qmn_load_results_page', $wpdb->insert_id, $qmn_quiz_options->quiz_settings);
253
  * @uses QMNQuizManager:display_end_section() Creates display for end section
254
  * @return string The content for the quiz page section
255
  */
256
+ public function display_quiz( $qmn_quiz_options, $qmn_quiz_questions, $qmn_quiz_answers, $qmn_array_for_variables ) {
257
+
258
  global $qmn_allowed_visit;
259
  global $mlwQuizMasterNext;
260
  $quiz_display = '';
261
+ $quiz_display = apply_filters( 'qmn_begin_quiz', $quiz_display, $qmn_quiz_options, $qmn_array_for_variables );
262
+ if ( ! $qmn_allowed_visit ) {
 
263
  return $quiz_display;
264
  }
265
  wp_enqueue_script( 'json2' );
277
 
278
  wp_enqueue_script( 'qmn_quiz', plugins_url( '../js/qmn_quiz.js' , __FILE__ ), array( 'jquery', 'jquery-ui-tooltip' ), $mlwQuizMasterNext->version );
279
  wp_localize_script( 'qmn_quiz', 'qmn_ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); // setting ajaxurl
280
+ wp_enqueue_script( 'math_jax', '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' );
281
 
282
  global $qmn_total_questions;
283
  $qmn_total_questions = 0;
521
  * @uses QMNQuizManager:send_admin_email() Creates display for end section
522
  * @return string The content for the results page section
523
  */
524
+ public function submit_results( $qmn_quiz_options, $qmn_quiz_questions, $qmn_quiz_answers, $qmn_array_for_variables ) {
 
525
  global $qmn_allowed_visit;
526
  $result_display = '';
527
 
531
  $qmn_array_for_variables['user_ip'] = "Unknown";
532
  }
533
 
534
+ $result_display = apply_filters( 'qmn_begin_results', $result_display, $qmn_quiz_options, $qmn_array_for_variables );
535
+ if ( ! $qmn_allowed_visit ) {
 
536
  return $result_display;
537
  }
538
 
543
  $qmn_array_for_variables['user_phone'] = 'None';
544
  $contact_responses = QSM_Contact_Manager::process_fields( $qmn_quiz_options );
545
  foreach ( $contact_responses as $field ) {
546
+ if ( isset( $field['use'] ) ) {
547
+ if ( 'name' === $field['use'] ) {
548
+ $qmn_array_for_variables['user_name'] = $field["value"];
549
+ }
550
+ if ( 'comp' === $field['use'] ) {
551
+ $qmn_array_for_variables['user_business'] = $field["value"];
552
+ }
553
+ if ( 'email' === $field['use'] ) {
554
+ $qmn_array_for_variables['user_email'] = $field["value"];
555
+ }
556
+ if ( 'phone' === $field['use'] ) {
557
+ $qmn_array_for_variables['user_phone'] = $field["value"];
558
+ }
559
+ }
560
+ }
561
 
562
  $mlw_qmn_timer = isset($_POST["timer"]) ? intval( $_POST["timer"] ) : 0;
563
  $qmn_array_for_variables['user_id'] = get_current_user_id();
565
  $qmn_array_for_variables['time_taken'] = date("h:i:s A m/d/Y", current_time( 'timestamp' ) );
566
  $qmn_array_for_variables['contact'] = $contact_responses;
567
 
568
+ if ( !isset( $_POST["mlw_code_captcha"] ) || ( isset( $_POST["mlw_code_captcha"] ) && $_POST["mlw_user_captcha"] == $_POST["mlw_code_captcha"] ) ) {
 
569
 
570
  $qmn_array_for_variables = array_merge($qmn_array_for_variables,$this->check_answers($qmn_quiz_questions, $qmn_quiz_answers, $qmn_quiz_options, $qmn_array_for_variables));
571
  $result_display = apply_filters('qmn_after_check_answers', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
575
  $result_display = apply_filters('qmn_after_results_text', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
576
  $result_display .= $this->display_social($qmn_quiz_options, $qmn_array_for_variables);
577
  $result_display = apply_filters('qmn_after_social_media', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
 
 
 
 
578
 
579
+ // Save the results into database
580
  $mlw_quiz_results_array = array(
581
  intval($qmn_array_for_variables['timer']),
582
  $qmn_array_for_variables['question_answers_array'],
628
  '%d'
629
  )
630
  );
631
+
632
+
633
+ $this->send_user_email($qmn_quiz_options, $qmn_array_for_variables);
634
+ $result_display = apply_filters('qmn_after_send_user_email', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
635
+ $this->send_admin_email($qmn_quiz_options, $qmn_array_for_variables);
636
+ $result_display = apply_filters('qmn_after_send_admin_email', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
637
  $result_display = apply_filters('qmn_end_results', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
638
  //Legacy Code
639
  do_action('mlw_qmn_load_results_page', $wpdb->insert_id, $qmn_quiz_options->quiz_settings);
php/options-page-questions-tab.php CHANGED
@@ -29,7 +29,7 @@ function qsm_options_questions_tab_content() {
29
  <?php
30
  wp_enqueue_script('qmn_admin_question_js', plugins_url( '../js/qsm-admin-question.js' , __FILE__ ), array( 'jquery-ui-sortable' ) );
31
  wp_enqueue_style('qmn_admin_question_css', plugins_url( '../css/qsm-admin-question.css' , __FILE__ ) );
32
- wp_enqueue_script( 'math_jax', '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' );
33
 
34
  global $wpdb;
35
  global $mlwQuizMasterNext;
29
  <?php
30
  wp_enqueue_script('qmn_admin_question_js', plugins_url( '../js/qsm-admin-question.js' , __FILE__ ), array( 'jquery-ui-sortable' ) );
31
  wp_enqueue_style('qmn_admin_question_css', plugins_url( '../css/qsm-admin-question.css' , __FILE__ ) );
32
+ wp_enqueue_script( 'math_jax', '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' );
33
 
34
  global $wpdb;
35
  global $mlwQuizMasterNext;
php/quiz-options-page.php CHANGED
@@ -28,12 +28,7 @@ function qsm_generate_quiz_options() {
28
  $quiz_name = $wpdb->get_var( $wpdb->prepare( "SELECT quiz_name FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id=%d LIMIT 1", $quiz_id ) );
29
  $mlwQuizMasterNext->quiz_settings->prepare_quiz( $_GET["quiz_id"] );
30
  }
31
- ?>
32
 
33
- <script type="text/javascript"
34
- src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
35
- </script>
36
- <?php
37
  wp_enqueue_script( 'jquery' );
38
  wp_enqueue_script( 'jquery-ui-core' );
39
  wp_enqueue_script( 'jquery-ui-dialog' );
@@ -43,6 +38,7 @@ function qsm_generate_quiz_options() {
43
  wp_enqueue_script( 'jquery-effects-blind' );
44
  wp_enqueue_script( 'jquery-effects-explode' );
45
  wp_enqueue_style( 'qmn_jquery_redmond_theme', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css' );
 
46
  ?>
47
  <style>
48
  .mlw_tab_content {
28
  $quiz_name = $wpdb->get_var( $wpdb->prepare( "SELECT quiz_name FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id=%d LIMIT 1", $quiz_id ) );
29
  $mlwQuizMasterNext->quiz_settings->prepare_quiz( $_GET["quiz_id"] );
30
  }
 
31
 
 
 
 
 
32
  wp_enqueue_script( 'jquery' );
33
  wp_enqueue_script( 'jquery-ui-core' );
34
  wp_enqueue_script( 'jquery-ui-dialog' );
38
  wp_enqueue_script( 'jquery-effects-blind' );
39
  wp_enqueue_script( 'jquery-effects-explode' );
40
  wp_enqueue_style( 'qmn_jquery_redmond_theme', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css' );
41
+ wp_enqueue_script( 'math_jax', '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' );
42
  ?>
43
  <style>
44
  .mlw_tab_content {
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Quiz And Survey Master (Formerly Quiz Master Next) ===
2
  Contributors: fpcorso
3
  Tags: quiz, survey, lead, test, score, exam, questionnaire, answer, question, points
4
- Requires at least: 4.7
5
- Tested up to: 4.8
6
- Stable tag: 5.1.2
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -108,6 +108,10 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
108
 
109
  == Changelog ==
110
 
 
 
 
 
111
  = 5.1.2 (October 17, 2017) =
112
  * Closed Bug: Special characters fail the uppercase validation in open answer/fill in the blank questions - ([Issue #580](https://github.com/fpcorso/quiz_master_next/issues/580))
113
 
1
  === Quiz And Survey Master (Formerly Quiz Master Next) ===
2
  Contributors: fpcorso
3
  Tags: quiz, survey, lead, test, score, exam, questionnaire, answer, question, points
4
+ Requires at least: 4.8
5
+ Tested up to: 4.9
6
+ Stable tag: 5.1.3
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
108
 
109
  == Changelog ==
110
 
111
+ = 5.1.3 (November 18, 2017) =
112
+ * Closed Bug: MathJax library not loading - ([Issue #590](https://github.com/fpcorso/quiz_master_next/issues/590))
113
+ * Closed Bug: Fatal error: Call to a member function register_question_type - ([Issue #509](https://github.com/fpcorso/quiz_master_next/issues/509))
114
+
115
  = 5.1.2 (October 17, 2017) =
116
  * Closed Bug: Special characters fail the uppercase validation in open answer/fill in the blank questions - ([Issue #580](https://github.com/fpcorso/quiz_master_next/issues/580))
117