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

Version Description

Upgrade to enjoy small tweaks throughout admin side

Download this release

Release Info

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

Code changes from version 0.8.2 to 0.8.3

includes/mlw_dashboard.php CHANGED
@@ -13,6 +13,7 @@ function mlw_generate_quiz_dashboard(){
13
  add_meta_box("wpss_mrts", 'Quiz Daily Stats', "mlw_dashboard_box", "quiz_wpss");
14
  add_meta_box("wpss_mrts", 'Help', "mlw_dashboard_box_two", "quiz_wpss2");
15
  add_meta_box("wpss_mrts", 'Quiz Total Stats', "mlw_dashboard_box_three", "quiz_wpss3");
 
16
  ?>
17
  <!-- css -->
18
  <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" />
@@ -67,14 +68,18 @@ function mlw_generate_quiz_dashboard(){
67
  <?php do_meta_boxes('quiz_wpss','advanced',''); ?>
68
  </div>
69
 
70
- <div style="float:right; width:36%; " class="inner-sidebar1">
71
- <?php do_meta_boxes('quiz_wpss2','advanced',''); ?>
72
  </div>
73
 
74
  <!--<div style="clear:both"></div>-->
75
 
76
  <div style="float:left; width:60%;" class="inner-sidebar1">
77
- <?php do_meta_boxes('quiz_wpss3','advanced',''); ?>
 
 
 
 
78
  </div>
79
 
80
  <!--<div style="clear:both"></div>-->
@@ -149,10 +154,10 @@ function mlw_dashboard_box_two()
149
  <td align='left'>There is a (?) next to the title of each page. Click on it to bring up the help for that page.</td>
150
  </tr>
151
  <tr>
152
- <td align='left'></td>
153
  </tr>
154
  <tr>
155
- <td align='left'></td>
156
  </tr>
157
  <tr>
158
  <td align='left'></td>
@@ -252,4 +257,27 @@ function mlw_dashboard_box_three()
252
  </div>
253
  <?php
254
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  ?>
13
  add_meta_box("wpss_mrts", 'Quiz Daily Stats', "mlw_dashboard_box", "quiz_wpss");
14
  add_meta_box("wpss_mrts", 'Help', "mlw_dashboard_box_two", "quiz_wpss2");
15
  add_meta_box("wpss_mrts", 'Quiz Total Stats', "mlw_dashboard_box_three", "quiz_wpss3");
16
+ add_meta_box("wpss_mrts", 'Quiz Weekly Stats', "mlw_dashboard_box_four", "quiz_wpss4");
17
  ?>
18
  <!-- css -->
19
  <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" />
68
  <?php do_meta_boxes('quiz_wpss','advanced',''); ?>
69
  </div>
70
 
71
+ <div style="float:right; width:36%;" class="inner-sidebar1">
72
+ <?php do_meta_boxes('quiz_wpss3','advanced',''); ?>
73
  </div>
74
 
75
  <!--<div style="clear:both"></div>-->
76
 
77
  <div style="float:left; width:60%;" class="inner-sidebar1">
78
+ <?php do_meta_boxes('quiz_wpss4','advanced',''); ?>
79
+ </div>
80
+
81
+ <div style="float:right; width:36%; " class="inner-sidebar1">
82
+ <?php do_meta_boxes('quiz_wpss2','advanced',''); ?>
83
  </div>
84
 
85
  <!--<div style="clear:both"></div>-->
154
  <td align='left'>There is a (?) next to the title of each page. Click on it to bring up the help for that page.</td>
155
  </tr>
156
  <tr>
157
+ <td align='left'>If the help does not answer your question, take a look at the How-To section from the menu.</td>
158
  </tr>
159
  <tr>
160
+ <td align='left'>If you still are having trouble, feel free to use the support section from the support page to contact me.</td>
161
  </tr>
162
  <tr>
163
  <td align='left'></td>
257
  </div>
258
  <?php
259
  }
260
+ function mlw_dashboard_box_four()
261
+ {
262
+ //Gather the weekly stats, one variable for each day for the graph
263
+ global $wpdb;
264
+ $mlw_this_week = mktime(0, 0, 0, date("m") , date("d")-6, date("Y"));
265
+ $mlw_this_week = date("Y-m-d", $mlw_this_week);
266
+ $sql = "SELECT quiz_name FROM " . $wpdb->prefix . "mlw_results WHERE (time_taken_real BETWEEN '".$mlw_this_week." 00:00:00' AND '".date("Y-m-d")." 23:59:59')";
267
+ $mlw_quiz_taken_this_week = $wpdb->get_results($sql);
268
+ $mlw_quiz_taken_this_week = $wpdb->num_rows;
269
+
270
+ $mlw_last_week_first = mktime(0, 0, 0, date("m") , date("d")-13, date("Y"));
271
+ $mlw_last_week_first = date("Y-m-d", $mlw_last_week_first);
272
+ $mlw_last_week_last = mktime(0, 0, 0, date("m") , date("d")-7, date("Y"));
273
+ $mlw_last_week_last = date("Y-m-d", $mlw_last_week_last);
274
+ $sql = "SELECT quiz_name FROM " . $wpdb->prefix . "mlw_results WHERE (time_taken_real BETWEEN '".$mlw_last_week_first." 00:00:00' AND '".$mlw_last_week_last." 23:59:59')";
275
+ $mlw_quiz_taken_last_week = $wpdb->get_results($sql);
276
+ $mlw_quiz_taken_last_week = $wpdb->num_rows;
277
+ ?>
278
+ <div>
279
+ <span class="inlinesparkline"><?php echo $mlw_quiz_taken_last_week.",".$mlw_quiz_taken_this_week; ?></span>
280
+ </div>
281
+ <?php
282
+ }
283
  ?>
includes/mlw_leaderboard.php CHANGED
@@ -8,7 +8,7 @@ function mlw_quiz_leaderboard_shortcode($atts)
8
  'mlw_quiz' => 0
9
  ), $atts));
10
  $mlw_quiz_id = $mlw_quiz;
11
-
12
 
13
 
14
  global $wpdb;
@@ -21,24 +21,21 @@ function mlw_quiz_leaderboard_shortcode($atts)
21
  $sql = "SELECT * FROM " . $wpdb->prefix . "mlw_results WHERE quiz_id=".$mlw_quiz_id." AND deleted='0' LIMIT 10";
22
  $mlw_result_data = $wpdb->get_results($sql);
23
 
24
- ?>
25
- <h3><?php echo $mlw_quiz_options->quiz_name; ?>'s Leaderboard</h3>
26
- <?php
27
  $leader_count = 0;
28
  foreach($mlw_result_data as $mlw_eaches) {
29
  $leader_count++;
30
  if ($mlw_quiz_options->system == 0)
31
  {
32
- echo $leader_count.".&nbsp;".$mlw_eaches->name."&nbsp; - ".$mlw_eaches->correct_score."%";
33
  }
34
  if ($mlw_quiz_options->system == 1)
35
  {
36
- echo $leader_count.".&nbsp;".$mlw_eaches->name."&nbsp; - ".$mlw_eaches->point_score." Points";
37
  }
38
- echo "<br />";
39
  }
40
- ?>
41
- <br />
42
- <?php
43
  }
44
  ?>
8
  'mlw_quiz' => 0
9
  ), $atts));
10
  $mlw_quiz_id = $mlw_quiz;
11
+ $mlw_quiz_leaderboard_display = "";
12
 
13
 
14
  global $wpdb;
21
  $sql = "SELECT * FROM " . $wpdb->prefix . "mlw_results WHERE quiz_id=".$mlw_quiz_id." AND deleted='0' LIMIT 10";
22
  $mlw_result_data = $wpdb->get_results($sql);
23
 
24
+ $mlw_quiz_leaderboard_display .= "<h3>".$mlw_quiz_options->quiz_name."'s Leaderboard</h3>";
 
 
25
  $leader_count = 0;
26
  foreach($mlw_result_data as $mlw_eaches) {
27
  $leader_count++;
28
  if ($mlw_quiz_options->system == 0)
29
  {
30
+ $mlw_quiz_leaderboard_display .= "<p>".$leader_count.".&nbsp;".$mlw_eaches->name."&nbsp; - ".$mlw_eaches->correct_score."%</p>";
31
  }
32
  if ($mlw_quiz_options->system == 1)
33
  {
34
+ $mlw_quiz_leaderboard_display .= "<p>".$leader_count.".&nbsp;".$mlw_eaches->name."&nbsp; - ".$mlw_eaches->point_score." Points</p>";
35
  }
36
+ $mlw_quiz_leaderboard_display .= "<br />";
37
  }
38
+ $mlw_quiz_leaderboard_display .= "<br />";
39
+ return $mlw_quiz_leaderboard_display;
 
40
  }
41
  ?>
includes/mlw_main_page.php CHANGED
@@ -43,7 +43,6 @@ function mlw_generate_main_page()
43
  </script>
44
  ";
45
  $mlw_quiz_version = get_option('mlw_quiz_master_version');
46
- add_meta_box("wpss_mrts", 'Quiz Master Next', "quiz_wpss_mrt_meta_box", "quiz_wpss");
47
  add_meta_box("wpss_mrts", 'In This Update', "quiz_wpss_mrt_meta_box2", "quiz_wpss2");
48
  add_meta_box("wpss_mrts", 'Support', "quiz_wpss_mrt_meta_box3", "quiz_wpss3");
49
  add_meta_box("wpss_mrts", 'Contribution', "quiz_wpss_mrt_meta_box4", "quiz_wpss4");
@@ -154,53 +153,25 @@ function mlw_generate_main_page()
154
  <?php
155
  }
156
 
157
- function quiz_wpss_mrt_meta_box()
158
  {
159
- global $wpdb;
160
- $sql = "SELECT SUM(quiz_views) AS QuizViews FROM " . $wpdb->prefix . "mlw_quizzes";
161
- $mlw_quiz_views = $wpdb->get_results($sql);
162
-
163
- foreach($mlw_quiz_views as $mlw_eaches) {
164
- $mlw_quiz_views = $mlw_eaches->QuizViews;
165
- break;
166
- }
167
-
168
- $sql = "SELECT SUM(quiz_taken) AS QuizTaken FROM " . $wpdb->prefix . "mlw_quizzes";
169
- $mlw_quiz_taken = $wpdb->get_results($sql);
170
-
171
- foreach($mlw_quiz_taken as $mlw_eaches) {
172
- $mlw_quiz_taken = $mlw_eaches->QuizTaken;
173
- break;
174
- }
175
  ?>
176
  <div>
177
  <table width='100%'>
178
  <tr>
179
- <td align='left'>Total Times All Quizzes Have Been Viewed</td>
180
- <td align='right'><?php echo $mlw_quiz_views; ?></td>
181
  </tr>
182
  <tr>
183
- <td align='left'>Total Times All Quizzes Have Been Taken</td>
184
- <td align='right'><?php echo $mlw_quiz_taken; ?></td>
185
  </tr>
186
- </table>
187
- </div>
188
- <?php
189
- }
190
-
191
- function quiz_wpss_mrt_meta_box2()
192
- {
193
- ?>
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>
@@ -298,6 +269,11 @@ function quiz_wpss_mrt_meta_box4()
298
  </td>
299
  </tr>
300
  </table>
 
 
 
 
 
301
  </div>
302
  <?php
303
  }
43
  </script>
44
  ";
45
  $mlw_quiz_version = get_option('mlw_quiz_master_version');
 
46
  add_meta_box("wpss_mrts", 'In This Update', "quiz_wpss_mrt_meta_box2", "quiz_wpss2");
47
  add_meta_box("wpss_mrts", 'Support', "quiz_wpss_mrt_meta_box3", "quiz_wpss3");
48
  add_meta_box("wpss_mrts", 'Contribution', "quiz_wpss_mrt_meta_box4", "quiz_wpss4");
153
  <?php
154
  }
155
 
156
+ function quiz_wpss_mrt_meta_box2()
157
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  ?>
159
  <div>
160
  <table width='100%'>
161
  <tr>
162
+ <td align='left'>0.8.3 (December 14, 2013)</td>
 
163
  </tr>
164
  <tr>
165
+ <td align='left'>* Fixed Leaderboard Bug</td>
 
166
  </tr>
 
 
 
 
 
 
 
 
 
 
167
  <tr>
168
+ <td align='left'>* Started Work On Weekly Stat Widget</td>
169
  </tr>
170
  <tr>
171
+ <td align='left'>* Tweaked Some Design Throughout Admin Side</td>
172
  </tr>
173
  <tr>
174
+ <td align='left'>* Minor Bug Fixes</td>
175
  </tr>
176
  </table>
177
  </div>
269
  </td>
270
  </tr>
271
  </table>
272
+ <p>Thank you to those who have contributed so far.</p>
273
+ <h3>Supporters</h3>
274
+ <ul>
275
+ <li>Tracy B</li>
276
+ </ul>
277
  </div>
278
  <?php
279
  }
includes/mlw_quiz_options.php CHANGED
@@ -433,10 +433,6 @@ function mlw_generate_quiz_options()
433
  {
434
  ?>
435
  <h2>Quiz Options For <?php echo $mlw_quiz_options->quiz_name; ?><a id="opener" href="">(?)</a></h2>
436
- <div class="ui-state-error ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
437
- <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
438
- <strong></strong>If you are experiencing an error where your questions are missing and cannot add more, try deactivating and re-activating the plugin.</p>
439
- </div>
440
  <?php if ($hasCreatedQuestion)
441
  {
442
  ?>
@@ -526,10 +522,11 @@ function mlw_generate_quiz_options()
526
  ?>
527
  <tr valign="top">
528
  <th scope="row">Question</th>
529
- <td>
530
  <input type="text" name="question_name" value="" style="border-color:#000000;
531
  color:#3300CC;
532
- cursor:hand;"/>
 
533
  </td>
534
  </tr>
535
  <tr valign="top">
@@ -626,6 +623,8 @@ function mlw_generate_quiz_options()
626
  </td>
627
  <td><input type="radio" name="correct_answer" value=6 /></td>
628
  </tr>
 
 
629
  <tr valign="top">
630
  <th scope="row">Comments?</th>
631
  <td><input type="radio" id="commentsRadio1" name="comments" checked="checked" value=0 /><label for="commentsRadio1">Yes</label></td>
@@ -659,10 +658,11 @@ function mlw_generate_quiz_options()
659
  ?>
660
  <tr valign="top">
661
  <th scope="row">Question</th>
662
- <td>
663
  <input type="text" name="edit_question_name" id="edit_question_name" value="" style="border-color:#000000;
664
  color:#3300CC;
665
- cursor:hand;"/>
 
666
  </td>
667
  </tr>
668
  <tr valign="top">
@@ -759,6 +759,8 @@ function mlw_generate_quiz_options()
759
  </td>
760
  <td><input type="radio" id="edit_correct_six" name="edit_correct_answer" value=6 /></td>
761
  </tr>
 
 
762
  <tr valign="top">
763
  <th scope="row">Comments?</th>
764
  <td><input type="radio" id="editCommentRadio1" name="edit_comments" value=0 /><label for="editCommentRadio1">Yes</label></td>
433
  {
434
  ?>
435
  <h2>Quiz Options For <?php echo $mlw_quiz_options->quiz_name; ?><a id="opener" href="">(?)</a></h2>
 
 
 
 
436
  <?php if ($hasCreatedQuestion)
437
  {
438
  ?>
522
  ?>
523
  <tr valign="top">
524
  <th scope="row">Question</th>
525
+ <td colspan="3">
526
  <input type="text" name="question_name" value="" style="border-color:#000000;
527
  color:#3300CC;
528
+ cursor:hand;
529
+ width: 100%;"/>
530
  </td>
531
  </tr>
532
  <tr valign="top">
623
  </td>
624
  <td><input type="radio" name="correct_answer" value=6 /></td>
625
  </tr>
626
+ <tr><td>&nbsp;</td></tr>
627
+ <tr><td>&nbsp;</td></tr>
628
  <tr valign="top">
629
  <th scope="row">Comments?</th>
630
  <td><input type="radio" id="commentsRadio1" name="comments" checked="checked" value=0 /><label for="commentsRadio1">Yes</label></td>
658
  ?>
659
  <tr valign="top">
660
  <th scope="row">Question</th>
661
+ <td colspan="3">
662
  <input type="text" name="edit_question_name" id="edit_question_name" value="" style="border-color:#000000;
663
  color:#3300CC;
664
+ cursor:hand;
665
+ width: 100%;"/>
666
  </td>
667
  </tr>
668
  <tr valign="top">
759
  </td>
760
  <td><input type="radio" id="edit_correct_six" name="edit_correct_answer" value=6 /></td>
761
  </tr>
762
+ <tr><td>&nbsp;</td></tr>
763
+ <tr><td>&nbsp;</td></tr>
764
  <tr valign="top">
765
  <th scope="row">Comments?</th>
766
  <td><input type="radio" id="editCommentRadio1" name="edit_comments" value=0 /><label for="editCommentRadio1">Yes</label></td>
includes/mlw_update.php CHANGED
@@ -2,7 +2,7 @@
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);
2
 
3
  function mlw_quiz_update()
4
  {
5
+ $data = "0.8.3";
6
  if ( ! get_option('mlw_quiz_master_version'))
7
  {
8
  add_option('mlw_quiz_master_version' , $data);
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.2
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
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.3
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
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.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,6 +47,12 @@ 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.2 (December 10, 2013) =
51
  * Fixed Disappearing Question Bug Completely
52
  * Updated Update Process
@@ -136,6 +142,9 @@ Feel free to use the support option on the main page of the plugin or from the c
136
 
137
  == Upgrade Notice ==
138
 
 
 
 
139
  = 0.8.2 =
140
  Upgrade to fix bug that made questions vanish.
141
 
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.3
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.3 (December 14, 2013) =
51
+ * Fixed Leaderboard Bug
52
+ * Started Work On Weekly Stat Widget
53
+ * Tweaked Some Design Throughout Admin Side
54
+ * Minor Bug Fixes
55
+
56
  = 0.8.2 (December 10, 2013) =
57
  * Fixed Disappearing Question Bug Completely
58
  * Updated Update Process
142
 
143
  == Upgrade Notice ==
144
 
145
+ = 0.8.3 =
146
+ Upgrade to enjoy small tweaks throughout admin side
147
+
148
  = 0.8.2 =
149
  Upgrade to fix bug that made questions vanish.
150