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

Version Description

Upgrade to be able to include media in your questions! Also, fixed minor bugs and made minor design changes.

Download this release

Release Info

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

Code changes from version 0.9.8 to 0.9.9

includes/mlw_dashboard.php CHANGED
@@ -410,22 +410,19 @@ function mlw_dashboard_box_six()
410
  <div>
411
  <table width='100%'>
412
  <tr>
413
- <td align='left'>0.9.8 (January 25, 2014)</td>
414
  </tr>
415
  <tr>
416
- <td align='left'>* Added Leaderboard Widget</td>
417
  </tr>
418
  <tr>
419
- <td align='left'>* Added Ability To Reset Quiz Stats On Each Quiz</td>
420
  </tr>
421
  <tr>
422
- <td align='left'>* Added Ability To Delete Results</td>
423
  </tr>
424
  <tr>
425
- <td align='left'>* Minor Design Changes</td>
426
- </tr>
427
- <tr>
428
- <td align='left'>* Minor Bug Fixes</td>
429
  </tr>
430
  </table>
431
  </div>
@@ -538,11 +535,12 @@ function mlw_dashboard_box_eight()
538
  </td>
539
  </tr>
540
  </table>
541
- <p>Thank you to those who have contributed so far.</p>
542
  <h3>Supporters</h3>
543
  <ul>
544
  <li>Tracy B</li>
545
  <li>Bobby L</li>
 
546
  </ul>
547
  </div>
548
  <?php
410
  <div>
411
  <table width='100%'>
412
  <tr>
413
+ <td align='left'>0.9.9 (January 30, 2014)</td>
414
  </tr>
415
  <tr>
416
+ <td align='left'>* Begun Creating New Advanced Help System</td>
417
  </tr>
418
  <tr>
419
+ <td align='left'>* Added New Question Editor</td>
420
  </tr>
421
  <tr>
422
+ <td align='left'>* Added Ability To Have Media In Questions</td>
423
  </tr>
424
  <tr>
425
+ <td align='left'>* Minor Design Changes To Quiz Options</td>
 
 
 
426
  </tr>
427
  </table>
428
  </div>
535
  </td>
536
  </tr>
537
  </table>
538
+ <p>Thank you to those who have contributed so far!</p>
539
  <h3>Supporters</h3>
540
  <ul>
541
  <li>Tracy B</li>
542
  <li>Bobby L</li>
543
+ <li>Kristal P</li>
544
  </ul>
545
  </div>
546
  <?php
includes/mlw_quiz.php CHANGED
@@ -227,7 +227,7 @@ function mlw_quiz_shortcode($atts)
227
 
228
  //Display the questions
229
  foreach($mlw_questions as $mlw_question) {
230
- $mlw_display .= "<span style='font-weight:bold;';>".$mlw_question->question_name."</span><br />";
231
  if ($mlw_question->question_type == 0)
232
  {
233
  if ($mlw_question->answer_one != "")
227
 
228
  //Display the questions
229
  foreach($mlw_questions as $mlw_question) {
230
+ $mlw_display .= "<span style='font-weight:bold;'>".htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
231
  if ($mlw_question->question_type == 0)
232
  {
233
  if ($mlw_question->answer_one != "")
includes/mlw_quiz_options.php CHANGED
@@ -19,7 +19,7 @@ function mlw_generate_quiz_options()
19
 
20
  //Variables from new question form
21
  $success = $_POST["create_question"];
22
- $question_name = htmlspecialchars($_POST["question_name"], ENT_QUOTES);
23
  $answer_one = htmlspecialchars($_POST["answer_one"], ENT_QUOTES);
24
  $answer_one_points = $_POST["answer_one_points"];
25
  $answer_two = htmlspecialchars($_POST["answer_two"], ENT_QUOTES);
@@ -40,7 +40,7 @@ function mlw_generate_quiz_options()
40
 
41
  //Variables from edit question form
42
  $edit_question_success = $_POST["edit_question"];
43
- $edit_question_name = htmlspecialchars($_POST["edit_question_name"], ENT_QUOTES);
44
  $edit_answer_one = htmlspecialchars($_POST["edit_answer_one"], ENT_QUOTES);
45
  $edit_answer_one_points = $_POST["edit_answer_one_points"];
46
  $edit_answer_two = htmlspecialchars($_POST["edit_answer_two"], ENT_QUOTES);
@@ -525,13 +525,6 @@ function mlw_generate_quiz_options()
525
  if (comments == 2) document.getElementById("editCommentRadio3").checked = true;
526
  };
527
  </script>
528
- <style type="text/css">
529
- div.mlw_quiz_options input[type='text'] {
530
- border-color:#000000;
531
- color:#3300CC;
532
- cursor:hand;
533
- }
534
- </style>
535
  <div class="wrap">
536
  <div class='mlw_quiz_options'>
537
  <?php
@@ -627,7 +620,7 @@ function mlw_generate_quiz_options()
627
  else $alternate = " class=\"alternate\"";
628
  $question_list .= "<tr{$alternate}>";
629
  $question_list .= "<td><span style='font-size:16px;'>" . $mlw_question_info->question_order . "</span></td>";
630
- $question_list .= "<td class='post-title column-title'><span style='font-size:16px;'>" . $mlw_question_info->question_name ."</span><div><span style='color:green;font-size:12px;'><a onclick=\"editQuestion('".$mlw_question_info->question_id."','".str_replace('"', '&quot;', str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->question_name, ENT_QUOTES)))."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_one, ENT_QUOTES))."','".$mlw_question_info->answer_one_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_two, ENT_QUOTES))."','".$mlw_question_info->answer_two_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_three, ENT_QUOTES))."','".$mlw_question_info->answer_three_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_four, ENT_QUOTES))."','".$mlw_question_info->answer_four_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_five, ENT_QUOTES))."','".$mlw_question_info->answer_five_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_six, ENT_QUOTES))."','".$mlw_question_info->answer_six_points."','".$mlw_question_info->correct_answer."','".$mlw_question_info->comments."','".$mlw_question_info->hints."', '".$mlw_question_info->question_order."', '".$mlw_question_info->question_type."')\" href='#'>Edit</a> | <a onclick=\"deleteQuestion('".$mlw_question_info->question_id."')\" href='#'>Delete</a></span></div></td>";
631
  $question_list .= "</tr>";
632
  }
633
 
@@ -642,150 +635,151 @@ function mlw_generate_quiz_options()
642
  ?>
643
  <button id="new_question_button">Add Question</button>
644
  <div id="new_question_dialog" title="Create New Question" style="display:none;">
645
- <table class="wide" style="text-align: left; white-space: nowrap;">
646
- <thead>
647
  <?php
648
  echo "<form action='" . $PHP_SELF . "' method='post'>";
649
  echo "<input type='hidden' name='create_question' value='confirmation' />";
650
  echo "<input type='hidden' name='quiz_id' value='".$quiz_id."' />";
651
  ?>
652
- <tr valign="top">
653
- <th scope="row">Question</th>
654
  <td colspan="3">
655
- <input type="text" name="question_name" value="" style="border-color:#000000;
656
- color:#3300CC;
657
- cursor:hand;
658
- width: 100%;"/>
 
 
659
  </td>
660
  </tr>
661
  <tr valign="top">
662
- <th scope="row">&nbsp;</th>
663
  <td>&nbsp;</td>
664
  </tr>
665
  <tr valign="top">
666
- <th scope="row">&nbsp;</th>
667
- <td>Answers</td>
668
- <td>Points Worth</td>
669
- <td>Correct Answer</td>
670
  </tr>
671
  <tr valign="top">
672
- <th scope="row">Answer One</th>
673
  <td>
674
- <input type="text" name="answer_one" value="" style="border-color:#000000;
675
  color:#3300CC;
676
  cursor:hand;"/>
677
  </td>
678
  <td>
679
- <input type="text" name="answer_one_points" value="0" style="border-color:#000000;
680
  color:#3300CC;
681
  cursor:hand;"/>
682
  </td>
683
- <td><input type="radio" name="correct_answer" checked="checked" value=1 /></td>
684
  </tr>
685
  <tr valign="top">
686
- <th scope="row">Answer Two</th>
687
  <td>
688
- <input type="text" name="answer_two" value="" style="border-color:#000000;
689
  color:#3300CC;
690
  cursor:hand;"/>
691
  </td>
692
  <td>
693
- <input type="text" name="answer_two_points" value="0" style="border-color:#000000;
694
  color:#3300CC;
695
  cursor:hand;"/>
696
  </td>
697
- <td><input type="radio" name="correct_answer" value=2 /></td>
698
  </tr>
699
  <tr valign="top">
700
- <th scope="row">Answer Three</th>
701
  <td>
702
- <input type="text" name="answer_three" value="" style="border-color:#000000;
703
  color:#3300CC;
704
  cursor:hand;"/>
705
  </td>
706
  <td>
707
- <input type="text" name="answer_three_points" value="0" style="border-color:#000000;
708
  color:#3300CC;
709
  cursor:hand;"/>
710
  </td>
711
- <td><input type="radio" name="correct_answer" value=3 /></td>
712
  </tr>
713
  <tr valign="top">
714
- <th scope="row">Answer Four</th>
715
  <td>
716
- <input type="text" name="answer_four" value="" style="border-color:#000000;
717
  color:#3300CC;
718
  cursor:hand;"/>
719
  </td>
720
  <td>
721
- <input type="text" name="answer_four_points" value="0" style="border-color:#000000;
722
  color:#3300CC;
723
  cursor:hand;"/>
724
  </td>
725
- <td><input type="radio" name="correct_answer" value=4 /></td>
726
  </tr>
727
  <tr valign="top">
728
- <th scope="row">Answer Five</th>
729
  <td>
730
- <input type="text" name="answer_five" value="" style="border-color:#000000;
731
  color:#3300CC;
732
  cursor:hand;"/>
733
  </td>
734
  <td>
735
- <input type="text" name="answer_five_points" value="0" style="border-color:#000000;
736
  color:#3300CC;
737
  cursor:hand;"/>
738
  </td>
739
- <td><input type="radio" name="correct_answer" value=5 /></td>
740
  </tr>
741
  <tr valign="top">
742
- <th scope="row">Answer Six</th>
743
  <td>
744
- <input type="text" name="answer_six" value="" style="border-color:#000000;
745
  color:#3300CC;
746
  cursor:hand;"/>
747
  </td>
748
  <td>
749
- <input type="text" name="answer_six_points" value="0" style="border-color:#000000;
750
  color:#3300CC;
751
  cursor:hand;"/>
752
  </td>
753
- <td><input type="radio" name="correct_answer" value=6 /></td>
754
  </tr>
755
  <tr><td>&nbsp;</td></tr>
756
  <tr><td>&nbsp;</td></tr>
757
  <tr valign="top">
758
- <th scope="row">Question Type?</th>
759
- <td><input type="radio" id="typeRadio1" name="question_type" checked="checked" value=0 /><label for="typeRadio1">Normal (Vertical Radio)</label></td>
760
- <td><input type="radio" id="typeRadio2" name="question_type" value=1 /><label for="typeRadio2">Horizontal Radio</label></td>
761
- <td><input type="radio" id="typeRadio3" name="question_type" value=2 /><label for="typeRadio3">Drop Down</label></td>
762
  </tr>
763
  <tr valign="top">
764
- <th scope="row">Comment Field?</th>
765
- <td><input type="radio" id="commentsRadio1" name="comments" value=0 /><label for="commentsRadio1">Small Text Field</label></td>
766
- <td><input type="radio" id="commentsRadio3" name="comments" value=2 /><label for="commentsRadio3">Large Text Field</label></td>
767
- <td><input type="radio" id="commentsRadio2" name="comments" checked="checked" value=1 /><label for="commentsRadio2">None</label></td>
768
  </tr>
769
  <tr valign="top">
770
- <th scope="row">Hint</th>
771
  <td>
772
- <input type="text" name="hint" value="" id="hint" style="border-color:#000000;
773
  color:#3300CC;
774
  cursor:hand;"/>
775
  </td>
776
  </tr>
777
  <tr valign="top">
778
- <th scope="row">Question Order</th>
779
  <td>
780
- <input type="number" step="1" min="1" name="new_question_order" value="1" id="new_question_order" style="border-color:#000000;
781
  color:#3300CC;
782
  cursor:hand;"/>
783
  </td>
784
  </tr>
785
- </thead>
786
  </table>
787
  <?php
788
- echo "<p class='submit'><input type='submit' class='button-primary' value='Create Question' /></p>";
789
  echo "</form>";
790
  ?>
791
  </div>
@@ -793,34 +787,35 @@ function mlw_generate_quiz_options()
793
 
794
  <div id="edit_question_dialog" title="Edit Question" style="display:none;">
795
  <table class="wide" style="text-align: left; white-space: nowrap;">
796
- <thead>
797
  <?php
798
  echo "<form action='" . $PHP_SELF . "' method='post'>";
799
  echo "<input type='hidden' name='edit_question' value='confirmation' />";
800
  echo "<input type='hidden' id='edit_question_id' name='edit_question_id' value='' />";
801
  echo "<input type='hidden' name='quiz_id' value='".$quiz_id."' />";
802
  ?>
803
- <tr valign="top">
804
- <th scope="row">Question</th>
805
  <td colspan="3">
806
- <input type="text" name="edit_question_name" id="edit_question_name" value="" style="border-color:#000000;
807
- color:#3300CC;
808
- cursor:hand;
809
- width: 100%;"/>
 
 
810
  </td>
811
  </tr>
812
  <tr valign="top">
813
- <th scope="row">&nbsp;</th>
814
  <td>&nbsp;</td>
815
  </tr>
816
  <tr valign="top">
817
- <th scope="row">&nbsp;</th>
818
- <td>Answers</td>
819
- <td>Points Worth</td>
820
- <td>Correct Answer</td>
821
  </tr>
822
  <tr valign="top">
823
- <th scope="row">Answer One</th>
824
  <td>
825
  <input type="text" name="edit_answer_one" id="edit_answer_one" value="" style="border-color:#000000;
826
  color:#3300CC;
@@ -834,7 +829,7 @@ function mlw_generate_quiz_options()
834
  <td><input type="radio" id="edit_correct_one" name="edit_correct_answer" checked="checked" value=1 /></td>
835
  </tr>
836
  <tr valign="top">
837
- <th scope="row">Answer Two</th>
838
  <td>
839
  <input type="text" name="edit_answer_two" id="edit_answer_two" value="" style="border-color:#000000;
840
  color:#3300CC;
@@ -848,7 +843,7 @@ function mlw_generate_quiz_options()
848
  <td><input type="radio" id="edit_correct_two" name="edit_correct_answer" value=2 /></td>
849
  </tr>
850
  <tr valign="top">
851
- <th scope="row">Answer Three</th>
852
  <td>
853
  <input type="text" name="edit_answer_three" id="edit_answer_three" value="" style="border-color:#000000;
854
  color:#3300CC;
@@ -862,7 +857,7 @@ function mlw_generate_quiz_options()
862
  <td><input type="radio" id="edit_correct_three" name="edit_correct_answer" value=3 /></td>
863
  </tr>
864
  <tr valign="top">
865
- <th scope="row">Answer Four</th>
866
  <td>
867
  <input type="text" name="edit_answer_four" value="" id="edit_answer_four" style="border-color:#000000;
868
  color:#3300CC;
@@ -876,7 +871,7 @@ function mlw_generate_quiz_options()
876
  <td><input type="radio" id="edit_correct_four" name="edit_correct_answer" value=4 /></td>
877
  </tr>
878
  <tr valign="top">
879
- <th scope="row">Answer Five</th>
880
  <td>
881
  <input type="text" name="edit_answer_five" value="" id="edit_answer_five" style="border-color:#000000;
882
  color:#3300CC;
@@ -890,7 +885,7 @@ function mlw_generate_quiz_options()
890
  <td><input type="radio" id="edit_correct_five" name="edit_correct_answer" value=5 /></td>
891
  </tr>
892
  <tr valign="top">
893
- <th scope="row">Answer Six</th>
894
  <td>
895
  <input type="text" name="edit_answer_six" value="" id="edit_answer_six" style="border-color:#000000;
896
  color:#3300CC;
@@ -906,19 +901,19 @@ function mlw_generate_quiz_options()
906
  <tr><td>&nbsp;</td></tr>
907
  <tr><td>&nbsp;</td></tr>
908
  <tr valign="top">
909
- <th scope="row">Question Type?</th>
910
  <td><input type="radio" id="editTypeRadio1" name="edit_question_type" checked="checked" value=0 /><label for="editTypeRadio1">Normal (Vertical Radio)</label></td>
911
  <td><input type="radio" id="editTypeRadio2" name="edit_question_type" value=1 /><label for="editTypeRadio2">Horizontal Radio</label></td>
912
  <td><input type="radio" id="editTypeRadio3" name="edit_question_type" value=2 /><label for="editTypeRadio3">Drop Down</label></td>
913
  </tr>
914
  <tr valign="top">
915
- <th scope="row">Comment Field?</th>
916
  <td><input type="radio" id="editCommentRadio1" name="edit_comments" value=0 /><label for="editCommentRadio1">Small Text Field</label></td>
917
  <td><input type="radio" id="editCommentRadio3" name="edit_comments" value=2 /><label for="editCommentRadio3">Large Text Field</label></td>
918
  <td><input type="radio" id="editCommentRadio2" name="edit_comments" value=1 /><label for="editCommentRadio2">None</label></td>
919
  </tr>
920
  <tr valign="top">
921
- <th scope="row">Hint</th>
922
  <td>
923
  <input type="text" name="edit_hint" value="" id="edit_hint" style="border-color:#000000;
924
  color:#3300CC;
@@ -926,14 +921,13 @@ function mlw_generate_quiz_options()
926
  </td>
927
  </tr>
928
  <tr valign="top">
929
- <th scope="row">Question Order</th>
930
  <td>
931
  <input type="number" step="1" min="1" name="edit_question_order" value="" id="edit_question_order" style="border-color:#000000;
932
  color:#3300CC;
933
  cursor:hand;"/>
934
  </td>
935
  </tr>
936
- </thead>
937
  </table>
938
  <?php
939
  echo "<p class='submit'><input type='submit' class='button-primary' value='Edit Question' /></p>";
19
 
20
  //Variables from new question form
21
  $success = $_POST["create_question"];
22
+ $question_name = trim(preg_replace('/\s+/',' ', nl2br(htmlspecialchars($_POST["question_name"], ENT_QUOTES))));
23
  $answer_one = htmlspecialchars($_POST["answer_one"], ENT_QUOTES);
24
  $answer_one_points = $_POST["answer_one_points"];
25
  $answer_two = htmlspecialchars($_POST["answer_two"], ENT_QUOTES);
40
 
41
  //Variables from edit question form
42
  $edit_question_success = $_POST["edit_question"];
43
+ $edit_question_name = trim(preg_replace('/\s+/',' ', nl2br(htmlspecialchars($_POST["edit_question_name"], ENT_QUOTES))));
44
  $edit_answer_one = htmlspecialchars($_POST["edit_answer_one"], ENT_QUOTES);
45
  $edit_answer_one_points = $_POST["edit_answer_one_points"];
46
  $edit_answer_two = htmlspecialchars($_POST["edit_answer_two"], ENT_QUOTES);
525
  if (comments == 2) document.getElementById("editCommentRadio3").checked = true;
526
  };
527
  </script>
 
 
 
 
 
 
 
528
  <div class="wrap">
529
  <div class='mlw_quiz_options'>
530
  <?php
620
  else $alternate = " class=\"alternate\"";
621
  $question_list .= "<tr{$alternate}>";
622
  $question_list .= "<td><span style='font-size:16px;'>" . $mlw_question_info->question_order . "</span></td>";
623
+ $question_list .= "<td class='post-title column-title'><span style='font-size:16px;'>" . $mlw_question_info->question_name ."</span><div><span style='color:green;font-size:12px;'><a onclick=\"editQuestion('".$mlw_question_info->question_id."','".str_replace('"', '&quot;', str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->question_name, ENT_QUOTES)))."', '".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_one, ENT_QUOTES))."','".$mlw_question_info->answer_one_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_two, ENT_QUOTES))."','".$mlw_question_info->answer_two_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_three, ENT_QUOTES))."','".$mlw_question_info->answer_three_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_four, ENT_QUOTES))."','".$mlw_question_info->answer_four_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_five, ENT_QUOTES))."','".$mlw_question_info->answer_five_points."','".str_replace("'", "\'", htmlspecialchars_decode($mlw_question_info->answer_six, ENT_QUOTES))."','".$mlw_question_info->answer_six_points."','".$mlw_question_info->correct_answer."','".$mlw_question_info->comments."','".$mlw_question_info->hints."', '".$mlw_question_info->question_order."', '".$mlw_question_info->question_type."')\" href='#'>Edit</a> | <a onclick=\"deleteQuestion('".$mlw_question_info->question_id."')\" href='#'>Delete</a></span></div></td>";
624
  $question_list .= "</tr>";
625
  }
626
 
635
  ?>
636
  <button id="new_question_button">Add Question</button>
637
  <div id="new_question_dialog" title="Create New Question" style="display:none;">
638
+
639
+ <table>
640
  <?php
641
  echo "<form action='" . $PHP_SELF . "' method='post'>";
642
  echo "<input type='hidden' name='create_question' value='confirmation' />";
643
  echo "<input type='hidden' name='quiz_id' value='".$quiz_id."' />";
644
  ?>
645
+ <tr>
646
+ <td><span style='font-weight:bold;'>Question</span></td>
647
  <td colspan="3">
648
+ <?php
649
+ $settings = array(
650
+ 'textarea_rows' => 10
651
+ );
652
+ wp_editor('demo content', 'question_name', $settings);
653
+ ?>
654
  </td>
655
  </tr>
656
  <tr valign="top">
657
+ <td>&nbsp;</td>
658
  <td>&nbsp;</td>
659
  </tr>
660
  <tr valign="top">
661
+ <td>&nbsp;</td>
662
+ <td><span style='font-weight:bold;'>Answers</span></td>
663
+ <td><span style='font-weight:bold;'>Points Worth</span></td>
664
+ <td><span style='font-weight:bold;'>Correct Answer</span></td>
665
  </tr>
666
  <tr valign="top">
667
+ <td><span style='font-weight:bold;'>Answer One</span></td>
668
  <td>
669
+ <input type="text" name="answer_one" title="Enter one of the question's answer here. If you are using this quiz as a survey or form, you can leave all the answers blank to only show the comment field." value="" style="border-color:#000000;
670
  color:#3300CC;
671
  cursor:hand;"/>
672
  </td>
673
  <td>
674
+ <input type="text" name="answer_one_points" title="If you have your quiz set up using the point system, enter how many points this answer is worth here. If you are not using the point system, leave this as 0." value="0" style="border-color:#000000;
675
  color:#3300CC;
676
  cursor:hand;"/>
677
  </td>
678
+ <td><input type="radio" name="correct_answer" title="Select the correct answer." checked="checked" value=1 /></td>
679
  </tr>
680
  <tr valign="top">
681
+ <td><span style='font-weight:bold;'>Answer Two</span></td>
682
  <td>
683
+ <input type="text" name="answer_two" title="Enter one of the question's answer here. If you are using this quiz as a survey or form, you can leave all the answers blank to only show the comment field." value="" style="border-color:#000000;
684
  color:#3300CC;
685
  cursor:hand;"/>
686
  </td>
687
  <td>
688
+ <input type="text" name="answer_two_points" title="If you have your quiz set up using the point system, enter how many points this answer is worth here. If you are not using the point system, leave this as 0." value="0" style="border-color:#000000;
689
  color:#3300CC;
690
  cursor:hand;"/>
691
  </td>
692
+ <td><input type="radio" name="correct_answer" title="Select the correct answer." value=2 /></td>
693
  </tr>
694
  <tr valign="top">
695
+ <td><span style='font-weight:bold;'>Answer Three</span></td>
696
  <td>
697
+ <input type="text" name="answer_three" title="Enter one of the question's answer here. If you are using this quiz as a survey or form, you can leave all the answers blank to only show the comment field." value="" style="border-color:#000000;
698
  color:#3300CC;
699
  cursor:hand;"/>
700
  </td>
701
  <td>
702
+ <input type="text" name="answer_three_points" title="If you have your quiz set up using the point system, enter how many points this answer is worth here. If you are not using the point system, leave this as 0." value="0" style="border-color:#000000;
703
  color:#3300CC;
704
  cursor:hand;"/>
705
  </td>
706
+ <td><input type="radio" name="correct_answer" title="Select the correct answer." value=3 /></td>
707
  </tr>
708
  <tr valign="top">
709
+ <td><span style='font-weight:bold;'>Answer Four</span></td>
710
  <td>
711
+ <input type="text" name="answer_four" title="Enter one of the question's answer here. If you are using this quiz as a survey or form, you can leave all the answers blank to only show the comment field." value="" style="border-color:#000000;
712
  color:#3300CC;
713
  cursor:hand;"/>
714
  </td>
715
  <td>
716
+ <input type="text" name="answer_four_points" title="If you have your quiz set up using the point system, enter how many points this answer is worth here. If you are not using the point system, leave this as 0." value="0" style="border-color:#000000;
717
  color:#3300CC;
718
  cursor:hand;"/>
719
  </td>
720
+ <td><input type="radio" name="correct_answer" title="Select the correct answer." value=4 /></td>
721
  </tr>
722
  <tr valign="top">
723
+ <td><span style='font-weight:bold;'>Answer Five</span></td>
724
  <td>
725
+ <input type="text" name="answer_five" title="Enter one of the question's answer here. If you are using this quiz as a survey or form, you can leave all the answers blank to only show the comment field." value="" style="border-color:#000000;
726
  color:#3300CC;
727
  cursor:hand;"/>
728
  </td>
729
  <td>
730
+ <input type="text" name="answer_five_points" title="If you have your quiz set up using the point system, enter how many points this answer is worth here. If you are not using the point system, leave this as 0." value="0" style="border-color:#000000;
731
  color:#3300CC;
732
  cursor:hand;"/>
733
  </td>
734
+ <td><input type="radio" name="correct_answer" title="Select the correct answer." value=5 /></td>
735
  </tr>
736
  <tr valign="top">
737
+ <td><span style='font-weight:bold;'>Answer Six</span></td>
738
  <td>
739
+ <input type="text" name="answer_six" title="Enter one of the question's answer here. If you are using this quiz as a survey or form, you can leave all the answers blank to only show the comment field." value="" style="border-color:#000000;
740
  color:#3300CC;
741
  cursor:hand;"/>
742
  </td>
743
  <td>
744
+ <input type="text" name="answer_six_points" title="If you have your quiz set up using the point system, enter how many points this answer is worth here. If you are not using the point system, leave this as 0." value="0" style="border-color:#000000;
745
  color:#3300CC;
746
  cursor:hand;"/>
747
  </td>
748
+ <td><input type="radio" name="correct_answer" title="Select the correct answer." value=6 /></td>
749
  </tr>
750
  <tr><td>&nbsp;</td></tr>
751
  <tr><td>&nbsp;</td></tr>
752
  <tr valign="top">
753
+ <td><span style='font-weight:bold;'>Question Type?</span></td>
754
+ <td><input type="radio" id="typeRadio1" name="question_type" checked="checked" title="The normal setting will show the question as it would normally." value=0 /><label for="typeRadio1">Normal (Vertical Radio)</label></td>
755
+ <td><input type="radio" id="typeRadio2" name="question_type" title="The horizontal setting will show the answers going across rather than down." value=1 /><label for="typeRadio2">Horizontal Radio</label></td>
756
+ <td><input type="radio" id="typeRadio3" name="question_type" title="The drop down setting will show the answers in a drop down menu instead of the raidio button." value=2 /><label for="typeRadio3">Drop Down</label></td>
757
  </tr>
758
  <tr valign="top">
759
+ <td><span style='font-weight:bold;'>Comment Field?</span></td>
760
+ <td><input type="radio" id="commentsRadio1" name="comments" title="The small text field setting will show a small field similar to the answer field above." value=0 /><label for="commentsRadio1">Small Text Field</label></td>
761
+ <td><input type="radio" id="commentsRadio3" name="comments" title="The large text field setting will show a large text area." value=2 /><label for="commentsRadio3">Large Text Field</label></td>
762
+ <td><input type="radio" id="commentsRadio2" name="comments" title="The none setting will now show any comment section for this question." checked="checked" value=1 /><label for="commentsRadio2">None</label></td>
763
  </tr>
764
  <tr valign="top">
765
+ <td><span style='font-weight:bold;'>Hint</span></td>
766
  <td>
767
+ <input type="text" name="hint" value="" id="hint" title="Enter the question's hint." style="border-color:#000000;
768
  color:#3300CC;
769
  cursor:hand;"/>
770
  </td>
771
  </tr>
772
  <tr valign="top">
773
+ <td><span style='font-weight:bold;'>Question Order</span></td>
774
  <td>
775
+ <input type="number" step="1" min="1" name="new_question_order" title="Enter the place of the question in the quiz. If you do not have a certain order, you can leave this as 1." value="1" id="new_question_order" style="border-color:#000000;
776
  color:#3300CC;
777
  cursor:hand;"/>
778
  </td>
779
  </tr>
 
780
  </table>
781
  <?php
782
+ echo "<p class='submit'><input type='submit' class='button-primary' title='Click here to create your new quesion!' value='Create Question' /></p>";
783
  echo "</form>";
784
  ?>
785
  </div>
787
 
788
  <div id="edit_question_dialog" title="Edit Question" style="display:none;">
789
  <table class="wide" style="text-align: left; white-space: nowrap;">
 
790
  <?php
791
  echo "<form action='" . $PHP_SELF . "' method='post'>";
792
  echo "<input type='hidden' name='edit_question' value='confirmation' />";
793
  echo "<input type='hidden' id='edit_question_id' name='edit_question_id' value='' />";
794
  echo "<input type='hidden' name='quiz_id' value='".$quiz_id."' />";
795
  ?>
796
+ <tr>
797
+ <td><span style='font-weight:bold;'>Question</span></td>
798
  <td colspan="3">
799
+ <?php
800
+ $settings = array(
801
+ 'textarea_rows' => 10
802
+ );
803
+ wp_editor('demo content', 'edit_question_name', $settings);
804
+ ?>
805
  </td>
806
  </tr>
807
  <tr valign="top">
808
+ <td>&nbsp;</td>
809
  <td>&nbsp;</td>
810
  </tr>
811
  <tr valign="top">
812
+ <td>&nbsp;</td>
813
+ <td><span style='font-weight:bold;'>Answers</span></td>
814
+ <td><span style='font-weight:bold;'>Points Worth</span></td>
815
+ <td><span style='font-weight:bold;'>Correct Answer</span></td>
816
  </tr>
817
  <tr valign="top">
818
+ <td><span style='font-weight:bold;'>Answer One</span></td>
819
  <td>
820
  <input type="text" name="edit_answer_one" id="edit_answer_one" value="" style="border-color:#000000;
821
  color:#3300CC;
829
  <td><input type="radio" id="edit_correct_one" name="edit_correct_answer" checked="checked" value=1 /></td>
830
  </tr>
831
  <tr valign="top">
832
+ <td><span style='font-weight:bold;'>Answer Two</span></td>
833
  <td>
834
  <input type="text" name="edit_answer_two" id="edit_answer_two" value="" style="border-color:#000000;
835
  color:#3300CC;
843
  <td><input type="radio" id="edit_correct_two" name="edit_correct_answer" value=2 /></td>
844
  </tr>
845
  <tr valign="top">
846
+ <td><span style='font-weight:bold;'>Answer Three</span></td>
847
  <td>
848
  <input type="text" name="edit_answer_three" id="edit_answer_three" value="" style="border-color:#000000;
849
  color:#3300CC;
857
  <td><input type="radio" id="edit_correct_three" name="edit_correct_answer" value=3 /></td>
858
  </tr>
859
  <tr valign="top">
860
+ <td><span style='font-weight:bold;'>Answer Four</span></td>
861
  <td>
862
  <input type="text" name="edit_answer_four" value="" id="edit_answer_four" style="border-color:#000000;
863
  color:#3300CC;
871
  <td><input type="radio" id="edit_correct_four" name="edit_correct_answer" value=4 /></td>
872
  </tr>
873
  <tr valign="top">
874
+ <td><span style='font-weight:bold;'>Answer Five</span></td>
875
  <td>
876
  <input type="text" name="edit_answer_five" value="" id="edit_answer_five" style="border-color:#000000;
877
  color:#3300CC;
885
  <td><input type="radio" id="edit_correct_five" name="edit_correct_answer" value=5 /></td>
886
  </tr>
887
  <tr valign="top">
888
+ <td><span style='font-weight:bold;'>Answer Six</span></td>
889
  <td>
890
  <input type="text" name="edit_answer_six" value="" id="edit_answer_six" style="border-color:#000000;
891
  color:#3300CC;
901
  <tr><td>&nbsp;</td></tr>
902
  <tr><td>&nbsp;</td></tr>
903
  <tr valign="top">
904
+ <td><span style='font-weight:bold;'>Question Type?</span></td>
905
  <td><input type="radio" id="editTypeRadio1" name="edit_question_type" checked="checked" value=0 /><label for="editTypeRadio1">Normal (Vertical Radio)</label></td>
906
  <td><input type="radio" id="editTypeRadio2" name="edit_question_type" value=1 /><label for="editTypeRadio2">Horizontal Radio</label></td>
907
  <td><input type="radio" id="editTypeRadio3" name="edit_question_type" value=2 /><label for="editTypeRadio3">Drop Down</label></td>
908
  </tr>
909
  <tr valign="top">
910
+ <td><span style='font-weight:bold;'>Comment Field?</span></td>
911
  <td><input type="radio" id="editCommentRadio1" name="edit_comments" value=0 /><label for="editCommentRadio1">Small Text Field</label></td>
912
  <td><input type="radio" id="editCommentRadio3" name="edit_comments" value=2 /><label for="editCommentRadio3">Large Text Field</label></td>
913
  <td><input type="radio" id="editCommentRadio2" name="edit_comments" value=1 /><label for="editCommentRadio2">None</label></td>
914
  </tr>
915
  <tr valign="top">
916
+ <td><span style='font-weight:bold;'>Hint</span></td>
917
  <td>
918
  <input type="text" name="edit_hint" value="" id="edit_hint" style="border-color:#000000;
919
  color:#3300CC;
921
  </td>
922
  </tr>
923
  <tr valign="top">
924
+ <td><span style='font-weight:bold;'>Question Order</span></td>
925
  <td>
926
  <input type="number" step="1" min="1" name="edit_question_order" value="" id="edit_question_order" style="border-color:#000000;
927
  color:#3300CC;
928
  cursor:hand;"/>
929
  </td>
930
  </tr>
 
931
  </table>
932
  <?php
933
  echo "<p class='submit'><input type='submit' class='button-primary' value='Edit Question' /></p>";
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 = "0.9.8";
10
  if ( ! get_option('mlw_quiz_master_version'))
11
  {
12
  add_option('mlw_quiz_master_version' , $data);
@@ -72,6 +72,7 @@ function mlw_quiz_update()
72
  }
73
 
74
 
 
75
  global $wpdb;
76
  $table_name = $wpdb->prefix . "mlw_questions";
77
  //Update 0.5
@@ -100,6 +101,7 @@ function mlw_quiz_update()
100
  $update_sql = "UPDATE ".$table_name." SET question_type=0";
101
  $results = $wpdb->query( $update_sql );
102
  }
 
103
  update_option('mlw_quiz_master_version' , $data);
104
  }
105
  }
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 = "0.9.9";
10
  if ( ! get_option('mlw_quiz_master_version'))
11
  {
12
  add_option('mlw_quiz_master_version' , $data);
72
  }
73
 
74
 
75
+
76
  global $wpdb;
77
  $table_name = $wpdb->prefix . "mlw_questions";
78
  //Update 0.5
101
  $update_sql = "UPDATE ".$table_name." SET question_type=0";
102
  $results = $wpdb->query( $update_sql );
103
  }
104
+
105
  update_option('mlw_quiz_master_version' , $data);
106
  }
107
  }
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.9.8
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.9.9
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, contact
4
  Requires at least: 3.0.1
5
  Tested up to: 3.8.1
6
- Stable tag: 0.9.8
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
 
9
  Use this plugin to add multiple quizzes, tests, surveys, or contact forms to your website.
@@ -62,6 +62,12 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
62
 
63
  == Changelog ==
64
 
 
 
 
 
 
 
65
  = 0.9.8 (January 25, 2014) =
66
  * Added Leaderboard Widget
67
  * Added Ability To Reset Quiz Stats On Each Quiz
@@ -223,6 +229,9 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
223
 
224
  == Upgrade Notice ==
225
 
 
 
 
226
  = 0.9.8 =
227
  Upgrade to use new leaderboard widet! Also, added ability to reset stats for quizzes from Quiz Options page. Added ability to delete results as well. Minor design changes and bug fixes.
228
 
3
  Tags: quiz, test, score, survey, contact
4
  Requires at least: 3.0.1
5
  Tested up to: 3.8.1
6
+ Stable tag: 0.9.9
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
 
9
  Use this plugin to add multiple quizzes, tests, surveys, or contact forms to your website.
62
 
63
  == Changelog ==
64
 
65
+ = 0.9.9 (January 30, 2014) =
66
+ * Begun Creating New Advanced Help System
67
+ * Added New Question Editor
68
+ * Added Ability To Have Media In Questions
69
+ * Minor Design Changes To Quiz Options
70
+
71
  = 0.9.8 (January 25, 2014) =
72
  * Added Leaderboard Widget
73
  * Added Ability To Reset Quiz Stats On Each Quiz
229
 
230
  == Upgrade Notice ==
231
 
232
+ = 0.9.9 =
233
+ Upgrade to be able to include media in your questions! Also, fixed minor bugs and made minor design changes.
234
+
235
  = 0.9.8 =
236
  Upgrade to use new leaderboard widet! Also, added ability to reset stats for quizzes from Quiz Options page. Added ability to delete results as well. Minor design changes and bug fixes.
237