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

Version Description

(November, 2, 2016) = * Closed Bug: Apostrophe in translation for tab name text causing errors - Issue #490 * Closed Bug: Timer resets if user copies link, opens new tab, and pastes link - Issue #489 * Closed Enhancement: Add Business, Email, And Phone To Quiz Results Search - Issue #485 * Closed Bug: "You Deserve It" button in review message leads to 404 - Issue #476 * Closed Bug: In the Hint dropdown text, the 'apostrophe' does not display properly - Issue #453

Download this release

Release Info

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

Code changes from version 4.7.7 to 4.7.8

js/qmn_quiz.js CHANGED
@@ -51,8 +51,8 @@ function qmnValidation( element, quiz_form_id ) {
51
  result = false;
52
  }
53
  }
54
- if ( window.sessionStorage.getItem( 'mlw_time_quiz' + quiz_id ) === null ||
55
- window.sessionStorage.getItem( 'mlw_time_quiz'+quiz_id ) > 0.08 ) {
56
 
57
  if( jQuery( this ).attr( 'class' ).indexOf( 'mlwRequiredNumber' ) > -1 && this.value === "" && +this.value != NaN ) {
58
  qmnDisplayError( number_error, jQuery( this ), quiz_form_id );
@@ -192,9 +192,9 @@ function qmnActivateTimer( quiz_id ) {
192
  jQuery( '#quizForm' + quiz_id + ' .mlw_qmn_timer').show();
193
  qmn_timer_activated = true;
194
  var minutes = 0;
195
- if ( window.sessionStorage.getItem( 'mlw_started_quiz' + quiz_id ) == "yes" &&
196
- window.sessionStorage.getItem( 'mlw_time_quiz' + quiz_id ) >= 0 ) {
197
- minutes = window.sessionStorage.getItem( 'mlw_time_quiz' + quiz_id );
198
  } else {
199
  minutes = qmn_quiz_data[quiz_id].timer_limit;
200
  }
@@ -209,8 +209,8 @@ function qmnTimer( quiz_id ) {
209
  if (window.amount < 0) {
210
  window.amount = 0;
211
  }
212
- window.sessionStorage.setItem( 'mlw_time_quiz' + quiz_id, window.amount / 60 );
213
- window.sessionStorage.setItem( 'mlw_started_quiz' + quiz_id, "yes" );
214
  jQuery( '#quizForm' + quiz_id + ' .mlw_qmn_timer').html( qmnMinToSec( window.amount ) );
215
  window.document.title = qmnMinToSec( window.amount ) + " " + qsmTitleText;
216
  if ( window.amount <= 0 ) {
@@ -228,8 +228,8 @@ function qmnTimer( quiz_id ) {
228
  }
229
 
230
  function qmnEndTimer( quiz_id ) {
231
- window.sessionStorage.setItem('mlw_time_quiz' + quiz_id, 'completed');
232
- window.sessionStorage.setItem('mlw_started_quiz' + quiz_id, 'no');
233
  window.document.title = qsmTitleText;
234
  if ( typeof window.qsmCounter != 'undefined' ) {
235
  clearInterval( window.qsmCounter );
51
  result = false;
52
  }
53
  }
54
+ if ( window.localStorage.getItem( 'mlw_time_quiz' + quiz_id ) === null ||
55
+ window.localStorage.getItem( 'mlw_time_quiz'+quiz_id ) > 0.08 ) {
56
 
57
  if( jQuery( this ).attr( 'class' ).indexOf( 'mlwRequiredNumber' ) > -1 && this.value === "" && +this.value != NaN ) {
58
  qmnDisplayError( number_error, jQuery( this ), quiz_form_id );
192
  jQuery( '#quizForm' + quiz_id + ' .mlw_qmn_timer').show();
193
  qmn_timer_activated = true;
194
  var minutes = 0;
195
+ if ( window.localStorage.getItem( 'mlw_started_quiz' + quiz_id ) == "yes" &&
196
+ window.localStorage.getItem( 'mlw_time_quiz' + quiz_id ) >= 0 ) {
197
+ minutes = window.localStorage.getItem( 'mlw_time_quiz' + quiz_id );
198
  } else {
199
  minutes = qmn_quiz_data[quiz_id].timer_limit;
200
  }
209
  if (window.amount < 0) {
210
  window.amount = 0;
211
  }
212
+ window.localStorage.setItem( 'mlw_time_quiz' + quiz_id, window.amount / 60 );
213
+ window.localStorage.setItem( 'mlw_started_quiz' + quiz_id, "yes" );
214
  jQuery( '#quizForm' + quiz_id + ' .mlw_qmn_timer').html( qmnMinToSec( window.amount ) );
215
  window.document.title = qmnMinToSec( window.amount ) + " " + qsmTitleText;
216
  if ( window.amount <= 0 ) {
228
  }
229
 
230
  function qmnEndTimer( quiz_id ) {
231
+ window.localStorage.setItem('mlw_time_quiz' + quiz_id, 'completed');
232
+ window.localStorage.setItem('mlw_started_quiz' + quiz_id, 'no');
233
  window.document.title = qsmTitleText;
234
  if ( typeof window.qsmCounter != 'undefined' ) {
235
  clearInterval( window.qsmCounter );
mlw_quizmaster2.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
- * Version: 4.7.7
6
  * Author: Frank Corso
7
  * Author URI: http://www.quizandsurveymaster.com/
8
  * Plugin URI: http://www.quizandsurveymaster.com/
@@ -10,7 +10,7 @@
10
  * Domain Path: /languages
11
  *
12
  * @author Frank Corso
13
- * @version 4.7.7
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
@@ -30,7 +30,7 @@ class MLWQuizMasterNext
30
  * @var string
31
  * @since 4.0.0
32
  */
33
- public $version = '4.7.7';
34
 
35
  /**
36
  * QMN Alert Manager Object
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
+ * Version: 4.7.8
6
  * Author: Frank Corso
7
  * Author URI: http://www.quizandsurveymaster.com/
8
  * Plugin URI: http://www.quizandsurveymaster.com/
10
  * Domain Path: /languages
11
  *
12
  * @author Frank Corso
13
+ * @version 4.7.8
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
30
  * @var string
31
  * @since 4.0.0
32
  */
33
+ public $version = '4.7.8';
34
 
35
  /**
36
  * QMN Alert Manager Object
php/about-page.php CHANGED
@@ -48,7 +48,7 @@ function mlw_generate_about_page()
48
  </div>
49
  <div id="mlw_quiz_changelog" class="qmn_tab" style="display: none;">
50
  <h2>Changelog</h2>
51
- <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 28 ); ?>
52
  </div>
53
  <div id="qmn_contributors" class="qmn_tab" style="display:none;">
54
  <h2>GitHub Contributors</h2>
48
  </div>
49
  <div id="mlw_quiz_changelog" class="qmn_tab" style="display: none;">
50
  <h2>Changelog</h2>
51
+ <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 29 ); ?>
52
  </div>
53
  <div id="qmn_contributors" class="qmn_tab" style="display:none;">
54
  <h2>GitHub Contributors</h2>
php/admin-results-page.php CHANGED
@@ -75,8 +75,8 @@ function mlw_generate_quiz_results()
75
  $order_by_sql = 'ORDER BY result_id DESC';
76
  if ( isset( $_GET["qmn_search_phrase"] ) && !empty( $_GET["qmn_search_phrase"] ) ) {
77
  $search_phrase = $_GET["qmn_search_phrase"];
78
- $mlw_qmn_results_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(result_id) FROM " . $wpdb->prefix . "mlw_results WHERE deleted='0' AND (quiz_name LIKE %s OR name LIKE %s)", '%' . $wpdb->esc_like($search_phrase) . '%', '%' . $wpdb->esc_like($search_phrase) . '%' ) );
79
- $search_phrase_sql = " AND (quiz_name LIKE '%$search_phrase%' OR name LIKE '%$search_phrase%')";
80
  } else {
81
  $mlw_qmn_results_count = $wpdb->get_var( "SELECT COUNT(result_id) FROM " . $wpdb->prefix . "mlw_results WHERE deleted='0'" );
82
  }
75
  $order_by_sql = 'ORDER BY result_id DESC';
76
  if ( isset( $_GET["qmn_search_phrase"] ) && !empty( $_GET["qmn_search_phrase"] ) ) {
77
  $search_phrase = $_GET["qmn_search_phrase"];
78
+ $mlw_qmn_results_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(result_id) FROM {$wpdb->prefix}mlw_results WHERE deleted='0' AND (quiz_name LIKE %s OR name LIKE %s OR business LIKE %s OR email LIKE %s OR phone LIKE %s)", '%' . $wpdb->esc_like($search_phrase) . '%', '%' . $wpdb->esc_like($search_phrase) . '%', '%' . $wpdb->esc_like($search_phrase) . '%', '%' . $wpdb->esc_like($search_phrase) . '%', '%' . $wpdb->esc_like($search_phrase) . '%' ) );
79
+ $search_phrase_sql = " AND (quiz_name LIKE '%$search_phrase%' OR name LIKE '%$search_phrase%' OR business LIKE '%$search_phrase%' OR email LIKE '%$search_phrase%' OR phone LIKE '%$search_phrase%')";
80
  } else {
81
  $mlw_qmn_results_count = $wpdb->get_var( "SELECT COUNT(result_id) FROM " . $wpdb->prefix . "mlw_results WHERE deleted='0'" );
82
  }
php/class-qmn-quiz-manager.php CHANGED
@@ -404,9 +404,10 @@ class QMNQuizManager
404
  $question_display .= "<textarea cols='70' rows='5' class='mlw_qmn_question_comment' id='mlwComment".$mlw_question->question_id."' name='mlwComment".$mlw_question->question_id."' onclick='qmnClearField(this)'>".htmlspecialchars_decode($qmn_quiz_options->comment_field_text, ENT_QUOTES)."</textarea>";
405
  $question_display .= "<br />";
406
  }
407
- if ($mlw_question->hints != "")
408
- {
409
- $question_display .= "<span title=\"".htmlspecialchars_decode($mlw_question->hints, ENT_QUOTES)."\" class='mlw_qmn_hint_link'>".__('Hint', 'quiz-master-next')."</span>";
 
410
  $question_display .= "<br /><br />";
411
  }
412
  $question_display .= "</div>";
404
  $question_display .= "<textarea cols='70' rows='5' class='mlw_qmn_question_comment' id='mlwComment".$mlw_question->question_id."' name='mlwComment".$mlw_question->question_id."' onclick='qmnClearField(this)'>".htmlspecialchars_decode($qmn_quiz_options->comment_field_text, ENT_QUOTES)."</textarea>";
405
  $question_display .= "<br />";
406
  }
407
+
408
+ // Checks if a hint is entered
409
+ if ( ! empty( $mlw_question->hints ) ) {
410
+ $question_display .= "<span title=\"" . esc_attr( htmlspecialchars_decode( $mlw_question->hints, ENT_QUOTES ) ) . "\" class='qsm_hint mlw_qmn_hint_link'>" . __( 'Hint', 'quiz-master-next' ) . "</span>";
411
  $question_display .= "<br /><br />";
412
  }
413
  $question_display .= "</div>";
php/class-qmn-review-message.php CHANGED
@@ -95,7 +95,7 @@ class QMN_Review_Message {
95
  $this->trigger,
96
  '<br /><strong><em>~ Frank Corso</em></strong><br /><br />'
97
  );
98
- echo '&nbsp;<a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/quiz-master-next?rate=5#postform" class="button-primary">' . __( 'Yeah, you deserve it!', 'quiz-master-next' ) . '</a>';
99
  echo '&nbsp;<a href="' . esc_url( $already_url ) . '" class="button-secondary">' . __( 'I already did!', 'quiz-master-next' ) . '</a>';
100
  echo '&nbsp;<a href="' . esc_url( $nope_url ) . '" class="button-secondary">' . __( 'No, this plugin is not good enough', 'quiz-master-next' ) . '</a>';
101
  echo "<br /><br /></div>";
@@ -116,6 +116,8 @@ class QMN_Review_Message {
116
  $update_trigger = 100;
117
  } else if ( $this->trigger === 100 ) {
118
  $update_trigger = 1000;
 
 
119
  }
120
  update_option( 'qmn_review_message_trigger', $update_trigger );
121
  }
95
  $this->trigger,
96
  '<br /><strong><em>~ Frank Corso</em></strong><br /><br />'
97
  );
98
+ echo '&nbsp;<a target="_blank" href="https://wordpress.org/support/plugin/quiz-master-next/reviews/#new-topic-0" class="button-primary">' . __( 'Yeah, you deserve it!', 'quiz-master-next' ) . '</a>';
99
  echo '&nbsp;<a href="' . esc_url( $already_url ) . '" class="button-secondary">' . __( 'I already did!', 'quiz-master-next' ) . '</a>';
100
  echo '&nbsp;<a href="' . esc_url( $nope_url ) . '" class="button-secondary">' . __( 'No, this plugin is not good enough', 'quiz-master-next' ) . '</a>';
101
  echo "<br /><br /></div>";
116
  $update_trigger = 100;
117
  } else if ( $this->trigger === 100 ) {
118
  $update_trigger = 1000;
119
+ } else if ( $this->trigger === 1000 ) {
120
+ $update_trigger = -1;
121
  }
122
  update_option( 'qmn_review_message_trigger', $update_trigger );
123
  }
php/options-page-questions-tab.php CHANGED
@@ -76,7 +76,7 @@ function mlw_options_questions_tab_content()
76
  $mlw_edit_question_id = intval( $_POST["question_id"] );
77
  $mlw_edit_question_type = sanitize_text_field( $_POST["question_type"] );
78
  $edit_comments = htmlspecialchars( $_POST["comments"], ENT_QUOTES );
79
- $edit_hint = htmlspecialchars( $_POST["hint"], ENT_QUOTES );
80
  $edit_question_order = intval( $_POST["new_question_order"] );
81
  $total_answers = intval( $_POST["new_question_answer_total"] );
82
 
@@ -278,7 +278,7 @@ function mlw_options_questions_tab_content()
278
  $question_answer_info = htmlspecialchars( stripslashes( $_POST["correct_answer_info"] ), ENT_QUOTES );
279
  $question_type = sanitize_text_field( $_POST["question_type"] );
280
  $comments = htmlspecialchars( $_POST["comments"], ENT_QUOTES );
281
- $hint = htmlspecialchars( $_POST["hint"], ENT_QUOTES );
282
  $new_question_order = intval( $_POST["new_question_order"] );
283
  $total_answers = intval( $_POST["new_question_answer_total"] );
284
 
76
  $mlw_edit_question_id = intval( $_POST["question_id"] );
77
  $mlw_edit_question_type = sanitize_text_field( $_POST["question_type"] );
78
  $edit_comments = htmlspecialchars( $_POST["comments"], ENT_QUOTES );
79
+ $edit_hint = htmlspecialchars( stripslashes( $_POST["hint"] ), ENT_QUOTES );
80
  $edit_question_order = intval( $_POST["new_question_order"] );
81
  $total_answers = intval( $_POST["new_question_answer_total"] );
82
 
278
  $question_answer_info = htmlspecialchars( stripslashes( $_POST["correct_answer_info"] ), ENT_QUOTES );
279
  $question_type = sanitize_text_field( $_POST["question_type"] );
280
  $comments = htmlspecialchars( $_POST["comments"], ENT_QUOTES );
281
+ $hint = htmlspecialchars( stripslashes( $_POST["hint"] ), ENT_QUOTES );
282
  $new_question_order = intval( $_POST["new_question_order"] );
283
  $total_answers = intval( $_POST["new_question_answer_total"] );
284
 
php/quiz-options-page.php CHANGED
@@ -16,7 +16,7 @@ function mlw_generate_quiz_options()
16
  global $wpdb;
17
  global $mlwQuizMasterNext;
18
  $tab_array = $mlwQuizMasterNext->pluginHelper->get_settings_tabs();
19
- $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'questions';
20
  $quiz_id = intval($_GET["quiz_id"]);
21
  if (isset($_GET["quiz_id"]))
22
  {
16
  global $wpdb;
17
  global $mlwQuizMasterNext;
18
  $tab_array = $mlwQuizMasterNext->pluginHelper->get_settings_tabs();
19
+ $active_tab = isset( $_GET[ 'tab' ] ) ? stripslashes( $_GET[ 'tab' ] ) : 'questions';
20
  $quiz_id = intval($_GET["quiz_id"]);
21
  if (isset($_GET["quiz_id"]))
22
  {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://mylocalwebstop.com/downloads/donation-service-payment/
4
  Tags: quiz, survey, test, score, exam, questionnaire, email, answer, question, certificate, points, results
5
  Requires at least: 4.1
6
  Tested up to: 4.6.1
7
- Stable tag: 4.7.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -109,6 +109,13 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
 
112
  = 4.7.7 (September 10, 2016) =
113
  * Closed Bug: From Email Bug Causing 500 Error On WP 4.6 - Issue #473
114
  * Closed Enhancement: Table Styles Don't Match Default WordPress Styles. - Issue #471
@@ -125,5 +132,5 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
125
 
126
  == Upgrade Notice ==
127
 
128
- = 4.7.7 =
129
- Upgrade to fix bug affecting some users using WordPress 4.6 causing results page not to load
4
  Tags: quiz, survey, test, score, exam, questionnaire, email, answer, question, certificate, points, results
5
  Requires at least: 4.1
6
  Tested up to: 4.6.1
7
+ Stable tag: 4.7.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
109
 
110
  == Changelog ==
111
 
112
+ = 4.7.8 (November, 2, 2016) =
113
+ * Closed Bug: Apostrophe in translation for tab name text causing errors - Issue #490
114
+ * Closed Bug: Timer resets if user copies link, opens new tab, and pastes link - Issue #489
115
+ * Closed Enhancement: Add Business, Email, And Phone To Quiz Results Search - Issue #485
116
+ * Closed Bug: "You Deserve It" button in review message leads to 404 - Issue #476
117
+ * Closed Bug: In the Hint dropdown text, the 'apostrophe' does not display properly - Issue #453
118
+
119
  = 4.7.7 (September 10, 2016) =
120
  * Closed Bug: From Email Bug Causing 500 Error On WP 4.6 - Issue #473
121
  * Closed Enhancement: Table Styles Don't Match Default WordPress Styles. - Issue #471
132
 
133
  == Upgrade Notice ==
134
 
135
+ = 4.7.8 =
136
+ Upgrade to fix bug affecting some users where the results page will not load