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

Version Description

This update finally brings this plugin out of beta! This update brings the ability to edit the From Name part of the email sent to users and admin. Minor bug fixes.

Download this release

Release Info

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

Code changes from version 0.9.9 to 1.0

includes/mlw_dashboard.php CHANGED
@@ -410,19 +410,16 @@ function mlw_dashboard_box_six()
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>
@@ -441,9 +438,13 @@ function mlw_dashboard_box_seven()
441
  $user_message = $_POST["message"];
442
  $user_quiz_url = $_POST["quiz_url"];
443
  $current_user = wp_get_current_user();
 
 
 
 
444
  if ($quiz_master_email_success == 'update')
445
  {
446
- $mlw_message = "Message from ".$user_name." at ".$user_email." It says: \n \n ".$user_message."\n Version: ".$mlw_quiz_version."\n Quiz URL Provided: ".$user_quiz_url."\n User ".$current_user->display_name." from ".$current_user->user_email;
447
  wp_mail('fpcorso@mylocalwebstop.com' ,'Support From Quiz Master Next Plugin', $mlw_message);
448
  $quiz_master_email_message = "**Message Sent**";
449
  }
@@ -520,16 +521,11 @@ function mlw_dashboard_box_eight()
520
  <div class="donation">
521
  <p>
522
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
523
- <input type="hidden" name="cmd" value="_donations">
524
- <input type="hidden" name="business" value="fpcorso@gmail.com">
525
- <input type="hidden" name="lc" value="US">
526
- <input type="hidden" name="no_note" value="0">
527
- <input type="hidden" name="currency_code" value="USD">
528
- <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
529
- <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
530
  <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
531
  </form>
532
-
533
  </p>
534
  </div>
535
  </td>
410
  <div>
411
  <table width='100%'>
412
  <tr>
413
+ <td align='left'>1.0 (February 1, 2014)</td>
414
  </tr>
415
  <tr>
416
+ <td align='left'>* Added Ability To Customize From Name For User And Admin Emails</td>
417
  </tr>
418
  <tr>
419
+ <td align='left'>* Changed Question Editor</td>
420
  </tr>
421
  <tr>
422
+ <td align='left'>* Minor Change To Help System</td>
 
 
 
423
  </tr>
424
  </table>
425
  </div>
438
  $user_message = $_POST["message"];
439
  $user_quiz_url = $_POST["quiz_url"];
440
  $current_user = wp_get_current_user();
441
+ $mlw_site_name = get_bloginfo('name');
442
+ $mlw_site_url = get_bloginfo('url');
443
+ $mlw_site_version = get_bloginfo('version');
444
+ $mlw_site_info = $mlw_site_name." ".$mlw_site_url." ".$mlw_site_version;
445
  if ($quiz_master_email_success == 'update')
446
  {
447
+ $mlw_message = "Message from ".$user_name." at ".$user_email." It says: \n \n ".$user_message."\n Version: ".$mlw_quiz_version."\n Quiz URL Provided: ".$user_quiz_url."\n User ".$current_user->display_name." from ".$current_user->user_email."\n Wordpress Info: ".$mlw_site_info;
448
  wp_mail('fpcorso@mylocalwebstop.com' ,'Support From Quiz Master Next Plugin', $mlw_message);
449
  $quiz_master_email_message = "**Message Sent**";
450
  }
521
  <div class="donation">
522
  <p>
523
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
524
+ <input type="hidden" name="cmd" value="_s-xclick">
525
+ <input type="hidden" name="hosted_button_id" value="RTGYAETX36ZQJ">
526
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 
 
 
 
527
  <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
528
  </form>
 
529
  </p>
530
  </div>
531
  </td>
includes/mlw_quiz.php CHANGED
@@ -425,7 +425,7 @@ function mlw_quiz_shortcode($atts)
425
  if ($mlw_question->correct_answer == 6) {$mlw_correct_text = $mlw_question->answer_six;}
426
 
427
  $mlw_question_answer_display = $mlw_quiz_options->question_answer_template;
428
- $mlw_question_answer_display = str_replace( "%QUESTION%" , $mlw_question->question_name, $mlw_question_answer_display);
429
  $mlw_question_answer_display = str_replace( "%USER_ANSWER%" , $mlw_user_text, $mlw_question_answer_display);
430
  $mlw_question_answer_display = str_replace( "%CORRECT_ANSWER%" , $mlw_correct_text, $mlw_question_answer_display);
431
  $mlw_question_answer_display = str_replace( "%USER_COMMENTS%" , $_POST["mlwComment".$mlw_question->question_id], $mlw_question_answer_display);
@@ -472,7 +472,8 @@ function mlw_quiz_shortcode($atts)
472
  $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
473
  $mlw_message = str_replace( "%COMMENT_SECTION%" , $_POST["mlwQuizComments"], $mlw_message);
474
  $mlw_message = str_replace( "<br />" , "\n", $mlw_message);
475
- wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message);
 
476
  }
477
  }
478
 
@@ -494,7 +495,8 @@ function mlw_quiz_shortcode($atts)
494
  $mlw_message = str_replace( "%COMMENT_SECTION%" , $_POST["mlwQuizComments"], $mlw_message);
495
  $mlw_message .= " This email was generated by the Quiz Master Next script by Frank Corso";
496
  $mlw_message = str_replace( "<br />" , "\n", $mlw_message);
497
- wp_mail($mlw_quiz_options->admin_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message);
 
498
  }
499
 
500
  //Save the results into database
425
  if ($mlw_question->correct_answer == 6) {$mlw_correct_text = $mlw_question->answer_six;}
426
 
427
  $mlw_question_answer_display = $mlw_quiz_options->question_answer_template;
428
+ $mlw_question_answer_display = str_replace( "%QUESTION%" , htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES), $mlw_question_answer_display);
429
  $mlw_question_answer_display = str_replace( "%USER_ANSWER%" , $mlw_user_text, $mlw_question_answer_display);
430
  $mlw_question_answer_display = str_replace( "%CORRECT_ANSWER%" , $mlw_correct_text, $mlw_question_answer_display);
431
  $mlw_question_answer_display = str_replace( "%USER_COMMENTS%" , $_POST["mlwComment".$mlw_question->question_id], $mlw_question_answer_display);
472
  $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
473
  $mlw_message = str_replace( "%COMMENT_SECTION%" , $_POST["mlwQuizComments"], $mlw_message);
474
  $mlw_message = str_replace( "<br />" , "\n", $mlw_message);
475
+ $mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
476
+ wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
477
  }
478
  }
479
 
495
  $mlw_message = str_replace( "%COMMENT_SECTION%" , $_POST["mlwQuizComments"], $mlw_message);
496
  $mlw_message .= " This email was generated by the Quiz Master Next script by Frank Corso";
497
  $mlw_message = str_replace( "<br />" , "\n", $mlw_message);
498
+ $mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
499
+ wp_mail($mlw_quiz_options->admin_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
500
  }
501
 
502
  //Save the results into database
includes/mlw_quiz_install.php CHANGED
@@ -40,6 +40,8 @@ function mlw_quiz_activate()
40
 
41
  comment_field_text TEXT NOT NULL,
42
 
 
 
43
  question_answer_template TEXT NOT NULL,
44
 
45
  leaderboard_template TEXT NOT NULL,
40
 
41
  comment_field_text TEXT NOT NULL,
42
 
43
+ email_from_text TEXT NOT NULL,
44
+
45
  question_answer_template TEXT NOT NULL,
46
 
47
  leaderboard_template TEXT NOT NULL,
includes/mlw_quiz_options.php CHANGED
@@ -148,13 +148,14 @@ function mlw_generate_quiz_options()
148
  $mlw_phone_field_text = $_POST["mlw_phoneText"];
149
  $mlw_before_comments = $_POST["mlw_quiz_before_comments"];
150
  $mlw_comment_field_text = $_POST["mlw_commentText"];
 
151
  $mlw_question_answer_template = $_POST["mlw_quiz_question_answer_template"];
152
 
153
  //Submit saved templates into database
154
  if ($save_template_success == "confirmation")
155
  {
156
  $quiz_id = $_POST["quiz_id"];
157
- $update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET message_before='".$mlw_before_message."', message_comment='".$mlw_before_comments."', comment_field_text='".$mlw_comment_field_text."', question_answer_template='".$mlw_question_answer_template."', submit_button_text='".$mlw_submit_button_text."', name_field_text='".$mlw_name_field_text."', business_field_text='".$mlw_business_field_text."', email_field_text='".$mlw_email_field_text."', phone_field_text='".$mlw_phone_field_text."', message_after='".$mlw_after_message."', user_email_template='".$mlw_user_email_template."', admin_email_template='".$mlw_admin_email_template."' WHERE quiz_id=".$quiz_id;
158
  $results = $wpdb->query( $update );
159
  $hasUpdatedTemplates = true;
160
 
@@ -643,14 +644,9 @@ function mlw_generate_quiz_options()
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">
@@ -659,127 +655,127 @@ function mlw_generate_quiz_options()
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>
@@ -796,12 +792,7 @@ function mlw_generate_quiz_options()
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">
@@ -1099,6 +1090,10 @@ function mlw_generate_quiz_options()
1099
  <th scope="row"><label for="mlw_commentText">Text for comments field</label></th>
1100
  <td><input name="mlw_commentText" type="text" id="mlw_commentText" value="<?php echo $mlw_quiz_options->comment_field_text; ?>" class="regular-text" /></td>
1101
  </tr>
 
 
 
 
1102
  </table>
1103
  <table class="form-table">
1104
  <tr>
148
  $mlw_phone_field_text = $_POST["mlw_phoneText"];
149
  $mlw_before_comments = $_POST["mlw_quiz_before_comments"];
150
  $mlw_comment_field_text = $_POST["mlw_commentText"];
151
+ $mlw_email_from_text = $_POST["emailFromText"];
152
  $mlw_question_answer_template = $_POST["mlw_quiz_question_answer_template"];
153
 
154
  //Submit saved templates into database
155
  if ($save_template_success == "confirmation")
156
  {
157
  $quiz_id = $_POST["quiz_id"];
158
+ $update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET message_before='".$mlw_before_message."', message_comment='".$mlw_before_comments."', comment_field_text='".$mlw_comment_field_text."', email_from_text='".$mlw_email_from_text."', question_answer_template='".$mlw_question_answer_template."', submit_button_text='".$mlw_submit_button_text."', name_field_text='".$mlw_name_field_text."', business_field_text='".$mlw_business_field_text."', email_field_text='".$mlw_email_field_text."', phone_field_text='".$mlw_phone_field_text."', message_after='".$mlw_after_message."', user_email_template='".$mlw_user_email_template."', admin_email_template='".$mlw_admin_email_template."' WHERE quiz_id=".$quiz_id;
159
  $results = $wpdb->query( $update );
160
  $hasUpdatedTemplates = true;
161
 
644
  echo "<input type='hidden' name='quiz_id' value='".$quiz_id."' />";
645
  ?>
646
  <tr>
647
+ <td><span style='font-weight:bold;'>Question<a href="#" title="Enter the question here. Feel free to use HTML, embed Youtube videos, link to images, etc...">?</a></span></td>
648
  <td colspan="3">
649
+ <textarea name="question_name" id="question_name" style="width: 500px; height: 150px;"></textarea>
 
 
 
 
 
650
  </td>
651
  </tr>
652
  <tr valign="top">
655
  </tr>
656
  <tr valign="top">
657
  <td>&nbsp;</td>
658
+ <td><span style='font-weight:bold;'>Answers<a href='#' title="Enter the question's answers 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.">?</a></span></td>
659
+ <td><span style='font-weight:bold;'>Points Worth<a href="#" 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.">?</a></span></td>
660
+ <td><span style='font-weight:bold;'>Correct Answer<a href="#" title="Select the correct answer.">?</a></span></td>
661
  </tr>
662
  <tr valign="top">
663
  <td><span style='font-weight:bold;'>Answer One</span></td>
664
  <td>
665
+ <input type="text" name="answer_one" value="" style="border-color:#000000;
666
  color:#3300CC;
667
  cursor:hand;"/>
668
  </td>
669
  <td>
670
+ <input type="text" name="answer_one_points" value="0" style="border-color:#000000;
671
  color:#3300CC;
672
  cursor:hand;"/>
673
  </td>
674
+ <td><input type="radio" name="correct_answer" checked="checked" value=1 /></td>
675
  </tr>
676
  <tr valign="top">
677
  <td><span style='font-weight:bold;'>Answer Two</span></td>
678
  <td>
679
+ <input type="text" name="answer_two" value="" style="border-color:#000000;
680
  color:#3300CC;
681
  cursor:hand;"/>
682
  </td>
683
  <td>
684
+ <input type="text" name="answer_two_points" value="0" style="border-color:#000000;
685
  color:#3300CC;
686
  cursor:hand;"/>
687
  </td>
688
+ <td><input type="radio" name="correct_answer" value=2 /></td>
689
  </tr>
690
  <tr valign="top">
691
  <td><span style='font-weight:bold;'>Answer Three</span></td>
692
  <td>
693
+ <input type="text" name="answer_three" value="" style="border-color:#000000;
694
  color:#3300CC;
695
  cursor:hand;"/>
696
  </td>
697
  <td>
698
+ <input type="text" name="answer_three_points" value="0" style="border-color:#000000;
699
  color:#3300CC;
700
  cursor:hand;"/>
701
  </td>
702
+ <td><input type="radio" name="correct_answer" value=3 /></td>
703
  </tr>
704
  <tr valign="top">
705
  <td><span style='font-weight:bold;'>Answer Four</span></td>
706
  <td>
707
+ <input type="text" name="answer_four" value="" style="border-color:#000000;
708
  color:#3300CC;
709
  cursor:hand;"/>
710
  </td>
711
  <td>
712
+ <input type="text" name="answer_four_points" value="0" style="border-color:#000000;
713
  color:#3300CC;
714
  cursor:hand;"/>
715
  </td>
716
+ <td><input type="radio" name="correct_answer" value=4 /></td>
717
  </tr>
718
  <tr valign="top">
719
  <td><span style='font-weight:bold;'>Answer Five</span></td>
720
  <td>
721
+ <input type="text" name="answer_five" value="" style="border-color:#000000;
722
  color:#3300CC;
723
  cursor:hand;"/>
724
  </td>
725
  <td>
726
+ <input type="text" name="answer_five_points" value="0" style="border-color:#000000;
727
  color:#3300CC;
728
  cursor:hand;"/>
729
  </td>
730
+ <td><input type="radio" name="correct_answer" value=5 /></td>
731
  </tr>
732
  <tr valign="top">
733
  <td><span style='font-weight:bold;'>Answer Six</span></td>
734
  <td>
735
+ <input type="text" name="answer_six" value="" style="border-color:#000000;
736
  color:#3300CC;
737
  cursor:hand;"/>
738
  </td>
739
  <td>
740
+ <input type="text" name="answer_six_points" value="0" style="border-color:#000000;
741
  color:#3300CC;
742
  cursor:hand;"/>
743
  </td>
744
+ <td><input type="radio" name="correct_answer" value=6 /></td>
745
  </tr>
746
  <tr><td>&nbsp;</td></tr>
747
  <tr><td>&nbsp;</td></tr>
748
  <tr valign="top">
749
+ <td><span style='font-weight:bold;'>Question Type<a href="#" title="The normal setting will show the question as it would normally; the horizontal setting will show the answers going across rather than down; the drop down setting will show the answers in a drop down menu instead of the raidio button." >?</a></span></td>
750
+ <td><input type="radio" id="typeRadio1" name="question_type" checked="checked" value=0 /><label for="typeRadio1">Normal (Vertical Radio)</label></td>
751
+ <td><input type="radio" id="typeRadio2" name="question_type" value=1 /><label for="typeRadio2">Horizontal Radio</label></td>
752
+ <td><input type="radio" id="typeRadio3" name="question_type" value=2 /><label for="typeRadio3">Drop Down</label></td>
753
  </tr>
754
  <tr valign="top">
755
+ <td><span style='font-weight:bold;'>Comment Field<a href="#" title="The small text field setting will show a small field similar to the answer field above; the large text field setting will show a large text area; the none setting will now show any comment section for this question." >?</a></span></td>
756
+ <td><input type="radio" id="commentsRadio1" name="comments" value=0 /><label for="commentsRadio1">Small Text Field</label></td>
757
+ <td><input type="radio" id="commentsRadio3" name="comments" value=2 /><label for="commentsRadio3">Large Text Field</label></td>
758
+ <td><input type="radio" id="commentsRadio2" name="comments" checked="checked" value=1 /><label for="commentsRadio2">None</label></td>
759
  </tr>
760
  <tr valign="top">
761
+ <td><span style='font-weight:bold;'>Hint<a href="#" title="Enter the question's hint." >?</a></span></td>
762
  <td>
763
+ <input type="text" name="hint" value="" id="hint" style="border-color:#000000;
764
  color:#3300CC;
765
  cursor:hand;"/>
766
  </td>
767
  </tr>
768
  <tr valign="top">
769
+ <td><span style='font-weight:bold;'>Question Order<a href="#" title="Enter the place of the question in the quiz. If you do not have a certain order, you can leave this as 1.">?</a></span></td>
770
  <td>
771
+ <input type="number" step="1" min="1" name="new_question_order" value="1" id="new_question_order" style="border-color:#000000;
772
  color:#3300CC;
773
  cursor:hand;"/>
774
  </td>
775
  </tr>
776
  </table>
777
  <?php
778
+ echo "<p class='submit'><input type='submit' class='button-primary' value='Create Question' /></p>";
779
  echo "</form>";
780
  ?>
781
  </div>
792
  <tr>
793
  <td><span style='font-weight:bold;'>Question</span></td>
794
  <td colspan="3">
795
+ <textarea name="edit_question_name" id="edit_question_name" style="width: 500px; height: 150px;"></textarea>
 
 
 
 
 
796
  </td>
797
  </tr>
798
  <tr valign="top">
1090
  <th scope="row"><label for="mlw_commentText">Text for comments field</label></th>
1091
  <td><input name="mlw_commentText" type="text" id="mlw_commentText" value="<?php echo $mlw_quiz_options->comment_field_text; ?>" class="regular-text" /></td>
1092
  </tr>
1093
+ <tr valign="top">
1094
+ <th scope="row"><label for="emailFromText">What is the From Name for the email sent to users and admin?</label></th>
1095
+ <td><input name="emailFromText" type="text" id="emailFromText" value="<?php echo $mlw_quiz_options->email_from_text; ?>" class="regular-text" /></td>
1096
+ </tr>
1097
  </table>
1098
  <table class="form-table">
1099
  <tr>
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.9";
10
  if ( ! get_option('mlw_quiz_master_version'))
11
  {
12
  add_option('mlw_quiz_master_version' , $data);
@@ -71,6 +71,14 @@ function mlw_quiz_update()
71
  $results = $wpdb->query( $update_sql );
72
  }
73
 
 
 
 
 
 
 
 
 
74
 
75
 
76
  global $wpdb;
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 = "1.0";
10
  if ( ! get_option('mlw_quiz_master_version'))
11
  {
12
  add_option('mlw_quiz_master_version' , $data);
71
  $results = $wpdb->query( $update_sql );
72
  }
73
 
74
+ //Update 1.0
75
+ if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'email_from_text'") != "email_from_text")
76
+ {
77
+ $sql = "ALTER TABLE ".$table_name." ADD email_from_text TEXT NOT NULL AFTER comment_field_text";
78
+ $results = $wpdb->query( $sql );
79
+ $update_sql = "UPDATE ".$table_name." SET email_from_text='Wordpress'";
80
+ $results = $wpdb->query( $update_sql );
81
+ }
82
 
83
 
84
  global $wpdb;
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.9
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: 1.0
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.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.
@@ -16,6 +16,8 @@ Features include:
16
 
17
  * Allows for Unlimited Quizzes, Tests, Surveys, Contact Forms, etc..
18
  * Allows for Unlimited Questions in each Quiz
 
 
19
  * Can ask for user's contact information at beginning or end of quiz
20
  * Can email user after taking the quiz
21
  * Can email an admin after a user takes the quiz
@@ -62,6 +64,11 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
62
 
63
  == Changelog ==
64
 
 
 
 
 
 
65
  = 0.9.9 (January 30, 2014) =
66
  * Begun Creating New Advanced Help System
67
  * Added New Question Editor
@@ -229,6 +236,9 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
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
 
3
  Tags: quiz, test, score, survey, contact
4
  Requires at least: 3.0.1
5
  Tested up to: 3.8.1
6
+ Stable tag: 1.0
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.
16
 
17
  * Allows for Unlimited Quizzes, Tests, Surveys, Contact Forms, etc..
18
  * Allows for Unlimited Questions in each Quiz
19
+ * Can use HTML for questions
20
+ * Can embed Youtube videos in questions
21
  * Can ask for user's contact information at beginning or end of quiz
22
  * Can email user after taking the quiz
23
  * Can email an admin after a user takes the quiz
64
 
65
  == Changelog ==
66
 
67
+ = 1.0 (February 1, 2014) =
68
+ * Added Ability To Customize From Name For User And Admin Emails
69
+ * Changed Question Editor
70
+ * Minor Change To Help System
71
+
72
  = 0.9.9 (January 30, 2014) =
73
  * Begun Creating New Advanced Help System
74
  * Added New Question Editor
236
 
237
  == Upgrade Notice ==
238
 
239
+ = 1.0 =
240
+ This update finally brings this plugin out of beta! This update brings the ability to edit the From Name part of the email sent to users and admin. Minor bug fixes.
241
+
242
  = 0.9.9 =
243
  Upgrade to be able to include media in your questions! Also, fixed minor bugs and made minor design changes.
244