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

Version Description

Upgrade to fix bug that made questions vanish.

Download this release

Release Info

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

Code changes from version 0.8.1 to 0.8.2

{assests → assets}/screenshot-1.png RENAMED
File without changes
{assests → assets}/screenshot-2.png RENAMED
File without changes
{assests → assets}/screenshot-3.png RENAMED
File without changes
{assests → assets}/screenshot-4.png RENAMED
File without changes
{assests → assets}/screenshot-5.png RENAMED
File without changes
includes/mlw_main_page.php CHANGED
@@ -194,10 +194,13 @@ function quiz_wpss_mrt_meta_box2()
194
  <div>
195
  <table width='100%'>
196
  <tr>
197
- <td align='left'>0.8.1 (December 9, 2013)</td>
198
  </tr>
199
  <tr>
200
- <td align='left'>* Fixed Disappearing Question Bug</td>
 
 
 
201
  </tr>
202
  </table>
203
  </div>
194
  <div>
195
  <table width='100%'>
196
  <tr>
197
+ <td align='left'>0.8.2 (December 10, 2013)</td>
198
  </tr>
199
  <tr>
200
+ <td align='left'>* Fixed Disappearing Question Bug Completely</td>
201
+ </tr>
202
+ <tr>
203
+ <td align='left'>* Updated Update Process</td>
204
  </tr>
205
  </table>
206
  </div>
includes/mlw_quiz_admin.php CHANGED
@@ -8,16 +8,6 @@ Copyright 2013, My Local Webstop (email : fpcorso@mylocalwebstop.com)
8
 
9
  function mlw_generate_quiz_admin()
10
  {
11
- $data = "0.8.1";
12
- if ( ! get_option('mlw_quiz_master_version'))
13
- {
14
- add_option('mlw_quiz_master_version' , $data);
15
- }
16
- else
17
- {
18
- update_option('mlw_quiz_master_version' , $data);
19
- }
20
-
21
  global $wpdb;
22
  $table_name = $wpdb->prefix . "mlw_quizzes";
23
  $success = $_POST["create_quiz"];
8
 
9
  function mlw_generate_quiz_admin()
10
  {
 
 
 
 
 
 
 
 
 
 
11
  global $wpdb;
12
  $table_name = $wpdb->prefix . "mlw_quizzes";
13
  $success = $_POST["create_quiz"];
includes/mlw_quiz_install.php CHANGED
@@ -75,30 +75,6 @@ function mlw_quiz_activate()
75
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
76
  dbDelta($sql);
77
  }
78
-
79
- else
80
-
81
- {
82
- if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'comment_section'") != "comment_section")
83
- {
84
- $sql = "ALTER TABLE ".$table_name." ADD comment_field_text TEXT NOT NULL AFTER phone_field_text";
85
-
86
- $results = $wpdb->query( $sql );
87
-
88
- $sql = "ALTER TABLE ".$table_name." ADD comment_section INT NOT NULL AFTER admin_email";
89
-
90
- $results = $wpdb->query( $sql );
91
-
92
- $sql = "ALTER TABLE ".$table_name." ADD message_comment TEXT NOT NULL AFTER message_after";
93
-
94
- $results = $wpdb->query( $sql );
95
-
96
- $update_sql = "UPDATE ".$table_name." SET comment_field_text='Comments', comment_section=1, message_comment='Enter You Text Here'";
97
-
98
- $results = $wpdb->query( $update_sql );
99
- }
100
- }
101
-
102
  global $wpdb;
103
 
104
  $table_name = $wpdb->prefix . "mlw_questions";
@@ -159,33 +135,6 @@ function mlw_quiz_activate()
159
  dbDelta($sql);
160
  }
161
 
162
- if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'comments'") != "comments")
163
- {
164
- $sql = "ALTER TABLE ".$table_name." ADD comments INT NOT NULL AFTER correct_answer";
165
-
166
- $results = $wpdb->query( $sql );
167
-
168
- $sql = "ALTER TABLE ".$table_name." ADD hints TEXT NOT NULL AFTER comments";
169
-
170
- $results = $wpdb->query( $sql );
171
-
172
- $update_sql = "UPDATE ".$table_name." SET comments=1, hints=''";
173
-
174
- $results = $wpdb->query( $update_sql );
175
- }
176
-
177
- if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'question_order'") != "question_order")
178
- {
179
- $sql = "ALTER TABLE ".$table_name." ADD question_order INT NOT NULL AFTER hints";
180
-
181
- $results = $wpdb->query( $sql );
182
-
183
- $update_sql = "UPDATE ".$table_name." SET question_order=0";
184
-
185
- $results = $wpdb->query( $update_sql );
186
-
187
- }
188
-
189
  global $wpdb;
190
 
191
  $table_name = $wpdb->prefix . "mlw_results";
@@ -285,15 +234,6 @@ function mlw_quiz_activate()
285
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
286
  dbDelta($sql);
287
  }
288
- $data = "0.8.1";
289
- if ( ! get_option('mlw_quiz_master_version'))
290
- {
291
- add_option('mlw_quiz_master_version' , $data);
292
- }
293
- else
294
- {
295
- update_option('mlw_quiz_master_version' , $data);
296
- }
297
  }
298
 
299
  function mlw_quiz_deactivate()
75
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
76
  dbDelta($sql);
77
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  global $wpdb;
79
 
80
  $table_name = $wpdb->prefix . "mlw_questions";
135
  dbDelta($sql);
136
  }
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  global $wpdb;
139
 
140
  $table_name = $wpdb->prefix . "mlw_results";
234
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
235
  dbDelta($sql);
236
  }
 
 
 
 
 
 
 
 
 
237
  }
238
 
239
  function mlw_quiz_deactivate()
includes/mlw_update.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function mlw_quiz_update()
4
+ {
5
+ $data = "0.8.2";
6
+ if ( ! get_option('mlw_quiz_master_version'))
7
+ {
8
+ add_option('mlw_quiz_master_version' , $data);
9
+ }
10
+ elseif (get_option('mlw_quiz_master_version') != $data)
11
+ {
12
+ global $wpdb;
13
+ $table_name = $wpdb->prefix . "mlw_quizzes";
14
+ if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'comment_section'") != "comment_section")
15
+ {
16
+ $sql = "ALTER TABLE ".$table_name." ADD comment_field_text TEXT NOT NULL AFTER phone_field_text";
17
+ $results = $wpdb->query( $sql );
18
+ $sql = "ALTER TABLE ".$table_name." ADD comment_section INT NOT NULL AFTER admin_email";
19
+ $results = $wpdb->query( $sql );
20
+ $sql = "ALTER TABLE ".$table_name." ADD message_comment TEXT NOT NULL AFTER message_after";
21
+ $results = $wpdb->query( $sql );
22
+ $update_sql = "UPDATE ".$table_name." SET comment_field_text='Comments', comment_section=1, message_comment='Enter You Text Here'";
23
+ $results = $wpdb->query( $update_sql );
24
+ }
25
+ global $wpdb;
26
+ $table_name = $wpdb->prefix . "mlw_questions";
27
+ if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'comments'") != "comments")
28
+ {
29
+ $sql = "ALTER TABLE ".$table_name." ADD comments INT NOT NULL AFTER correct_answer";
30
+ $results = $wpdb->query( $sql );
31
+ $sql = "ALTER TABLE ".$table_name." ADD hints TEXT NOT NULL AFTER comments";
32
+ $results = $wpdb->query( $sql );
33
+ $update_sql = "UPDATE ".$table_name." SET comments=1, hints=''";
34
+ $results = $wpdb->query( $update_sql );
35
+ }
36
+
37
+ if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'question_order'") != "question_order")
38
+ {
39
+ $sql = "ALTER TABLE ".$table_name." ADD question_order INT NOT NULL AFTER hints";
40
+ $results = $wpdb->query( $sql );
41
+ $update_sql = "UPDATE ".$table_name." SET question_order=0";
42
+ $results = $wpdb->query( $update_sql );
43
+ }
44
+ update_option('mlw_quiz_master_version' , $data);
45
+ }
46
+ }
47
+ ?>
mlw_quizmaster2.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Quiz Master Next
5
  Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
6
- Version: 0.8.1
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
@@ -33,10 +33,12 @@ include("includes/mlw_results_details.php");
33
  include("includes/mlw_tools.php");
34
  include("includes/mlw_leaderboard.php");
35
  include("includes/mlw_help.php");
 
36
 
37
 
38
  ///Activation Actions
39
  add_action('admin_menu', 'mlw_add_menu');
 
40
  add_shortcode('mlw_quizmaster', 'mlw_quiz_shortcode');
41
  add_shortcode('mlw_quizmaster_leaderboard', 'mlw_quiz_leaderboard_shortcode');
42
  register_activation_hook( __FILE__, 'mlw_quiz_activate');
3
  /*
4
  Plugin Name: Quiz Master Next
5
  Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
6
+ Version: 0.8.2
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
33
  include("includes/mlw_tools.php");
34
  include("includes/mlw_leaderboard.php");
35
  include("includes/mlw_help.php");
36
+ include("includes/mlw_update.php");
37
 
38
 
39
  ///Activation Actions
40
  add_action('admin_menu', 'mlw_add_menu');
41
+ add_action('init', 'mlw_quiz_update');
42
  add_shortcode('mlw_quizmaster', 'mlw_quiz_shortcode');
43
  add_shortcode('mlw_quizmaster_leaderboard', 'mlw_quiz_leaderboard_shortcode');
44
  register_activation_hook( __FILE__, 'mlw_quiz_activate');
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: fpcorso
3
  Tags: quiz, test, score, survey
4
  Requires at least: 3.0.1
5
  Tested up to: 3.7.1
6
- Stable tag: 0.8.1
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
 
9
  Use this plugin to add multiple quizzes, tests, or surveys to your website.
@@ -47,6 +47,10 @@ Feel free to use the support option on the main page of the plugin or from the c
47
 
48
  == Changelog ==
49
 
 
 
 
 
50
  = 0.8.1 (December 9, 2013) =
51
  * Fixed Disappearing Question Bug
52
 
@@ -132,6 +136,9 @@ Feel free to use the support option on the main page of the plugin or from the c
132
 
133
  == Upgrade Notice ==
134
 
 
 
 
135
  = 0.8.1 =
136
  Upgrade to fix bug that made questions vanish.
137
 
3
  Tags: quiz, test, score, survey
4
  Requires at least: 3.0.1
5
  Tested up to: 3.7.1
6
+ Stable tag: 0.8.2
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
 
9
  Use this plugin to add multiple quizzes, tests, or surveys to your website.
47
 
48
  == Changelog ==
49
 
50
+ = 0.8.2 (December 10, 2013) =
51
+ * Fixed Disappearing Question Bug Completely
52
+ * Updated Update Process
53
+
54
  = 0.8.1 (December 9, 2013) =
55
  * Fixed Disappearing Question Bug
56
 
136
 
137
  == Upgrade Notice ==
138
 
139
+ = 0.8.2 =
140
+ Upgrade to fix bug that made questions vanish.
141
+
142
  = 0.8.1 =
143
  Upgrade to fix bug that made questions vanish.
144