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

Version Description

(January 1, 2017) = * Closed Bug: Edit question not working when visual editor is off - Issue #497 * Closed Bug: Localization incomplete on Global Settings page - Issue #478

Download this release

Release Info

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

Code changes from version 4.7.9 to 4.7.10

CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  = 4.7.6 (July 11, 2016) =
2
  * Closed: Add language and error logs to usage tracking - Issue #457
3
 
1
+ = 4.7.7 (September 10, 2016) =
2
+ * Closed Bug: From Email Bug Causing 500 Error On WP 4.6 - Issue #473
3
+ * Closed Enhancement: Table Styles Don't Match Default WordPress Styles. - Issue #471
4
+ * Closed Bug: Tracking manager causes admin server error when request error occurs. - Issue #470
5
+
6
  = 4.7.6 (July 11, 2016) =
7
  * Closed: Add language and error logs to usage tracking - Issue #457
8
 
js/qsm-admin-question.js CHANGED
@@ -213,15 +213,16 @@ function qmn_hide_show_correct_fields( question_type ) {
213
  jQuery("#the-list").on('click', '.edit_link', function(event) {
214
  event.preventDefault();
215
  var question_array_id = jQuery(this).attr('data-question-id');
216
- var question_editor = tinyMCE.get('question_name');
217
  var question = jQuery('<textarea/>').html(questions_list[question_array_id].question).text();
218
- if (question_editor)
219
- {
220
- tinyMCE.get('question_name').setContent(question);
221
- }
222
- else
223
- {
224
- jQuery("#question_name").val(question);
 
 
225
  }
226
  jQuery(".question_area_header_text").text('Edit Question');
227
  jQuery(".question_area .button-primary").val("Save Question");
213
  jQuery("#the-list").on('click', '.edit_link', function(event) {
214
  event.preventDefault();
215
  var question_array_id = jQuery(this).attr('data-question-id');
 
216
  var question = jQuery('<textarea/>').html(questions_list[question_array_id].question).text();
217
+ if ( 'undefined' === typeof tinyMCE || null === tinyMCE ) {
218
+ jQuery( "#question_name" ).val( question );
219
+ } else {
220
+ var question_editor = tinyMCE.get( 'question_name' );
221
+ if ( question_editor ) {
222
+ tinyMCE.get( 'question_name' ).setContent( question );
223
+ } else {
224
+ jQuery( "#question_name" ).val( question );
225
+ }
226
  }
227
  jQuery(".question_area_header_text").text('Edit Question');
228
  jQuery(".question_area .button-primary").val("Save Question");
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.9
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.9
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.9';
34
 
35
  /**
36
  * QMN Alert Manager Object
@@ -249,7 +249,7 @@ class MLWQuizMasterNext {
249
  __( 'QSM About', 'quiz' ),
250
  __( 'QSM About', 'quiz' ),
251
  'manage_options',
252
- 'mlw_qmn_about',
253
  'mlw_generate_about_page'
254
  );
255
  }
@@ -265,7 +265,7 @@ class MLWQuizMasterNext {
265
  */
266
  public function admin_head()
267
  {
268
- remove_submenu_page( 'index.php', 'mlw_qmn_about' );
269
  remove_submenu_page( 'quiz-master-next/mlw_quizmaster2.php', 'mlw_quiz_options' );
270
  remove_submenu_page( 'quiz-master-next/mlw_quizmaster2.php', 'mlw_quiz_result_details' );
271
  }
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
+ * Version: 4.7.10
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.10
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
30
  * @var string
31
  * @since 4.0.0
32
  */
33
+ public $version = '4.7.10';
34
 
35
  /**
36
  * QMN Alert Manager Object
249
  __( 'QSM About', 'quiz' ),
250
  __( 'QSM About', 'quiz' ),
251
  'manage_options',
252
+ 'qsm_about',
253
  'mlw_generate_about_page'
254
  );
255
  }
265
  */
266
  public function admin_head()
267
  {
268
+ remove_submenu_page( 'index.php', 'qsm_about' );
269
  remove_submenu_page( 'quiz-master-next/mlw_quizmaster2.php', 'mlw_quiz_options' );
270
  remove_submenu_page( 'quiz-master-next/mlw_quizmaster2.php', 'mlw_quiz_result_details' );
271
  }
php/about-page.php CHANGED
@@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
8
  * @since 4.4.0
9
  */
10
  function mlw_generate_about_page() {
11
-
12
  global $mlwQuizMasterNext;
13
  $mlw_quiz_version = $mlwQuizMasterNext->version;
14
  wp_enqueue_script( 'jquery' );
@@ -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', 30 ); ?>
52
  </div>
53
  <div id="qmn_contributors" class="qmn_tab" style="display:none;">
54
  <h2>GitHub Contributors</h2>
8
  * @since 4.4.0
9
  */
10
  function mlw_generate_about_page() {
11
+
12
  global $mlwQuizMasterNext;
13
  $mlw_quiz_version = $mlwQuizMasterNext->version;
14
  wp_enqueue_script( 'jquery' );
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', 31 ); ?>
52
  </div>
53
  <div id="qmn_contributors" class="qmn_tab" style="display:none;">
54
  <h2>GitHub Contributors</h2>
php/class-qmn-tracking.php CHANGED
@@ -202,7 +202,7 @@ class QMNTracking {
202
  $optin_url = esc_url( add_query_arg( 'qmn_track_check', 'opt_into_tracking' ) );
203
  $optout_url = esc_url( add_query_arg( 'qmn_track_check', 'opt_out_of_tracking' ) );
204
  echo '<div class="updated"><p>';
205
- echo __( "Allow Quiz And Survey Master to track this plugin's usage and help us make this plugin better? Opt-in to tracking and our newsletter and immediately be emailed a 20%% discount to the QSM store, valid towards the purchase of addons. No sensitive data is tracked.", 'quiz-master-next' );
206
  echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-secondary">' . __( 'Allow', 'quiz-master-next' ) . '</a>';
207
  echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary">' . __( 'Do not allow', 'quiz-master-next' ) . '</a>';
208
  echo '</p></div>';
202
  $optin_url = esc_url( add_query_arg( 'qmn_track_check', 'opt_into_tracking' ) );
203
  $optout_url = esc_url( add_query_arg( 'qmn_track_check', 'opt_out_of_tracking' ) );
204
  echo '<div class="updated"><p>';
205
+ echo __( "Allow Quiz And Survey Master to track this plugin's usage and help us make this plugin better? Opt-in to tracking and our newsletter and immediately be emailed a coupon to the QSM store, valid towards the purchase of addons. No sensitive data is tracked.", 'quiz-master-next' );
206
  echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-secondary">' . __( 'Allow', 'quiz-master-next' ) . '</a>';
207
  echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary">' . __( 'Do not allow', 'quiz-master-next' ) . '</a>';
208
  echo '</p></div>';
php/class-qsm-install.php CHANGED
@@ -603,7 +603,7 @@ class QSM_Install {
603
 
604
  update_option('mlw_quiz_master_version' , $data);
605
  if( ! isset( $_GET['activate-multi'] ) ) {
606
- wp_safe_redirect( admin_url( 'index.php?page=mlw_qmn_about' ) );
607
  exit;
608
  }
609
  }
603
 
604
  update_option('mlw_quiz_master_version' , $data);
605
  if( ! isset( $_GET['activate-multi'] ) ) {
606
+ wp_safe_redirect( admin_url( 'index.php?page=qsm_about' ) );
607
  exit;
608
  }
609
  }
php/quizzes-page.php CHANGED
@@ -283,10 +283,10 @@ function mlw_generate_quiz_admin()
283
  {
284
  ?>
285
  <div class="qsm-news-ads">
286
- <h3 class="qsm-news-ads-title">Quiz And Survey Master News</h3>
287
  <div class="qsm-news-ads-widget">
288
  <h3>Subscribe to our newsletter!</h3>
289
- <p>Join our mailing list and recevie a discount on your next purchase! Learn about our newest features, receive email-only promotions, receive tips and guides, and more!</p>
290
  <a target="_blank" href="http://quizandsurveymaster.com/subscribe-to-our-newsletter/?utm_source=qsm-quizzes-page&utm_medium=plugin&utm_campaign=qsm_plugin&utm_content=subscribe-to-newsletter" class="button-primary">Subscribe Now</a>
291
  </div>
292
  <?php
283
  {
284
  ?>
285
  <div class="qsm-news-ads">
286
+ <h3 class="qsm-news-ads-title">QSM News</h3>
287
  <div class="qsm-news-ads-widget">
288
  <h3>Subscribe to our newsletter!</h3>
289
+ <p>Join our mailing list and receive a discount on your next purchase! Learn about our newest features, receive email-only promotions, receive tips and guides, and more!</p>
290
  <a target="_blank" href="http://quizandsurveymaster.com/subscribe-to-our-newsletter/?utm_source=qsm-quizzes-page&utm_medium=plugin&utm_campaign=qsm_plugin&utm_content=subscribe-to-newsletter" class="button-primary">Subscribe Now</a>
291
  </div>
292
  <?php
php/settings-page.php CHANGED
@@ -5,8 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
5
  *
6
  * @since 4.1.0
7
  */
8
- class QMNGlobalSettingsPage
9
- {
10
 
11
  /**
12
  * Main Construct Function
@@ -18,21 +17,8 @@ class QMNGlobalSettingsPage
18
  * @uses QMNGlobalSettingsPage::add_hooks() Adds actions to hooks and filters
19
  * @return void
20
  */
21
- function __construct()
22
- {
23
- $this->load_dependencies();
24
  $this->add_hooks();
25
- }
26
-
27
- /**
28
- * Load File Dependencies
29
- *
30
- * @since 4.1.0
31
- * @return void
32
- */
33
- private function load_dependencies()
34
- {
35
-
36
  }
37
 
38
  /**
@@ -43,9 +29,8 @@ class QMNGlobalSettingsPage
43
  * @since 4.1.0
44
  * @return void
45
  */
46
- private function add_hooks()
47
- {
48
- add_action("admin_init", array($this, 'init'));
49
  }
50
 
51
  /**
@@ -54,16 +39,15 @@ class QMNGlobalSettingsPage
54
  * @since 4.1.0
55
  * @return void
56
  */
57
- public function init()
58
- {
59
  register_setting( 'qmn-settings-group', 'qmn-settings' );
60
- add_settings_section( 'qmn-global-section', 'Main Settings', array($this, 'global_section'), 'qmn_global_settings' );
61
- add_settings_field( 'usage-tracker', 'Allow Usage Tracking?', array($this, 'usage_tracker_field'), 'qmn_global_settings', 'qmn-global-section' );
62
- add_settings_field( 'cpt-search', 'Disable Quiz Posts From Being Searched?', array($this, 'cpt_search_field'), 'qmn_global_settings', 'qmn-global-section' );
63
- add_settings_field( 'cpt-archive', 'Disable Quiz Archive?', array($this, 'cpt_archive_field'), 'qmn_global_settings', 'qmn-global-section' );
64
- add_settings_field( 'cpt-slug', 'Quiz Url Slug', array($this, 'cpt_slug_field'), 'qmn_global_settings', 'qmn-global-section' );
65
- add_settings_field( 'facebook-app-id', 'Facebook App Id', array($this, 'facebook_app_id'), 'qmn_global_settings', 'qmn-global-section' );
66
- add_settings_field( 'results-details', 'Template For Admin Results Details', array($this, 'results_details_template'), 'qmn_global_settings', 'qmn-global-section' );
67
  }
68
 
69
  /**
@@ -74,13 +58,11 @@ class QMNGlobalSettingsPage
74
  * @since 4.1.0
75
  * @return void
76
  */
77
- public function global_section()
78
- {
79
- echo 'These settings are applied to the entire plugin and all quizzes.';
80
- if (isset($_GET["settings-updated"]) && $_GET["settings-updated"])
81
- {
82
- flush_rewrite_rules(true);
83
- echo "<span style='color:red;'>Settings have been updated!</span>";
84
  }
85
  }
86
 
@@ -90,8 +72,7 @@ class QMNGlobalSettingsPage
90
  * @since 4.1.0
91
  * @return void
92
  */
93
- public function facebook_app_id()
94
- {
95
  $settings = (array) get_option( 'qmn-settings' );
96
  $facebook_app_id = '483815031724529';
97
  if (isset($settings['facebook_app_id']))
@@ -212,7 +193,7 @@ class QMNGlobalSettingsPage
212
  $checked = " checked='checked'";
213
  }
214
  echo "<input type='checkbox' name='qmn-settings[tracking_allowed]' id='qmn-settings[tracking_allowed]' value='2'$checked />";
215
- echo "<label for='qmn-settings[tracking_allowed]'>Allow Quiz And Survey Master to anonymously track this plugin's usage and help us make this plugin better.</label>";
216
  }
217
 
218
  /**
@@ -221,11 +202,10 @@ class QMNGlobalSettingsPage
221
  * @since 4.1.0
222
  * @return void
223
  */
224
- public static function display_page()
225
- {
226
  ?>
227
  <div class="wrap">
228
- <h2>Global Settings</h2>
229
  <form action="options.php" method="POST">
230
  <?php settings_fields( 'qmn-settings-group' ); ?>
231
  <?php do_settings_sections( 'qmn_global_settings' ); ?>
5
  *
6
  * @since 4.1.0
7
  */
8
+ class QMNGlobalSettingsPage {
 
9
 
10
  /**
11
  * Main Construct Function
17
  * @uses QMNGlobalSettingsPage::add_hooks() Adds actions to hooks and filters
18
  * @return void
19
  */
20
+ function __construct() {
 
 
21
  $this->add_hooks();
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
 
24
  /**
29
  * @since 4.1.0
30
  * @return void
31
  */
32
+ private function add_hooks() {
33
+ add_action( "admin_init", array( $this, 'init' ) );
 
34
  }
35
 
36
  /**
39
  * @since 4.1.0
40
  * @return void
41
  */
42
+ public function init() {
 
43
  register_setting( 'qmn-settings-group', 'qmn-settings' );
44
+ add_settings_section( 'qmn-global-section', __( 'Main Settings', 'quiz-master-next' ), array($this, 'global_section'), 'qmn_global_settings' );
45
+ add_settings_field( 'usage-tracker', __( 'Allow Usage Tracking?', 'quiz-master-next' ), array($this, 'usage_tracker_field'), 'qmn_global_settings', 'qmn-global-section' );
46
+ add_settings_field( 'cpt-search', __( 'Disable Quiz Posts From Being Searched?', 'quiz-master-next' ), array($this, 'cpt_search_field'), 'qmn_global_settings', 'qmn-global-section' );
47
+ add_settings_field( 'cpt-archive', __( 'Disable Quiz Archive?', 'quiz-master-next' ), array($this, 'cpt_archive_field'), 'qmn_global_settings', 'qmn-global-section' );
48
+ add_settings_field( 'cpt-slug', __( 'Quiz Url Slug', 'quiz-master-next' ) , array($this, 'cpt_slug_field'), 'qmn_global_settings', 'qmn-global-section' );
49
+ add_settings_field( 'facebook-app-id', __( 'Facebook App Id', 'quiz-master-next' ), array($this, 'facebook_app_id'), 'qmn_global_settings', 'qmn-global-section' );
50
+ add_settings_field( 'results-details', __( 'Template For Admin Results Details', 'quiz-master-next' ), array($this, 'results_details_template'), 'qmn_global_settings', 'qmn-global-section' );
51
  }
52
 
53
  /**
58
  * @since 4.1.0
59
  * @return void
60
  */
61
+ public function global_section() {
62
+ _e( 'These settings are applied to the entire plugin and all quizzes.', 'quiz-master-next' );
63
+ if ( isset( $_GET["settings-updated"] ) && $_GET["settings-updated"] ) {
64
+ flush_rewrite_rules( true );
65
+ echo "<span style='color:red;'>" . __( 'Settings have been updated!', 'quiz-master-next' ) . "</span>";
 
 
66
  }
67
  }
68
 
72
  * @since 4.1.0
73
  * @return void
74
  */
75
+ public function facebook_app_id() {
 
76
  $settings = (array) get_option( 'qmn-settings' );
77
  $facebook_app_id = '483815031724529';
78
  if (isset($settings['facebook_app_id']))
193
  $checked = " checked='checked'";
194
  }
195
  echo "<input type='checkbox' name='qmn-settings[tracking_allowed]' id='qmn-settings[tracking_allowed]' value='2'$checked />";
196
+ echo "<label for='qmn-settings[tracking_allowed]'>" . __( "Allow Quiz And Survey Master to anonymously track this plugin's usage and help us make this plugin better.", 'quiz-master-next' ) . "</label>";
197
  }
198
 
199
  /**
202
  * @since 4.1.0
203
  * @return void
204
  */
205
+ public static function display_page() {
 
206
  ?>
207
  <div class="wrap">
208
+ <h2><?php _e( 'Global Settings', 'quiz-master-next' ); ?></h2>
209
  <form action="options.php" method="POST">
210
  <?php settings_fields( 'qmn-settings-group' ); ?>
211
  <?php do_settings_sections( 'qmn_global_settings' ); ?>
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: mylocalwebstop, fpcorso, elrath, dukeran
3
  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.3
6
  Tested up to: 4.7
7
- Stable tag: 4.7.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -109,6 +109,10 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
109
 
110
  == Changelog ==
111
 
 
 
 
 
112
  = 4.7.9 (December 13, 2016) =
113
  * Closed Security: CSRF vulnerability on Questions tab
114
 
@@ -119,14 +123,9 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
119
  * Closed Bug: "You Deserve It" button in review message leads to 404 - Issue #476
120
  * Closed Bug: In the Hint dropdown text, the 'apostrophe' does not display properly - Issue #453
121
 
122
- = 4.7.7 (September 10, 2016) =
123
- * Closed Bug: From Email Bug Causing 500 Error On WP 4.6 - Issue #473
124
- * Closed Enhancement: Table Styles Don't Match Default WordPress Styles. - Issue #471
125
- * Closed Bug: Tracking manager causes admin server error when request error occurs. - Issue #470
126
-
127
  ([Read Full Changelog](https://github.com/fpcorso/quiz_master_next/blob/master/CHANGELOG.md))
128
 
129
  == Upgrade Notice ==
130
 
131
- = 4.7.9 =
132
- Important security update to fix CSRF vulnerability
2
  Contributors: mylocalwebstop, fpcorso, elrath, dukeran
3
  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.4
6
  Tested up to: 4.7
7
+ Stable tag: 4.7.10
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.10 (January 1, 2017) =
113
+ * Closed Bug: Edit question not working when visual editor is off - Issue #497
114
+ * Closed Bug: Localization incomplete on Global Settings page - Issue #478
115
+
116
  = 4.7.9 (December 13, 2016) =
117
  * Closed Security: CSRF vulnerability on Questions tab
118
 
123
  * Closed Bug: "You Deserve It" button in review message leads to 404 - Issue #476
124
  * Closed Bug: In the Hint dropdown text, the 'apostrophe' does not display properly - Issue #453
125
 
 
 
 
 
 
126
  ([Read Full Changelog](https://github.com/fpcorso/quiz_master_next/blob/master/CHANGELOG.md))
127
 
128
  == Upgrade Notice ==
129
 
130
+ = 4.7.10 =
131
+ Upgrade to fix visual editor bug preventing some users from being able to edit their questions