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

Version Description

(April 6, 2014) = * Added Ability To Have Graded Open Answer Questions * Minor Design Changes

Download this release

Release Info

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

Code changes from version 2.2.2 to 2.3.1

includes/mlw_qmn_credits.php CHANGED
@@ -87,25 +87,22 @@ function mlw_generate_about_page()
87
  <a href="#" class="nav-tab nav-tab-active">
88
  What&#8217;s New In <?php echo $mlw_quiz_version; ?> </a>
89
  </h2>
90
- <h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">Now you can show question numbers on your quiz!</h2>
91
- <p>This new version brings the ability to show the question number next to the question. Navigate to the Quiz Options tab to change the "Show question number on quiz?" option to Yes.</p>
 
 
 
92
  <br />
93
  <h3>Changelog For <?php echo $mlw_quiz_version; ?></h3>
94
  <ul>
95
- <li>Added Ability To Show Question Numbers</li>
96
- <li>Added More CSS Classes To Quiz Page For Better Styling Options</li>
97
- <li>Changed Timer To Disable Fields Instead Of Submit Form When Time Is Up</li>
98
- <li>Fixed Pagination Javascript Bug</li>
99
- <li>Minor Design Change To Quiz</li>
100
- <li>Minor Design Change To Quiz Options Page</li>
101
  </ul>
102
  <h3>What's Coming Soon</h3>
103
  <ul>
104
  <li>Importing Questions</li>
105
  <li>Stats For Each Quiz</li>
106
  <li>Multiple Right Answers (Checkboxes)</li>
107
- <li>Graded Open Text Answers</li>
108
- <li>Exporting Of Results</li>
109
  <li>Unlimited Amount Of Answers</li>
110
  <li>Randomized Answers</li>
111
  <li>Force Login/Register Option</li>
87
  <a href="#" class="nav-tab nav-tab-active">
88
  What&#8217;s New In <?php echo $mlw_quiz_version; ?> </a>
89
  </h2>
90
+ <h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">Now you can have graded open answer questions!</h2>
91
+ <p>This new version brings the ability to have open answer questions. When adding or editing a question, you will see that the question type option has a new option "Open Answer" Selecting this will show the user a blank field to enter their answer into. Enter the correct answers into the answer fields.</p>
92
+ <br />
93
+ <h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">New Premium Add-Ons!</h2>
94
+ <p>We have recently added 3 new premium add-ons into our plugin store! Export Results (exports your quiz results), Extra Shortcodes (gives you extra shortcodes to use), and Advertisement Be Gone (gets rid of blue-border ads). Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details! </p>
95
  <br />
96
  <h3>Changelog For <?php echo $mlw_quiz_version; ?></h3>
97
  <ul>
98
+ <li>Added Ability To Have Graded Open Answer Questions</li>
99
+ <li>Minor Design Changes</li>
 
 
 
 
100
  </ul>
101
  <h3>What's Coming Soon</h3>
102
  <ul>
103
  <li>Importing Questions</li>
104
  <li>Stats For Each Quiz</li>
105
  <li>Multiple Right Answers (Checkboxes)</li>
 
 
106
  <li>Unlimited Amount Of Answers</li>
107
  <li>Randomized Answers</li>
108
  <li>Force Login/Register Option</li>
includes/mlw_quiz.php CHANGED
@@ -404,7 +404,7 @@ function mlw_quiz_shortcode($atts)
404
  }
405
  $mlw_display .= "<br />";
406
  }
407
- else
408
  {
409
  $mlw_display .= "<select required name='question".$mlw_question->question_id."'>";
410
  if ($mlw_question->answer_one != "")
@@ -434,6 +434,11 @@ function mlw_quiz_shortcode($atts)
434
  $mlw_display .= "</select>";
435
  $mlw_display .= "<br />";
436
  }
 
 
 
 
 
437
  if ($mlw_question->comments == 0)
438
  {
439
  $mlw_display .= "<input type='text' class='mlw_qmn_question_comment' x-webkit-speech id='mlwComment".$mlw_question->question_id."' name='mlwComment".$mlw_question->question_id."' value='".esc_attr(htmlspecialchars_decode($mlw_quiz_options->comment_field_text, ENT_QUOTES))."' onclick='clear_field(this)'/>";
@@ -532,50 +537,94 @@ function mlw_quiz_shortcode($atts)
532
  if (isset($_POST["question".$mlw_question->question_id]) || isset($_POST["mlwComment".$mlw_question->question_id]))
533
  {
534
  //$mlw_total_questions += 1;
535
- if (isset($_POST["question".$mlw_question->question_id]))
536
  {
537
- $mlw_user_answer = $_POST["question".$mlw_question->question_id];
538
- if ($mlw_user_answer == $mlw_question->correct_answer)
539
- {
540
- $mlw_correct += 1;
541
- }
542
- if ($mlw_user_answer == 1)
543
- {
544
- $mlw_points += $mlw_question->answer_one_points;
545
- $mlw_user_text = $mlw_question->answer_one;
546
- }
547
- if ($mlw_user_answer == 2)
548
- {
549
- $mlw_points += $mlw_question->answer_two_points;
550
- $mlw_user_text = $mlw_question->answer_two;
551
- }
552
- if ($mlw_user_answer == 3)
553
- {
554
- $mlw_points += $mlw_question->answer_three_points;
555
- $mlw_user_text = $mlw_question->answer_three;
556
- }
557
- if ($mlw_user_answer == 4)
558
- {
559
- $mlw_points += $mlw_question->answer_four_points;
560
- $mlw_user_text = $mlw_question->answer_four;
561
- }
562
- if ($mlw_user_answer == 5)
563
  {
564
- $mlw_points += $mlw_question->answer_five_points;
565
- $mlw_user_text = $mlw_question->answer_five;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  }
567
- if ($mlw_user_answer == 6)
568
  {
569
- $mlw_points += $mlw_question->answer_six_points;
570
- $mlw_user_text = $mlw_question->answer_six;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
571
  }
572
-
573
- if ($mlw_question->correct_answer == 1) {$mlw_correct_text = $mlw_question->answer_one;}
574
- if ($mlw_question->correct_answer == 2) {$mlw_correct_text = $mlw_question->answer_two;}
575
- if ($mlw_question->correct_answer == 3) {$mlw_correct_text = $mlw_question->answer_three;}
576
- if ($mlw_question->correct_answer == 4) {$mlw_correct_text = $mlw_question->answer_four;}
577
- if ($mlw_question->correct_answer == 5) {$mlw_correct_text = $mlw_question->answer_five;}
578
- if ($mlw_question->correct_answer == 6) {$mlw_correct_text = $mlw_question->answer_six;}
579
  }
580
  if (isset($_POST["mlwComment".$mlw_question->question_id]))
581
  {
404
  }
405
  $mlw_display .= "<br />";
406
  }
407
+ elseif ($mlw_question->question_type == 2)
408
  {
409
  $mlw_display .= "<select required name='question".$mlw_question->question_id."'>";
410
  if ($mlw_question->answer_one != "")
434
  $mlw_display .= "</select>";
435
  $mlw_display .= "<br />";
436
  }
437
+ else
438
+ {
439
+ $mlw_display .= "<input type='text' name='question".$mlw_question->question_id."' />";
440
+ $mlw_display .= "<br />";
441
+ }
442
  if ($mlw_question->comments == 0)
443
  {
444
  $mlw_display .= "<input type='text' class='mlw_qmn_question_comment' x-webkit-speech id='mlwComment".$mlw_question->question_id."' name='mlwComment".$mlw_question->question_id."' value='".esc_attr(htmlspecialchars_decode($mlw_quiz_options->comment_field_text, ENT_QUOTES))."' onclick='clear_field(this)'/>";
537
  if (isset($_POST["question".$mlw_question->question_id]) || isset($_POST["mlwComment".$mlw_question->question_id]))
538
  {
539
  //$mlw_total_questions += 1;
540
+ if ( isset($_POST["question".$mlw_question->question_id]) )
541
  {
542
+ if ( $mlw_question->question_type == 0 || $mlw_question->question_type == 1 || $mlw_question->question_type == 2 )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
543
  {
544
+ $mlw_user_answer = $_POST["question".$mlw_question->question_id];
545
+ if ($mlw_user_answer == $mlw_question->correct_answer)
546
+ {
547
+ $mlw_correct += 1;
548
+ }
549
+ if ($mlw_user_answer == 1)
550
+ {
551
+ $mlw_points += $mlw_question->answer_one_points;
552
+ $mlw_user_text = $mlw_question->answer_one;
553
+ }
554
+ if ($mlw_user_answer == 2)
555
+ {
556
+ $mlw_points += $mlw_question->answer_two_points;
557
+ $mlw_user_text = $mlw_question->answer_two;
558
+ }
559
+ if ($mlw_user_answer == 3)
560
+ {
561
+ $mlw_points += $mlw_question->answer_three_points;
562
+ $mlw_user_text = $mlw_question->answer_three;
563
+ }
564
+ if ($mlw_user_answer == 4)
565
+ {
566
+ $mlw_points += $mlw_question->answer_four_points;
567
+ $mlw_user_text = $mlw_question->answer_four;
568
+ }
569
+ if ($mlw_user_answer == 5)
570
+ {
571
+ $mlw_points += $mlw_question->answer_five_points;
572
+ $mlw_user_text = $mlw_question->answer_five;
573
+ }
574
+ if ($mlw_user_answer == 6)
575
+ {
576
+ $mlw_points += $mlw_question->answer_six_points;
577
+ $mlw_user_text = $mlw_question->answer_six;
578
+ }
579
+
580
+ if ($mlw_question->correct_answer == 1) {$mlw_correct_text = $mlw_question->answer_one;}
581
+ if ($mlw_question->correct_answer == 2) {$mlw_correct_text = $mlw_question->answer_two;}
582
+ if ($mlw_question->correct_answer == 3) {$mlw_correct_text = $mlw_question->answer_three;}
583
+ if ($mlw_question->correct_answer == 4) {$mlw_correct_text = $mlw_question->answer_four;}
584
+ if ($mlw_question->correct_answer == 5) {$mlw_correct_text = $mlw_question->answer_five;}
585
+ if ($mlw_question->correct_answer == 6) {$mlw_correct_text = $mlw_question->answer_six;}
586
  }
587
+ elseif ( $mlw_question->question_type == 3 )
588
  {
589
+ $mlw_correct_text = $mlw_question->answer_one;
590
+ $mlw_user_answer = $_POST["question".$mlw_question->question_id];
591
+ if (strtoupper($mlw_user_answer) == strtoupper($mlw_question->answer_one))
592
+ {
593
+ $mlw_correct += 1;
594
+ $mlw_points += $mlw_question->answer_one_points;
595
+ $mlw_user_text = $mlw_question->answer_one;
596
+ }
597
+ elseif (strtoupper($mlw_user_answer) == strtoupper($mlw_question->answer_two))
598
+ {
599
+ $mlw_correct += 1;
600
+ $mlw_points += $mlw_question->answer_two_points;
601
+ $mlw_user_text = $mlw_question->answer_two;
602
+ }
603
+ elseif (strtoupper($mlw_user_answer) == strtoupper($mlw_question->answer_three))
604
+ {
605
+ $mlw_correct += 1;
606
+ $mlw_points += $mlw_question->answer_three_points;
607
+ $mlw_user_text = $mlw_question->answer_three;
608
+ }
609
+ elseif (strtoupper($mlw_user_answer) == strtoupper($mlw_question->answer_four))
610
+ {
611
+ $mlw_correct += 1;
612
+ $mlw_points += $mlw_question->answer_four_points;
613
+ $mlw_user_text = $mlw_question->answer_four;
614
+ }
615
+ elseif (strtoupper($mlw_user_answer) == strtoupper($mlw_question->answer_five))
616
+ {
617
+ $mlw_correct += 1;
618
+ $mlw_points += $mlw_question->answer_five_points;
619
+ $mlw_user_text = $mlw_question->answer_five;
620
+ }
621
+ elseif (strtoupper($mlw_user_answer) == strtoupper($mlw_question->answer_six))
622
+ {
623
+ $mlw_correct += 1;
624
+ $mlw_points += $mlw_question->answer_six_points;
625
+ $mlw_user_text = $mlw_question->answer_six;
626
+ }
627
  }
 
 
 
 
 
 
 
628
  }
629
  if (isset($_POST["mlwComment".$mlw_question->question_id]))
630
  {
includes/mlw_quiz_options.php CHANGED
@@ -838,19 +838,10 @@ function mlw_generate_quiz_options()
838
  if (question_type == 0) $j('#editTypeRadio1').attr('checked', true).button('refresh');
839
  if (question_type == 1) $j('#editTypeRadio2').attr('checked', true).button('refresh');
840
  if (question_type == 2) $j('#editTypeRadio3').attr('checked', true).button('refresh');
841
- /*
842
- if (question_type == 0) document.getElementById("editTypeRadio1").checked = true;
843
- if (question_type == 1) document.getElementById("editTypeRadio2").checked = true;
844
- if (question_type == 2) document.getElementById("editTypeRadio3").checked = true;
845
- */
846
  if (comments == 0) $j('#editCommentRadio1').attr('checked', true).button('refresh');
847
  if (comments == 1) $j('#editCommentRadio2').attr('checked', true).button('refresh');
848
  if (comments == 2) $j('#editCommentRadio3').attr('checked', true).button('refresh');
849
- /*
850
- if (comments == 0) document.getElementById("editCommentRadio1").checked = true;
851
- if (comments == 1) document.getElementById("editCommentRadio2").checked = true;
852
- if (comments == 2) document.getElementById("editCommentRadio3").checked = true;
853
- */
854
  };
855
  function delete_landing(id)
856
  {
@@ -1181,6 +1172,7 @@ function mlw_generate_quiz_options()
1181
  <input type="radio" id="typeRadio1" name="question_type" checked="checked" value=0 /><label for="typeRadio1">Normal (Vertical Radio)</label>
1182
  <input type="radio" id="typeRadio2" name="question_type" value=1 /><label for="typeRadio2">Horizontal Radio</label>
1183
  <input type="radio" id="typeRadio3" name="question_type" value=2 /><label for="typeRadio3">Drop Down</label>
 
1184
  </div></td>
1185
  </tr>
1186
  <tr valign="top">
@@ -1345,6 +1337,7 @@ function mlw_generate_quiz_options()
1345
  <input type="radio" id="editTypeRadio1" name="edit_question_type" checked="checked" value=0 /><label for="editTypeRadio1">Normal (Vertical Radio)</label>
1346
  <input type="radio" id="editTypeRadio2" name="edit_question_type" value=1 /><label for="editTypeRadio2">Horizontal Radio</label>
1347
  <input type="radio" id="editTypeRadio3" name="edit_question_type" value=2 /><label for="editTypeRadio3">Drop Down</label>
 
1348
  </div></td>
1349
  </tr>
1350
  <tr valign="top">
838
  if (question_type == 0) $j('#editTypeRadio1').attr('checked', true).button('refresh');
839
  if (question_type == 1) $j('#editTypeRadio2').attr('checked', true).button('refresh');
840
  if (question_type == 2) $j('#editTypeRadio3').attr('checked', true).button('refresh');
841
+ if (question_type == 3) $j('#editTypeRadio4').attr('checked', true).button('refresh');
 
 
 
 
842
  if (comments == 0) $j('#editCommentRadio1').attr('checked', true).button('refresh');
843
  if (comments == 1) $j('#editCommentRadio2').attr('checked', true).button('refresh');
844
  if (comments == 2) $j('#editCommentRadio3').attr('checked', true).button('refresh');
 
 
 
 
 
845
  };
846
  function delete_landing(id)
847
  {
1172
  <input type="radio" id="typeRadio1" name="question_type" checked="checked" value=0 /><label for="typeRadio1">Normal (Vertical Radio)</label>
1173
  <input type="radio" id="typeRadio2" name="question_type" value=1 /><label for="typeRadio2">Horizontal Radio</label>
1174
  <input type="radio" id="typeRadio3" name="question_type" value=2 /><label for="typeRadio3">Drop Down</label>
1175
+ <input type="radio" id="typeRadio4" name="question_type" value=3 /><label for="typeRadio4">Open Answer</label>
1176
  </div></td>
1177
  </tr>
1178
  <tr valign="top">
1337
  <input type="radio" id="editTypeRadio1" name="edit_question_type" checked="checked" value=0 /><label for="editTypeRadio1">Normal (Vertical Radio)</label>
1338
  <input type="radio" id="editTypeRadio2" name="edit_question_type" value=1 /><label for="editTypeRadio2">Horizontal Radio</label>
1339
  <input type="radio" id="editTypeRadio3" name="edit_question_type" value=2 /><label for="editTypeRadio3">Drop Down</label>
1340
+ <input type="radio" id="editTypeRadio4" name="edit_question_type" value=3 /><label for="editTypeRadio4">Open Answer</label>
1341
  </div></td>
1342
  </tr>
1343
  <tr valign="top">
includes/mlw_update.php CHANGED
@@ -6,7 +6,7 @@ function mlw_quiz_update()
6
  {
7
 
8
  //Update this variable each update. This is what is checked when the plugin is deciding to run the upgrade script or not.
9
- $data = "2.2.2";
10
  if ( ! get_option('mlw_quiz_master_version'))
11
  {
12
  add_option('mlw_quiz_master_version' , $data);
6
  {
7
 
8
  //Update this variable each update. This is what is checked when the plugin is deciding to run the upgrade script or not.
9
+ $data = "2.3.1";
10
  if ( ! get_option('mlw_quiz_master_version'))
11
  {
12
  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: 2.2.2
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
@@ -116,7 +116,7 @@ function mlw_qmn_show_adverts()
116
  $mlw_advert_text = "Would you like to support this plugin but do not need or want premium support? Please consider our inexpensive 'Advertisements Be Gone' add-on which will get rid of these ads. Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
117
  break;
118
  case 4:
119
- $mlw_advert_text = "Need a plugin to show off testimonials from customers or clients? Be sure to check out our new Testimonial Master plugin. Visit our <a href=\"http://mylocalwebstop.com/wordpress-plugins/\">WordPress Plugins Page</a> for details!";
120
  break;
121
  default:
122
  $mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
3
  /*
4
  Plugin Name: Quiz Master Next
5
  Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
6
+ Version: 2.3.1
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
116
  $mlw_advert_text = "Would you like to support this plugin but do not need or want premium support? Please consider our inexpensive 'Advertisements Be Gone' add-on which will get rid of these ads. Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
117
  break;
118
  case 4:
119
+ $mlw_advert_text = "Need to be able to export the results of your quizzes? Be sure to check out our new Export Results add-on in our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a>!";
120
  break;
121
  default:
122
  $mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: quiz, test, score, survey, contact, form, email, answer, question
5
  Requires at least: 3.6
6
  Tested up to: 3.8.1
7
- Stable tag: 2.2.2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
@@ -19,6 +19,9 @@ Each of your quizzes can have **unlimited** questions! Your questions can contai
19
  = Customize Your Text =
20
  All the text your users see can be **customized**. Everything from the text blocks throughout the quiz to the submit button.
21
 
 
 
 
22
  = Mulitple Landing Pages For Each Quiz =
23
  Each quiz can have **unlimited** results pages that can be customized with your text. Show different results pages based on the users score!
24
 
@@ -99,6 +102,10 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
99
 
100
  == Changelog ==
101
 
 
 
 
 
102
  = 2.2.2 (March 30, 2014) =
103
  * Reverted To Previous Pagination Javascript
104
 
4
  Tags: quiz, test, score, survey, contact, form, email, answer, question
5
  Requires at least: 3.6
6
  Tested up to: 3.8.1
7
+ Stable tag: 2.3.1
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
19
  = Customize Your Text =
20
  All the text your users see can be **customized**. Everything from the text blocks throughout the quiz to the submit button.
21
 
22
+ = Different Types Of Questions =
23
+ You can have *multiple choice* (radio buttons), *true and false*, and *open answer* question. More types are being supported in future updates!
24
+
25
  = Mulitple Landing Pages For Each Quiz =
26
  Each quiz can have **unlimited** results pages that can be customized with your text. Show different results pages based on the users score!
27
 
102
 
103
  == Changelog ==
104
 
105
+ = 2.3.1 (April 6, 2014) =
106
+ * Added Ability To Have Graded Open Answer Questions
107
+ * Minor Design Changes
108
+
109
  = 2.2.2 (March 30, 2014) =
110
  * Reverted To Previous Pagination Javascript
111