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

Version Description

Upgrade to be able to edit the %QUESTIONS_ANSWERS% template. Also, minor design changes on Quiz Options page.

Download this release

Release Info

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

Code changes from version 0.9.4 to 0.9.5

includes/mlw_main_page.php CHANGED
@@ -114,7 +114,7 @@ function mlw_generate_main_page()
114
  }
115
  </style>
116
  <div class="wrap">
117
- <h2>Quiz Master Next Support <a id="opener" href="">(?)</a></h2>
118
 
119
  <h3>Version <?php echo $mlw_quiz_version; ?></h3>
120
  <p>Thank you for trying out my new plugin. I hope you find it beneficial to your website. Please consider rating this plugin <a href="http://wordpress.org/support/view/plugin-reviews/quiz-master-next">here</a>.</p>
@@ -141,7 +141,7 @@ function mlw_generate_main_page()
141
 
142
  <div id="dialog" title="Help">
143
  <h3><b>Help</b></h3>
144
- <p>This page is the main admin page for the Quiz Master Next.</p>
145
  <p>The first widget lists all the statistics collected so far.</p>
146
  <p>The second widget lists all the new features added in this update.</p>
147
  <p>The third widget contains a contact form for emailing the developer.</p>
@@ -159,13 +159,16 @@ function quiz_wpss_mrt_meta_box2()
159
  <div>
160
  <table width='100%'>
161
  <tr>
162
- <td align='left'>0.9.4 (January 16, 2014)</td>
163
  </tr>
164
  <tr>
165
- <td align='left'>* Added Ability To Randomly Order Questions</td>
166
  </tr>
167
  <tr>
168
- <td align='left'>* Updated Monthly Stat Widget</td>
 
 
 
169
  </tr>
170
  </table>
171
  </div>
114
  }
115
  </style>
116
  <div class="wrap">
117
+ <h2>Quiz Master Next Help And Support <a id="opener" href="">(?)</a></h2>
118
 
119
  <h3>Version <?php echo $mlw_quiz_version; ?></h3>
120
  <p>Thank you for trying out my new plugin. I hope you find it beneficial to your website. Please consider rating this plugin <a href="http://wordpress.org/support/view/plugin-reviews/quiz-master-next">here</a>.</p>
141
 
142
  <div id="dialog" title="Help">
143
  <h3><b>Help</b></h3>
144
+ <p>This page is the main support page for the Quiz Master Next.</p>
145
  <p>The first widget lists all the statistics collected so far.</p>
146
  <p>The second widget lists all the new features added in this update.</p>
147
  <p>The third widget contains a contact form for emailing the developer.</p>
159
  <div>
160
  <table width='100%'>
161
  <tr>
162
+ <td align='left'>0.9.5 (January 19, 2014)</td>
163
  </tr>
164
  <tr>
165
+ <td align='left'>* Added Ability To Edit %QUESTIONS_ANSWERS% Template</td>
166
  </tr>
167
  <tr>
168
+ <td align='left'>* Changed Name Of Support Page To Help Page</td>
169
+ </tr>
170
+ <tr>
171
+ <td align='left'>* Minor Design Changes On Quiz Options Page</td>
172
  </tr>
173
  </table>
174
  </div>
includes/mlw_quiz.php CHANGED
@@ -410,18 +410,14 @@ function mlw_quiz_shortcode($atts)
410
  if ($mlw_question->correct_answer == 5) {$mlw_correct_text = $mlw_question->answer_five;}
411
  if ($mlw_question->correct_answer == 6) {$mlw_correct_text = $mlw_question->answer_six;}
412
 
413
- $mlw_question_answers .= $mlw_question->question_name . "\n";
414
- $mlw_question_answers .= "Answer Provided: " . $mlw_user_text . "\n";
415
- $mlw_question_answers .= "Correct Answer: " . $mlw_correct_text . "\n";
416
- if ($mlw_question->comments == 0)
417
- {
418
- $mlw_question_answers .= "Comments Entered: " . $_POST["mlwComment".$mlw_question->question_id] . "\n";
419
- }
420
- if ($mlw_question->comments == 2)
421
- {
422
- $mlw_question_answers .= "Comments Entered: " . $_POST["mlwComment".$mlw_question->question_id] . "\n";
423
- }
424
- $mlw_question_answers .= "\n";
425
  }
426
  $mlw_total_score = round((($mlw_correct/$mlw_total_questions)*100), 2);
427
 
@@ -461,6 +457,7 @@ function mlw_quiz_shortcode($atts)
461
  $mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
462
  $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
463
  $mlw_message = str_replace( "%COMMENT_SECTION%" , $_POST["mlwQuizComments"], $mlw_message);
 
464
  wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message);
465
  }
466
  }
@@ -482,6 +479,7 @@ function mlw_quiz_shortcode($atts)
482
  $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
483
  $mlw_message = str_replace( "%COMMENT_SECTION%" , $_POST["mlwQuizComments"], $mlw_message);
484
  $mlw_message .= " This email was generated by the Quiz Master Next script by Frank Corso";
 
485
  wp_mail($mlw_quiz_options->admin_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message);
486
  }
487
 
410
  if ($mlw_question->correct_answer == 5) {$mlw_correct_text = $mlw_question->answer_five;}
411
  if ($mlw_question->correct_answer == 6) {$mlw_correct_text = $mlw_question->answer_six;}
412
 
413
+ $mlw_question_answer_display = $mlw_quiz_options->question_answer_template;
414
+ $mlw_question_answer_display = str_replace( "%QUESTION%" , $mlw_question->question_name, $mlw_question_answer_display);
415
+ $mlw_question_answer_display = str_replace( "%USER_ANSWER%" , $mlw_user_text, $mlw_question_answer_display);
416
+ $mlw_question_answer_display = str_replace( "%CORRECT_ANSWER%" , $mlw_correct_text, $mlw_question_answer_display);
417
+ $mlw_question_answer_display = str_replace( "%USER_COMMENTS%" , $_POST["mlwComment".$mlw_question->question_id], $mlw_question_answer_display);
418
+
419
+ $mlw_question_answers .= $mlw_question_answer_display;
420
+ $mlw_question_answers .= "<br />";
 
 
 
 
421
  }
422
  $mlw_total_score = round((($mlw_correct/$mlw_total_questions)*100), 2);
423
 
457
  $mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
458
  $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
459
  $mlw_message = str_replace( "%COMMENT_SECTION%" , $_POST["mlwQuizComments"], $mlw_message);
460
+ $mlw_message = str_replace( "<br />" , "\n", $mlw_message);
461
  wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message);
462
  }
463
  }
479
  $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
480
  $mlw_message = str_replace( "%COMMENT_SECTION%" , $_POST["mlwQuizComments"], $mlw_message);
481
  $mlw_message .= " This email was generated by the Quiz Master Next script by Frank Corso";
482
+ $mlw_message = str_replace( "<br />" , "\n", $mlw_message);
483
  wp_mail($mlw_quiz_options->admin_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message);
484
  }
485
 
includes/mlw_quiz_admin.php CHANGED
@@ -25,9 +25,10 @@ function mlw_generate_quiz_admin()
25
  3. %THIRD_PLACE_NAME%-%THIRD_PLACE_SCORE%<br />
26
  4. %FOURTH_PLACE_NAME%-%FOURTH_PLACE_SCORE%<br />
27
  5. %FIFTH_PLACE_NAME%-%FIFTH_PLACE_SCORE%<br />";
 
28
  $insert = "INSERT INTO " . $table_name .
29
- "(quiz_id, quiz_name, message_before, message_after, message_comment, user_email_template, admin_email_template, submit_button_text, name_field_text, business_field_text, email_field_text, phone_field_text, comment_field_text, leaderboard_template, system, randomness_order, show_score, send_user_email, send_admin_email, user_name, user_comp, user_email, user_phone, admin_email, comment_section, quiz_views, quiz_taken, deleted) " .
30
- "VALUES (NULL , '" . $quiz_name . "' , 'Enter your text here', 'Enter your text here', 'Enter your text here', 'Enter your text here', 'Enter your text here', 'Submit Quiz', 'Name', 'Business', 'Email', 'Phone Number', 'Comments', '".$mlw_leaderboard_default."', 0, 0, 0, 0, 0, 0, 0, 0, 0, '".get_option( 'admin_email', 'Enter email' )."', 0, 0, 0, 0)";
31
  $results = $wpdb->query( $insert );
32
  $hasCreatedQuiz = true;
33
 
@@ -144,6 +145,10 @@ function mlw_generate_quiz_admin()
144
  $j('#new_quiz_button').click(function() {
145
  $j('#new_quiz_dialog').dialog('open');
146
  return false;
 
 
 
 
147
  } );
148
  });
149
  function deleteQuiz(id,quizName){
@@ -227,7 +232,7 @@ function mlw_generate_quiz_admin()
227
  <?php
228
  }
229
  ?>
230
-
231
  <?php
232
  $quotes_list = "";
233
  $display = "";
25
  3. %THIRD_PLACE_NAME%-%THIRD_PLACE_SCORE%<br />
26
  4. %FOURTH_PLACE_NAME%-%FOURTH_PLACE_SCORE%<br />
27
  5. %FIFTH_PLACE_NAME%-%FIFTH_PLACE_SCORE%<br />";
28
+ $mlw_question_answer_default = "%QUESTION%<br /> Answer Provided: %USER_ANSWER%<br /> Correct Answer: %CORRECT_ANSWER%<br /> Comments Entered: %USER_COMMENTS%<br />";
29
  $insert = "INSERT INTO " . $table_name .
30
+ "(quiz_id, quiz_name, message_before, message_after, message_comment, user_email_template, admin_email_template, submit_button_text, name_field_text, business_field_text, email_field_text, phone_field_text, comment_field_text, question_answer_template, leaderboard_template, system, randomness_order, show_score, send_user_email, send_admin_email, user_name, user_comp, user_email, user_phone, admin_email, comment_section, quiz_views, quiz_taken, deleted) " .
31
+ "VALUES (NULL , '" . $quiz_name . "' , 'Enter your text here', 'Enter your text here', 'Enter your text here', 'Enter your text here', 'Enter your text here', 'Submit Quiz', 'Name', 'Business', 'Email', 'Phone Number', 'Comments', '".$mlw_question_answer_default."', '".$mlw_leaderboard_default."', 0, 0, 0, 0, 0, 0, 0, 0, 0, '".get_option( 'admin_email', 'Enter email' )."', 0, 0, 0, 0)";
32
  $results = $wpdb->query( $insert );
33
  $hasCreatedQuiz = true;
34
 
145
  $j('#new_quiz_button').click(function() {
146
  $j('#new_quiz_dialog').dialog('open');
147
  return false;
148
+ } );
149
+ $j('#new_quiz_button_two').click(function() {
150
+ $j('#new_quiz_dialog').dialog('open');
151
+ return false;
152
  } );
153
  });
154
  function deleteQuiz(id,quizName){
232
  <?php
233
  }
234
  ?>
235
+ <button id="new_quiz_button_two">Create New Quiz</button>
236
  <?php
237
  $quotes_list = "";
238
  $display = "";
includes/mlw_quiz_install.php CHANGED
@@ -40,6 +40,8 @@ function mlw_quiz_activate()
40
 
41
  comment_field_text TEXT NOT NULL,
42
 
 
 
43
  leaderboard_template TEXT NOT NULL,
44
 
45
  system INT NOT NULL,
40
 
41
  comment_field_text TEXT NOT NULL,
42
 
43
+ question_answer_template TEXT NOT NULL,
44
+
45
  leaderboard_template TEXT NOT NULL,
46
 
47
  system INT NOT NULL,
includes/mlw_quiz_options.php CHANGED
@@ -147,12 +147,13 @@ function mlw_generate_quiz_options()
147
  $mlw_phone_field_text = $_POST["mlw_phoneText"];
148
  $mlw_before_comments = $_POST["mlw_quiz_before_comments"];
149
  $mlw_comment_field_text = $_POST["mlw_commentText"];
 
150
 
151
  //Submit saved templates into database
152
  if ($save_template_success == "confirmation")
153
  {
154
  $quiz_id = $_POST["quiz_id"];
155
- $update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET message_before='".$mlw_before_message."', message_comment='".$mlw_before_comments."', comment_field_text='".$mlw_comment_field_text."', 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;
156
  $results = $wpdb->query( $update );
157
  $hasUpdatedTemplates = true;
158
 
@@ -404,6 +405,10 @@ function mlw_generate_quiz_options()
404
  $j('#new_question_button').click(function() {
405
  $j('#new_question_dialog').dialog('open');
406
  return false;
 
 
 
 
407
  } );
408
  });
409
  function deleteQuestion(id){
@@ -549,6 +554,7 @@ function mlw_generate_quiz_options()
549
  <li><a href="#tabs-4">Quiz Leaderboard</a></li>
550
  </ul>
551
  <div id="tabs-1">
 
552
  <?php
553
  $question_list = "";
554
  $display = "";
@@ -563,14 +569,14 @@ function mlw_generate_quiz_options()
563
 
564
  $display .= "<table class=\"widefat\">";
565
  $display .= "<thead><tr>
566
- <th>Question ID</th>
567
  <th>Question Name</th>
568
  </tr></thead>";
569
  $display .= "<tbody id=\"the-list\">{$question_list}</tbody>";
570
  $display .= "</table>";
571
  echo $display;
572
  ?>
573
- <button id="new_question_button">Add Question</button><button id="question_tab_help">Help</button>
574
  <div id="new_question_dialog" title="Create New Question" style="display:none;">
575
  <table class="wide" style="text-align: left; white-space: nowrap;">
576
  <thead>
@@ -891,6 +897,14 @@ function mlw_generate_quiz_options()
891
  </tr>
892
  <tr>
893
  <td><strong>%COMMENT_SECTION%</strong> - The comments the user entered into comment box if enabled</td>
 
 
 
 
 
 
 
 
894
  </tr>
895
  </table>
896
  <button id="save_template_button" onclick="javascript: document.quiz_template_form.submit();">Save Templates</button><button id="template_tab_help">Help</button>
@@ -937,6 +951,7 @@ function mlw_generate_quiz_options()
937
  <p style="margin: 2px 0">- %USER_BUSINESS%</p>
938
  <p style="margin: 2px 0">- %USER_PHONE%</p>
939
  <p style="margin: 2px 0">- %USER_EMAIL%</p>
 
940
  <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
941
  </td>
942
  <td><textarea cols="80" rows="15" id="mlw_quiz_after_message" name="mlw_quiz_after_message"><?php echo $mlw_quiz_options->message_after; ?></textarea>
@@ -962,6 +977,7 @@ function mlw_generate_quiz_options()
962
  <p style="margin: 2px 0">- %USER_BUSINESS%</p>
963
  <p style="margin: 2px 0">- %USER_PHONE%</p>
964
  <p style="margin: 2px 0">- %USER_EMAIL%</p>
 
965
  <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
966
  </td>
967
  <td><textarea cols="80" rows="15" id="mlw_quiz_user_email_template" name="mlw_quiz_user_email_template"><?php echo $mlw_quiz_options->user_email_template; ?></textarea>
@@ -969,7 +985,7 @@ function mlw_generate_quiz_options()
969
  </tr>
970
  <tr>
971
  <td width="30%">
972
- <strong>Email sent to admin after completion</strong>
973
  <br />
974
  <p>Allowed Variables: </p>
975
  <p style="margin: 2px 0">- %POINT_SCORE%</p>
@@ -981,6 +997,7 @@ function mlw_generate_quiz_options()
981
  <p style="margin: 2px 0">- %USER_PHONE%</p>
982
  <p style="margin: 2px 0">- %USER_EMAIL%</p>
983
  <p style="margin: 2px 0">- %QUIZ_NAME%</p>
 
984
  <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
985
  </td>
986
  <td><textarea cols="80" rows="15" id="mlw_quiz_admin_email_template" name="mlw_quiz_admin_email_template"><?php echo $mlw_quiz_options->admin_email_template; ?></textarea>
@@ -1017,6 +1034,21 @@ function mlw_generate_quiz_options()
1017
  <td><input name="mlw_commentText" type="text" id="mlw_commentText" value="<?php echo $mlw_quiz_options->comment_field_text; ?>" class="regular-text" /></td>
1018
  </tr>
1019
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1020
 
1021
  </div>
1022
  </div>
147
  $mlw_phone_field_text = $_POST["mlw_phoneText"];
148
  $mlw_before_comments = $_POST["mlw_quiz_before_comments"];
149
  $mlw_comment_field_text = $_POST["mlw_commentText"];
150
+ $mlw_question_answer_template = $_POST["mlw_quiz_question_answer_template"];
151
 
152
  //Submit saved templates into database
153
  if ($save_template_success == "confirmation")
154
  {
155
  $quiz_id = $_POST["quiz_id"];
156
+ $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;
157
  $results = $wpdb->query( $update );
158
  $hasUpdatedTemplates = true;
159
 
405
  $j('#new_question_button').click(function() {
406
  $j('#new_question_dialog').dialog('open');
407
  return false;
408
+ } );
409
+ $j('#new_question_button_two').click(function() {
410
+ $j('#new_question_dialog').dialog('open');
411
+ return false;
412
  } );
413
  });
414
  function deleteQuestion(id){
554
  <li><a href="#tabs-4">Quiz Leaderboard</a></li>
555
  </ul>
556
  <div id="tabs-1">
557
+ <button id="new_question_button_two">Add Question</button><button id="question_tab_help">Help</button>
558
  <?php
559
  $question_list = "";
560
  $display = "";
569
 
570
  $display .= "<table class=\"widefat\">";
571
  $display .= "<thead><tr>
572
+ <th>Question Order</th>
573
  <th>Question Name</th>
574
  </tr></thead>";
575
  $display .= "<tbody id=\"the-list\">{$question_list}</tbody>";
576
  $display .= "</table>";
577
  echo $display;
578
  ?>
579
+ <button id="new_question_button">Add Question</button>
580
  <div id="new_question_dialog" title="Create New Question" style="display:none;">
581
  <table class="wide" style="text-align: left; white-space: nowrap;">
582
  <thead>
897
  </tr>
898
  <tr>
899
  <td><strong>%COMMENT_SECTION%</strong> - The comments the user entered into comment box if enabled</td>
900
+ <td><strong>%QUESTION%</strong> - The question that the user answered</td>
901
+ </tr>
902
+ <tr>
903
+ <td><strong>%USER_ANSWER%</strong> - The answer the user gave for the question</td>
904
+ <td><strong>%CORRECT_ANSWER%</strong> - The correct answer for the question</td>
905
+ </tr>
906
+ <tr>
907
+ <td><strong>%USER_COMMENTS%</strong> - The comments the user provided in the comment field for the question</td>
908
  </tr>
909
  </table>
910
  <button id="save_template_button" onclick="javascript: document.quiz_template_form.submit();">Save Templates</button><button id="template_tab_help">Help</button>
951
  <p style="margin: 2px 0">- %USER_BUSINESS%</p>
952
  <p style="margin: 2px 0">- %USER_PHONE%</p>
953
  <p style="margin: 2px 0">- %USER_EMAIL%</p>
954
+ <p style="margin: 2px 0">- %COMMENT_SECTION%</p>
955
  <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
956
  </td>
957
  <td><textarea cols="80" rows="15" id="mlw_quiz_after_message" name="mlw_quiz_after_message"><?php echo $mlw_quiz_options->message_after; ?></textarea>
977
  <p style="margin: 2px 0">- %USER_BUSINESS%</p>
978
  <p style="margin: 2px 0">- %USER_PHONE%</p>
979
  <p style="margin: 2px 0">- %USER_EMAIL%</p>
980
+ <p style="margin: 2px 0">- %COMMENT_SECTION%</p>
981
  <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
982
  </td>
983
  <td><textarea cols="80" rows="15" id="mlw_quiz_user_email_template" name="mlw_quiz_user_email_template"><?php echo $mlw_quiz_options->user_email_template; ?></textarea>
985
  </tr>
986
  <tr>
987
  <td width="30%">
988
+ <strong>Email sent to admin after completion (If turned on in options)</strong>
989
  <br />
990
  <p>Allowed Variables: </p>
991
  <p style="margin: 2px 0">- %POINT_SCORE%</p>
997
  <p style="margin: 2px 0">- %USER_PHONE%</p>
998
  <p style="margin: 2px 0">- %USER_EMAIL%</p>
999
  <p style="margin: 2px 0">- %QUIZ_NAME%</p>
1000
+ <p style="margin: 2px 0">- %COMMENT_SECTION%</p>
1001
  <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
1002
  </td>
1003
  <td><textarea cols="80" rows="15" id="mlw_quiz_admin_email_template" name="mlw_quiz_admin_email_template"><?php echo $mlw_quiz_options->admin_email_template; ?></textarea>
1034
  <td><input name="mlw_commentText" type="text" id="mlw_commentText" value="<?php echo $mlw_quiz_options->comment_field_text; ?>" class="regular-text" /></td>
1035
  </tr>
1036
  </table>
1037
+ <table class="form-table">
1038
+ <tr>
1039
+ <td width="30%">
1040
+ <strong>%QUESTIONS_ANSWERS% Text</strong>
1041
+ <br />
1042
+ <p>Allowed Variables: </p>
1043
+ <p style="margin: 2px 0">- %QUESTION%</p>
1044
+ <p style="margin: 2px 0">- %USER_ANSWER%</p>
1045
+ <p style="margin: 2px 0">- %CORRECT_ANSWER%</p>
1046
+ <p style="margin: 2px 0">- %USER_COMMENTS%</p>
1047
+ </td>
1048
+ <td><textarea cols="80" rows="15" id="mlw_quiz_question_answer_template" name="mlw_quiz_question_answer_template"><?php echo $mlw_quiz_options->question_answer_template; ?></textarea>
1049
+ </td>
1050
+ </tr>
1051
+ </table>
1052
 
1053
  </div>
1054
  </div>
includes/mlw_update.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  function mlw_quiz_update()
4
  {
5
- $data = "0.9.4";
6
  if ( ! get_option('mlw_quiz_master_version'))
7
  {
8
  add_option('mlw_quiz_master_version' , $data);
@@ -48,6 +48,16 @@ function mlw_quiz_update()
48
  $results = $wpdb->query( $update_sql );
49
  }
50
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  global $wpdb;
53
  $table_name = $wpdb->prefix . "mlw_questions";
2
 
3
  function mlw_quiz_update()
4
  {
5
+ $data = "0.9.5";
6
  if ( ! get_option('mlw_quiz_master_version'))
7
  {
8
  add_option('mlw_quiz_master_version' , $data);
48
  $results = $wpdb->query( $update_sql );
49
  }
50
 
51
+ //Update 0.9.5
52
+ if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'question_answer_template'") != "question_answer_template")
53
+ {
54
+ $sql = "ALTER TABLE ".$table_name." ADD question_answer_template TEXT NOT NULL AFTER comment_field_text";
55
+ $results = $wpdb->query( $sql );
56
+ $mlw_question_answer_default = "%QUESTION%<br /> Answer Provided: %USER_ANSWER%<br /> Correct Answer: %CORRECT_ANSWER%<br /> Comments Entered: %USER_COMMENTS%<br />";
57
+ $update_sql = "UPDATE ".$table_name." SET question_answer_template='".$mlw_question_answer_default."'";
58
+ $results = $wpdb->query( $update_sql );
59
+ }
60
+
61
 
62
  global $wpdb;
63
  $table_name = $wpdb->prefix . "mlw_questions";
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.4
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
@@ -57,7 +57,7 @@ function mlw_add_menu()
57
  add_submenu_page(__FILE__, 'Quiz Result Details', 'Quiz Result Details', 8, 'mlw_quiz_result_details', 'mlw_generate_result_details');
58
  add_submenu_page(__FILE__, 'Tools', 'Tools', 8, 'mlw_quiz_tools', 'mlw_generate_quiz_tools');
59
  add_submenu_page(__FILE__, 'How-To', 'How-To', 8, 'mlw_how_to', 'mlw_generate_help_page');
60
- add_submenu_page(__FILE__, 'Support', 'Support', 8, 'mlw_quiz_support', 'mlw_generate_main_page');
61
  }
62
  }
63
  /*
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.5
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
57
  add_submenu_page(__FILE__, 'Quiz Result Details', 'Quiz Result Details', 8, 'mlw_quiz_result_details', 'mlw_generate_result_details');
58
  add_submenu_page(__FILE__, 'Tools', 'Tools', 8, 'mlw_quiz_tools', 'mlw_generate_quiz_tools');
59
  add_submenu_page(__FILE__, 'How-To', 'How-To', 8, 'mlw_how_to', 'mlw_generate_help_page');
60
+ add_submenu_page(__FILE__, 'Help', 'Help', 8, 'mlw_quiz_support', 'mlw_generate_main_page');
61
  }
62
  }
63
  /*
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
6
- Stable tag: 0.9.4
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.
@@ -25,7 +25,7 @@ Features include:
25
  * Saves the results after a user takes the quiz
26
  * Saves the users answers and comments after taking the quiz
27
  * Features audit trail so admins can keep track of who adds, edits, or deletes quizzes and questions
28
- * Features useful statistics for how quizzes been taken
29
  * Create surveys by utilizing the comment boxes instead of answers
30
  * Create Contact Forms
31
  * Customize templates for landing page after the quiz has been taken
@@ -44,10 +44,10 @@ Features include:
44
  On each page, there is a "?" next to the page title. Clicking on it will bring up a small help window that will assist you on that page.
45
 
46
  = How do you use that feature? =
47
- There is a How-To page that has many useful how-to's to assist you on using the plugin. If you still have any trouble, feel free to use the support page to contact me and I will help you.
48
 
49
  = I have an idea, how do I contact you? =
50
- Feel free to use the support page of the plugin or from the contact page at mylocalwebstop.com.
51
 
52
  == Screenshots ==
53
 
@@ -61,6 +61,11 @@ Feel free to use the support page of the plugin or from the contact page at mylo
61
 
62
  == Changelog ==
63
 
 
 
 
 
 
64
  = 0.9.4 (January 16, 2014) =
65
  * Added Ability To Randomly Order Questions
66
  * Updated Monthly Stat Widget
@@ -195,6 +200,9 @@ Feel free to use the support page of the plugin or from the contact page at mylo
195
 
196
  == Upgrade Notice ==
197
 
 
 
 
198
  = 0.9.4 =
199
  Upgrade to set up your quizzes to randomize the questions
200
 
3
  Tags: quiz, test, score, survey, contact
4
  Requires at least: 3.0.1
5
  Tested up to: 3.8
6
+ Stable tag: 0.9.5
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.
25
  * Saves the results after a user takes the quiz
26
  * Saves the users answers and comments after taking the quiz
27
  * Features audit trail so admins can keep track of who adds, edits, or deletes quizzes and questions
28
+ * Features useful statistics for how many have quizzes been taken
29
  * Create surveys by utilizing the comment boxes instead of answers
30
  * Create Contact Forms
31
  * Customize templates for landing page after the quiz has been taken
44
  On each page, there is a "?" next to the page title. Clicking on it will bring up a small help window that will assist you on that page.
45
 
46
  = How do you use that feature? =
47
+ There is a How-To page that has many useful how-to's to assist you on using the plugin. If you still have any trouble, feel free to use the help page within the plugin to contact me and I will help you.
48
 
49
  = I have an idea, how do I contact you? =
50
+ Feel free to use the help page within the plugin or from the contact page at mylocalwebstop.com.
51
 
52
  == Screenshots ==
53
 
61
 
62
  == Changelog ==
63
 
64
+ = 0.9.5 (January 19, 2014) =
65
+ * Added Ability To Edit %QUESTIONS_ANSWERS% Template
66
+ * Changed Name Of Support Page To Help Page
67
+ * Minor Design Changes On Quiz Options Page
68
+
69
  = 0.9.4 (January 16, 2014) =
70
  * Added Ability To Randomly Order Questions
71
  * Updated Monthly Stat Widget
200
 
201
  == Upgrade Notice ==
202
 
203
+ = 0.9.5 =
204
+ Upgrade to be able to edit the %QUESTIONS_ANSWERS% template. Also, minor design changes on Quiz Options page.
205
+
206
  = 0.9.4 =
207
  Upgrade to set up your quizzes to randomize the questions
208