Version Description
Upgrade for new style manager, new non-question types, text block question type, and various design/bug fixes!
Download this release
Release Info
Developer | fpcorso |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 3.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.9.1 to 3.0.1
- includes/mlw_qmn_credits.php +19 -15
- includes/mlw_quiz.php +34 -8
- includes/mlw_quiz_admin.php +1 -1
- includes/mlw_quiz_options.php +81 -9
- includes/mlw_results.php +1 -1
- includes/mlw_update.php +10 -1
- mlw_quizmaster2.php +1 -1
- readme.txt +14 -2
includes/mlw_qmn_credits.php
CHANGED
@@ -89,35 +89,35 @@ function mlw_generate_about_page()
|
|
89 |
<div class="mlw_qmn_icon_wrap">Version <?php echo $mlw_quiz_version; ?></div>
|
90 |
<h2 class="nav-tab-wrapper">
|
91 |
<a href="javascript:mlw_qmn_setTab(1);" id="mlw_qmn_tab_1" class="nav-tab nav-tab-active">
|
92 |
-
What’s New In
|
93 |
<a href="javascript:mlw_qmn_setTab(2);" id="mlw_qmn_tab_2" class="nav-tab">
|
94 |
Changelog For <?php echo $mlw_quiz_version; ?> </a>
|
95 |
<a href="javascript:mlw_qmn_setTab(3);" id="mlw_qmn_tab_3" class="nav-tab">
|
96 |
Requested Features</a>
|
97 |
</h2>
|
98 |
<div id="mlw_quiz_what_new">
|
99 |
-
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">
|
100 |
-
<p style="text-align: center;">
|
101 |
<br />
|
102 |
-
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">
|
103 |
-
<p style="text-align: center;">
|
104 |
<br />
|
105 |
-
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">
|
106 |
-
<p style="text-align: center;">
|
107 |
<br />
|
108 |
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">Our Premium Add-Ons!</h2>
|
109 |
<p style="text-align: center;">We have several new premium add-ons in our WordPress Store: MailChimp Integration (subscribes users to your Mailchimp list), Export Results (exports your quiz results), Extra Shortcodes (gives you extra shortcodes to use), User Dashboard (allow users to see the results from all the quizzes they have taken), and Advertisement Be Gone (gets rid of blue-border ads). Visit our <a href="http://mylocalwebstop.com/shop/">WordPress Store</a> for details! </p>
|
110 |
</div>
|
111 |
<div id="mlw_quiz_changelog" style="display: none;">
|
112 |
-
<h3><?php echo $mlw_quiz_version; ?> (August
|
113 |
<ul>
|
114 |
-
<li>* Added
|
115 |
-
<li>* Added Ability
|
116 |
-
<li>* Added
|
117 |
-
<li>* Added
|
118 |
-
<li>*
|
119 |
-
<li>* Fixed
|
120 |
-
<li>* Fixed
|
121 |
</ul>
|
122 |
</div>
|
123 |
<div id="mlw_quiz_requested" style="display: none;">
|
@@ -140,6 +140,10 @@ function mlw_generate_about_page()
|
|
140 |
<li>Ability To Redirect User Instead Of Showing Results Page</li>
|
141 |
<li>Multi-Delete Option For Quiz Results</li>
|
142 |
<li>Spam Prevention</li>
|
|
|
|
|
|
|
|
|
143 |
</ul>
|
144 |
</div>
|
145 |
</div>
|
89 |
<div class="mlw_qmn_icon_wrap">Version <?php echo $mlw_quiz_version; ?></div>
|
90 |
<h2 class="nav-tab-wrapper">
|
91 |
<a href="javascript:mlw_qmn_setTab(1);" id="mlw_qmn_tab_1" class="nav-tab nav-tab-active">
|
92 |
+
What’s New In 3.0</a>
|
93 |
<a href="javascript:mlw_qmn_setTab(2);" id="mlw_qmn_tab_2" class="nav-tab">
|
94 |
Changelog For <?php echo $mlw_quiz_version; ?> </a>
|
95 |
<a href="javascript:mlw_qmn_setTab(3);" id="mlw_qmn_tab_3" class="nav-tab">
|
96 |
Requested Features</a>
|
97 |
</h2>
|
98 |
<div id="mlw_quiz_what_new">
|
99 |
+
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">New Style Manager</h2>
|
100 |
+
<p style="text-align: center;">I just finished the basics of the new style manager. On the Quiz Styling tab, you will see the style you have currently selected. The new style manager makes it easier to shares styles. In future versions, I will add ability to import and export the styles to make this process even easier.</p>
|
101 |
<br />
|
102 |
+
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">Quiz Master Next Can Now Handle Non-Question Question Types</h2>
|
103 |
+
<p style="text-align: center;">In previous versions, to add elements to your quiz in the questions that are not part of the question was very difficult. I have changed the way the plugin handles the question types so that I can create question types that are not questions. In future versions, you will be able to add a video, images, and more using the new question type system. These non-questions will not be part of the quiz but will be able to be placed between questions!</p>
|
104 |
<br />
|
105 |
+
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">New Question Type</h2>
|
106 |
+
<p style="text-align: center;">The first of the non-question question types is the new Text Block. With this type, you can create a block of text that supports HTML and have it inbetween your questions!</p>
|
107 |
<br />
|
108 |
<h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">Our Premium Add-Ons!</h2>
|
109 |
<p style="text-align: center;">We have several new premium add-ons in our WordPress Store: MailChimp Integration (subscribes users to your Mailchimp list), Export Results (exports your quiz results), Extra Shortcodes (gives you extra shortcodes to use), User Dashboard (allow users to see the results from all the quizzes they have taken), and Advertisement Be Gone (gets rid of blue-border ads). Visit our <a href="http://mylocalwebstop.com/shop/">WordPress Store</a> for details! </p>
|
110 |
</div>
|
111 |
<div id="mlw_quiz_changelog" style="display: none;">
|
112 |
+
<h3><?php echo $mlw_quiz_version; ?> (August 28, 2014)</h3>
|
113 |
<ul>
|
114 |
+
<li>* Added New Style Manager</li>
|
115 |
+
<li>* Added Ability For Non-Question Question Types</li>
|
116 |
+
<li>* Added New Text Block Question Type</li>
|
117 |
+
<li>* Added Question Type Column To Question List</li>
|
118 |
+
<li>* Minor Design Changes To Quiz Questions Tab</li>
|
119 |
+
<li>* Fixed Results Delete Link Not Working Bug</li>
|
120 |
+
<li>* Fixed Quiz Name Showing Escaped Values Bug</li>
|
121 |
</ul>
|
122 |
</div>
|
123 |
<div id="mlw_quiz_requested" style="display: none;">
|
140 |
<li>Ability To Redirect User Instead Of Showing Results Page</li>
|
141 |
<li>Multi-Delete Option For Quiz Results</li>
|
142 |
<li>Spam Prevention</li>
|
143 |
+
<li>Graphical Click Aware Questions</li>
|
144 |
+
<li>Results Bar Graph For Users Taking Polls</li>
|
145 |
+
<li>Head To Head Comparison Questions</li>
|
146 |
+
<li>Enhanced Leaderboard</li>
|
147 |
</ul>
|
148 |
</div>
|
149 |
</div>
|
includes/mlw_quiz.php
CHANGED
@@ -129,11 +129,17 @@ function mlw_quiz_shortcode($atts)
|
|
129 |
max-width: 500px !important;
|
130 |
}
|
131 |
</style>
|
132 |
-
<style type="text/css">
|
133 |
-
<?php echo $mlw_quiz_options->quiz_stye; ?>
|
134 |
-
</style>
|
135 |
-
<?php
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
/*
|
138 |
The following code is for displaying the quiz and completion screen
|
139 |
*/
|
@@ -444,13 +450,13 @@ function mlw_quiz_shortcode($atts)
|
|
444 |
//Display the questions
|
445 |
foreach($mlw_questions as $mlw_question) {
|
446 |
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
447 |
-
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
448 |
$mlw_display .= "<div class='quiz_section slide".$mlw_qmn_section_count."'>";
|
449 |
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
450 |
-
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
451 |
-
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
452 |
if ($mlw_question->question_type == 0)
|
453 |
{
|
|
|
|
|
|
|
454 |
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
455 |
if (is_array($mlw_qmn_answer_array))
|
456 |
{
|
@@ -506,6 +512,9 @@ function mlw_quiz_shortcode($atts)
|
|
506 |
}
|
507 |
elseif ($mlw_question->question_type == 4)
|
508 |
{
|
|
|
|
|
|
|
509 |
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
510 |
if (is_array($mlw_qmn_answer_array))
|
511 |
{
|
@@ -528,6 +537,9 @@ function mlw_quiz_shortcode($atts)
|
|
528 |
}
|
529 |
elseif ($mlw_question->question_type == 1)
|
530 |
{
|
|
|
|
|
|
|
531 |
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
532 |
if (is_array($mlw_qmn_answer_array))
|
533 |
{
|
@@ -541,7 +553,7 @@ function mlw_quiz_shortcode($atts)
|
|
541 |
$mlw_answer_total++;
|
542 |
if ($mlw_qmn_answer_each[0] != "")
|
543 |
{
|
544 |
-
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='".esc_attr($mlw_qmn_answer_each[0])."' />".htmlspecialchars_decode($mlw_qmn_answer_each[0], ENT_QUOTES);
|
545 |
}
|
546 |
}
|
547 |
$mlw_display .= "<input type='radio' style='display: none;' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_none' checked='checked' value='No Answer Provided' />";
|
@@ -577,6 +589,9 @@ function mlw_quiz_shortcode($atts)
|
|
577 |
}
|
578 |
elseif ($mlw_question->question_type == 2)
|
579 |
{
|
|
|
|
|
|
|
580 |
$mlw_display .= "<select name='question".$mlw_question->question_id."'>";
|
581 |
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
582 |
if (is_array($mlw_qmn_answer_array))
|
@@ -627,11 +642,22 @@ function mlw_quiz_shortcode($atts)
|
|
627 |
}
|
628 |
elseif ($mlw_question->question_type == 5)
|
629 |
{
|
|
|
|
|
|
|
630 |
$mlw_display .= "<textarea class='mlw_answer_open_text' cols='70' rows='5' name='question".$mlw_question->question_id."' /></textarea>";
|
631 |
$mlw_display .= "<br />";
|
632 |
}
|
|
|
|
|
|
|
|
|
|
|
633 |
else
|
634 |
{
|
|
|
|
|
|
|
635 |
$mlw_display .= "<input type='text' class='mlw_answer_open_text' name='question".$mlw_question->question_id."' />";
|
636 |
$mlw_display .= "<br />";
|
637 |
}
|
129 |
max-width: 500px !important;
|
130 |
}
|
131 |
</style>
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
<?php
|
134 |
+
if ($mlw_quiz_options->theme_selected == "default")
|
135 |
+
{
|
136 |
+
echo "<style type='text/css'>".$mlw_quiz_options->quiz_stye."</style>";
|
137 |
+
}
|
138 |
+
else
|
139 |
+
{
|
140 |
+
echo "<link type='text/css' href='".get_option('mlw_qmn_theme_'.$mlw_quiz_options->theme_selected)."' rel='stylesheet' />";
|
141 |
+
}
|
142 |
+
|
143 |
/*
|
144 |
The following code is for displaying the quiz and completion screen
|
145 |
*/
|
450 |
//Display the questions
|
451 |
foreach($mlw_questions as $mlw_question) {
|
452 |
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
|
|
453 |
$mlw_display .= "<div class='quiz_section slide".$mlw_qmn_section_count."'>";
|
454 |
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
|
|
|
|
455 |
if ($mlw_question->question_type == 0)
|
456 |
{
|
457 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
458 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
459 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
460 |
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
461 |
if (is_array($mlw_qmn_answer_array))
|
462 |
{
|
512 |
}
|
513 |
elseif ($mlw_question->question_type == 4)
|
514 |
{
|
515 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
516 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
517 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
518 |
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
519 |
if (is_array($mlw_qmn_answer_array))
|
520 |
{
|
537 |
}
|
538 |
elseif ($mlw_question->question_type == 1)
|
539 |
{
|
540 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
541 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
542 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
543 |
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
544 |
if (is_array($mlw_qmn_answer_array))
|
545 |
{
|
553 |
$mlw_answer_total++;
|
554 |
if ($mlw_qmn_answer_each[0] != "")
|
555 |
{
|
556 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='".esc_attr($mlw_qmn_answer_each[0])."' /> ".htmlspecialchars_decode($mlw_qmn_answer_each[0], ENT_QUOTES)." ";
|
557 |
}
|
558 |
}
|
559 |
$mlw_display .= "<input type='radio' style='display: none;' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_none' checked='checked' value='No Answer Provided' />";
|
589 |
}
|
590 |
elseif ($mlw_question->question_type == 2)
|
591 |
{
|
592 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
593 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
594 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
595 |
$mlw_display .= "<select name='question".$mlw_question->question_id."'>";
|
596 |
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
597 |
if (is_array($mlw_qmn_answer_array))
|
642 |
}
|
643 |
elseif ($mlw_question->question_type == 5)
|
644 |
{
|
645 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
646 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
647 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
648 |
$mlw_display .= "<textarea class='mlw_answer_open_text' cols='70' rows='5' name='question".$mlw_question->question_id."' /></textarea>";
|
649 |
$mlw_display .= "<br />";
|
650 |
}
|
651 |
+
elseif ($mlw_question->question_type == 6)
|
652 |
+
{
|
653 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES);
|
654 |
+
$mlw_display .= "<br />";
|
655 |
+
}
|
656 |
else
|
657 |
{
|
658 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
659 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
660 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
661 |
$mlw_display .= "<input type='text' class='mlw_answer_open_text' name='question".$mlw_question->question_id."' />";
|
662 |
$mlw_display .= "<br />";
|
663 |
}
|
includes/mlw_quiz_admin.php
CHANGED
@@ -391,7 +391,7 @@ function mlw_generate_quiz_admin()
|
|
391 |
else $alternate = " class=\"alternate\"";
|
392 |
$quotes_list .= "<tr{$alternate}>";
|
393 |
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->quiz_id . "</span></td>";
|
394 |
-
$quotes_list .= "<td class='post-title column-title'><span style='font-size:16px;'>" .
|
395 |
$quotes_list .= "<td><span style='font-size:16px;'>[mlw_quizmaster quiz=".$mlw_quiz_info->quiz_id."]</span></td>";
|
396 |
$quotes_list .= "<td><span style='font-size:16px;'>[mlw_quizmaster_leaderboard mlw_quiz=".$mlw_quiz_info->quiz_id."]</span></td>";
|
397 |
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->quiz_views . "</span></td>";
|
391 |
else $alternate = " class=\"alternate\"";
|
392 |
$quotes_list .= "<tr{$alternate}>";
|
393 |
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->quiz_id . "</span></td>";
|
394 |
+
$quotes_list .= "<td class='post-title column-title'><span style='font-size:16px;'>" . esc_html($mlw_quiz_info->quiz_name) ." </span><span style='color:green;font-size:12px;'><a onclick=\"editQuizName('".$mlw_quiz_info->quiz_id."','".esc_js($mlw_quiz_info->quiz_name)."')\" href='#'>(Edit Name)</a></span><div><span style='color:green;font-size:12px;'><a href='admin.php?page=mlw_quiz_options&&quiz_id=".$mlw_quiz_info->quiz_id."'>Edit</a> | <a onclick=\"deleteQuiz('".$mlw_quiz_info->quiz_id."','".esc_js($mlw_quiz_info->quiz_name)."')\" href='#'>Delete</a> | <a href='admin.php?page=mlw_quiz_results&&quiz_id=".$mlw_quiz_info->quiz_id."'>Results</a> | <a href='#' onclick=\"duplicateQuiz('".$mlw_quiz_info->quiz_id."','".esc_js($mlw_quiz_info->quiz_name)."')\">Duplicate</a></span></div></td>";
|
395 |
$quotes_list .= "<td><span style='font-size:16px;'>[mlw_quizmaster quiz=".$mlw_quiz_info->quiz_id."]</span></td>";
|
396 |
$quotes_list .= "<td><span style='font-size:16px;'>[mlw_quizmaster_leaderboard mlw_quiz=".$mlw_quiz_info->quiz_id."]</span></td>";
|
397 |
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->quiz_views . "</span></td>";
|
includes/mlw_quiz_options.php
CHANGED
@@ -550,10 +550,11 @@ function mlw_generate_quiz_options()
|
|
550 |
{
|
551 |
//Function Variables
|
552 |
$mlw_qmn_style_id = intval($_POST["style_quiz_id"]);
|
|
|
553 |
$mlw_qmn_style = htmlspecialchars(stripslashes($_POST["quiz_css"]), ENT_QUOTES);
|
554 |
|
555 |
//Save the new css
|
556 |
-
$mlw_save_stle_results = $wpdb->query( $wpdb->prepare( "UPDATE ".$wpdb->prefix."mlw_quizzes SET quiz_stye='%s' WHERE quiz_id=%d", $mlw_qmn_style, $mlw_qmn_style_id ) );
|
557 |
if ($mlw_save_stle_results != false)
|
558 |
{
|
559 |
$mlw_hasSavedStyle = true;
|
@@ -946,6 +947,13 @@ function mlw_generate_quiz_options()
|
|
946 |
document.getElementById("new_question_answer_total").value = total_answers;
|
947 |
jQuery("#new_question_answers").append("<tr valign='top'><td><span style='font-weight:bold;'>Answer "+total_answers+"</span></td><td><input type='text' name='answer_"+total_answers+"' id='answer_"+total_answers+"' style='border-color:#000000;color:#3300CC;cursor:hand;width: 250px;'/></td><td><input type='text' name='answer_"+total_answers+"_points' id='answer_"+total_answers+"_points' value=0 style='border-color:#000000;color:#3300CC; cursor:hand;'/></td><td><input type='checkbox' id='answer_"+total_answers+"_correct' name='answer_"+total_answers+"_correct' value=1 /></td></tr>");
|
948 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
949 |
</script>
|
950 |
<div class="wrap">
|
951 |
<div class='mlw_quiz_options'>
|
@@ -1093,7 +1101,7 @@ function mlw_generate_quiz_options()
|
|
1093 |
<li><a href="#tabs-9">Quiz Emails</a></li>
|
1094 |
<li><a href="#tabs-6">Quiz Results Page</a></li>
|
1095 |
<li><a href="#tabs-7">Quiz Styling</a></li>
|
1096 |
-
<li><a href="#tabs-8">Quiz Tools</a></li>
|
1097 |
</ul>
|
1098 |
<div id="tabs-1">
|
1099 |
<button id="new_question_button_two">Add Question</button>
|
@@ -1103,10 +1111,37 @@ function mlw_generate_quiz_options()
|
|
1103 |
$display = "";
|
1104 |
$alternate = "";
|
1105 |
foreach($mlw_question_data as $mlw_question_info) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1106 |
if($alternate) $alternate = "";
|
1107 |
else $alternate = " class=\"alternate\"";
|
1108 |
$question_list .= "<tr{$alternate}>";
|
1109 |
$question_list .= "<td><span style='font-size:16px;'>" . $mlw_question_info->question_order . "</span></td>";
|
|
|
1110 |
$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."')\" href='#'>Edit</a> | <a onclick=\"deleteQuestion('".$mlw_question_info->question_id."')\" href='#'>Delete</a></span></div></td>";
|
1111 |
$question_list .= "</tr>";
|
1112 |
|
@@ -1194,6 +1229,7 @@ function mlw_generate_quiz_options()
|
|
1194 |
<option value="3" <?php if ($mlw_question_info->question_type == 3) { echo 'selected="selected"'; } ?>>Open Answer (Text Input)</option>
|
1195 |
<option value="5" <?php if ($mlw_question_info->question_type == 5) { echo 'selected="selected"'; } ?>>Open Answer (Large Text Input)</option>
|
1196 |
<option value="4" <?php if ($mlw_question_info->question_type == 4) { echo 'selected="selected"'; } ?>>Multiple Response (Checkbox)</option>
|
|
|
1197 |
</select>
|
1198 |
</div></td>
|
1199 |
</tr>
|
@@ -1247,12 +1283,14 @@ function mlw_generate_quiz_options()
|
|
1247 |
$display .= "<table class=\"widefat\">";
|
1248 |
$display .= "<thead><tr>
|
1249 |
<th>Question Order</th>
|
1250 |
-
<th>Question
|
|
|
1251 |
</tr></thead>";
|
1252 |
$display .= "<tbody id=\"the-list\">{$question_list}</tbody>";
|
1253 |
$display .= "<tfoot><tr>
|
1254 |
<th>Question Order</th>
|
1255 |
-
<th>Question
|
|
|
1256 |
</tr></tfoot>";
|
1257 |
$display .= "</table>";
|
1258 |
echo $display;
|
@@ -1334,6 +1372,7 @@ function mlw_generate_quiz_options()
|
|
1334 |
<option value="3">Open Answer (Text Input)</option>
|
1335 |
<option value="5">Open Answer (Large Text Input)</option>
|
1336 |
<option value="4">Multiple Response (Checkbox)</option>
|
|
|
1337 |
</select>
|
1338 |
</div></td>
|
1339 |
</tr>
|
@@ -2092,7 +2131,44 @@ function mlw_generate_quiz_options()
|
|
2092 |
</form>
|
2093 |
</div>
|
2094 |
<div id="tabs-7">
|
|
|
|
|
|
|
|
|
|
|
|
|
2095 |
<h3>Quiz Styles</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2096 |
<p>Entire quiz is a div with class 'mlw_qmn_quiz'</p>
|
2097 |
<p>Each page of the quiz is div with class 'quiz_section'</p>
|
2098 |
<p>Message before quiz text is a span with class 'mlw_qmn_message_before'</p>
|
@@ -2103,11 +2179,7 @@ function mlw_generate_quiz_options()
|
|
2103 |
<p>Each button shown for pagination (i.e Next/Previous) is wrapped in class 'mlw_qmn_quiz_link'</p>
|
2104 |
<p>Timer is wrapped in class 'mlw_qmn_timer'</p>
|
2105 |
<button id="save_styles_button" onclick="javascript: document.quiz_style_form.submit();">Save Quiz Style</button>
|
2106 |
-
|
2107 |
-
echo "<form action='' method='post' name='quiz_style_form'>";
|
2108 |
-
echo "<input type='hidden' name='save_style_options' value='confirmation' />";
|
2109 |
-
echo "<input type='hidden' name='style_quiz_id' value='".$quiz_id."' />";
|
2110 |
-
?>
|
2111 |
<table class="form-table">
|
2112 |
<tr>
|
2113 |
<td width="66%"><textarea style="width: 100%; height: 100%;" id="quiz_css" name="quiz_css"><?php echo $mlw_quiz_options->quiz_stye; ?></textarea>
|
550 |
{
|
551 |
//Function Variables
|
552 |
$mlw_qmn_style_id = intval($_POST["style_quiz_id"]);
|
553 |
+
$mlw_qmn_theme = $_POST["save_quiz_theme"];
|
554 |
$mlw_qmn_style = htmlspecialchars(stripslashes($_POST["quiz_css"]), ENT_QUOTES);
|
555 |
|
556 |
//Save the new css
|
557 |
+
$mlw_save_stle_results = $wpdb->query( $wpdb->prepare( "UPDATE ".$wpdb->prefix."mlw_quizzes SET quiz_stye='%s', theme_selected='%s' WHERE quiz_id=%d", $mlw_qmn_style, $mlw_qmn_theme, $mlw_qmn_style_id ) );
|
558 |
if ($mlw_save_stle_results != false)
|
559 |
{
|
560 |
$mlw_hasSavedStyle = true;
|
947 |
document.getElementById("new_question_answer_total").value = total_answers;
|
948 |
jQuery("#new_question_answers").append("<tr valign='top'><td><span style='font-weight:bold;'>Answer "+total_answers+"</span></td><td><input type='text' name='answer_"+total_answers+"' id='answer_"+total_answers+"' style='border-color:#000000;color:#3300CC;cursor:hand;width: 250px;'/></td><td><input type='text' name='answer_"+total_answers+"_points' id='answer_"+total_answers+"_points' value=0 style='border-color:#000000;color:#3300CC; cursor:hand;'/></td><td><input type='checkbox' id='answer_"+total_answers+"_correct' name='answer_"+total_answers+"_correct' value=1 /></td></tr>");
|
949 |
}
|
950 |
+
function mlw_qmn_theme(theme)
|
951 |
+
{
|
952 |
+
document.getElementById('save_quiz_theme').value = theme;
|
953 |
+
jQuery("div.mlw_qmn_themeBlockActive").toggleClass("mlw_qmn_themeBlockActive");
|
954 |
+
jQuery("#mlw_qmn_theme_block_"+theme).toggleClass("mlw_qmn_themeBlockActive");
|
955 |
+
|
956 |
+
}
|
957 |
</script>
|
958 |
<div class="wrap">
|
959 |
<div class='mlw_quiz_options'>
|
1101 |
<li><a href="#tabs-9">Quiz Emails</a></li>
|
1102 |
<li><a href="#tabs-6">Quiz Results Page</a></li>
|
1103 |
<li><a href="#tabs-7">Quiz Styling</a></li>
|
1104 |
+
<li><a href="#tabs-8">Quiz Tools/Add-Ons</a></li>
|
1105 |
</ul>
|
1106 |
<div id="tabs-1">
|
1107 |
<button id="new_question_button_two">Add Question</button>
|
1111 |
$display = "";
|
1112 |
$alternate = "";
|
1113 |
foreach($mlw_question_data as $mlw_question_info) {
|
1114 |
+
$mlw_question_type_text = "";
|
1115 |
+
switch ($mlw_question_info->question_type) {
|
1116 |
+
case 0:
|
1117 |
+
$mlw_question_type_text = "Multiple Choice";
|
1118 |
+
break;
|
1119 |
+
case 1:
|
1120 |
+
$mlw_question_type_text = "Horizontal Multiple Choice";
|
1121 |
+
break;
|
1122 |
+
case 2:
|
1123 |
+
$mlw_question_type_text = "Drop Down";
|
1124 |
+
break;
|
1125 |
+
case 3:
|
1126 |
+
$mlw_question_type_text = "Small Open Answer";
|
1127 |
+
break;
|
1128 |
+
case 4:
|
1129 |
+
$mlw_question_type_text = "Multiple Response";
|
1130 |
+
break;
|
1131 |
+
case 5:
|
1132 |
+
$mlw_question_type_text = "Large Open Answer";
|
1133 |
+
break;
|
1134 |
+
case 6:
|
1135 |
+
$mlw_question_type_text = "Text Block";
|
1136 |
+
break;
|
1137 |
+
default:
|
1138 |
+
$mlw_question_type_text = "Error Code ";
|
1139 |
+
}
|
1140 |
if($alternate) $alternate = "";
|
1141 |
else $alternate = " class=\"alternate\"";
|
1142 |
$question_list .= "<tr{$alternate}>";
|
1143 |
$question_list .= "<td><span style='font-size:16px;'>" . $mlw_question_info->question_order . "</span></td>";
|
1144 |
+
$question_list .= "<td><span style='font-size:16px;'>" . $mlw_question_type_text . "</span></td>";
|
1145 |
$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."')\" href='#'>Edit</a> | <a onclick=\"deleteQuestion('".$mlw_question_info->question_id."')\" href='#'>Delete</a></span></div></td>";
|
1146 |
$question_list .= "</tr>";
|
1147 |
|
1229 |
<option value="3" <?php if ($mlw_question_info->question_type == 3) { echo 'selected="selected"'; } ?>>Open Answer (Text Input)</option>
|
1230 |
<option value="5" <?php if ($mlw_question_info->question_type == 5) { echo 'selected="selected"'; } ?>>Open Answer (Large Text Input)</option>
|
1231 |
<option value="4" <?php if ($mlw_question_info->question_type == 4) { echo 'selected="selected"'; } ?>>Multiple Response (Checkbox)</option>
|
1232 |
+
<option value="6" <?php if ($mlw_question_info->question_type == 6) { echo 'selected="selected"'; } ?>>Text Block</option>
|
1233 |
</select>
|
1234 |
</div></td>
|
1235 |
</tr>
|
1283 |
$display .= "<table class=\"widefat\">";
|
1284 |
$display .= "<thead><tr>
|
1285 |
<th>Question Order</th>
|
1286 |
+
<th>Question Type</th>
|
1287 |
+
<th>Question</th>
|
1288 |
</tr></thead>";
|
1289 |
$display .= "<tbody id=\"the-list\">{$question_list}</tbody>";
|
1290 |
$display .= "<tfoot><tr>
|
1291 |
<th>Question Order</th>
|
1292 |
+
<th>Question Type</th>
|
1293 |
+
<th>Question</th>
|
1294 |
</tr></tfoot>";
|
1295 |
$display .= "</table>";
|
1296 |
echo $display;
|
1372 |
<option value="3">Open Answer (Text Input)</option>
|
1373 |
<option value="5">Open Answer (Large Text Input)</option>
|
1374 |
<option value="4">Multiple Response (Checkbox)</option>
|
1375 |
+
<option value="6">Text Block</option>
|
1376 |
</select>
|
1377 |
</div></td>
|
1378 |
</tr>
|
2131 |
</form>
|
2132 |
</div>
|
2133 |
<div id="tabs-7">
|
2134 |
+
<?php
|
2135 |
+
echo "<form action='' method='post' name='quiz_style_form'>";
|
2136 |
+
echo "<input type='hidden' name='save_style_options' value='confirmation' />";
|
2137 |
+
echo "<input type='hidden' name='style_quiz_id' value='".$quiz_id."' />";
|
2138 |
+
echo "<input type='hidden' name='save_quiz_theme' id='save_quiz_theme' value='".$mlw_quiz_options->theme_selected."' />";
|
2139 |
+
?>
|
2140 |
<h3>Quiz Styles</h3>
|
2141 |
+
<p>Choose your style:</p>
|
2142 |
+
<style>
|
2143 |
+
div.mlw_qmn_themeBlock
|
2144 |
+
{
|
2145 |
+
cursor: pointer;
|
2146 |
+
position: relative;
|
2147 |
+
height: 100px;
|
2148 |
+
width: 100px;
|
2149 |
+
background-color: #eee;
|
2150 |
+
color: blue;
|
2151 |
+
border: #ccc solid 1px;
|
2152 |
+
border-radius: 4px;
|
2153 |
+
padding: 5px 5px 5px 5px;
|
2154 |
+
display: inline-block;
|
2155 |
+
box-sizing: border-box;
|
2156 |
+
margin: auto;
|
2157 |
+
}
|
2158 |
+
div.mlw_qmn_themeBlockActive
|
2159 |
+
{
|
2160 |
+
background-color: yellow;
|
2161 |
+
}
|
2162 |
+
</style>
|
2163 |
+
<div onclick="mlw_qmn_theme('default');" id="mlw_qmn_theme_block_default" class="mlw_qmn_themeBlock <?php if ($mlw_quiz_options->theme_selected == 'default') {echo 'mlw_qmn_themeBlockActive';} ?>">Custom</div>
|
2164 |
+
<?php do_action('mlw_qmn_quiz_themes'); ?>
|
2165 |
+
<script>
|
2166 |
+
mlw_qmn_theme('<?php echo $mlw_quiz_options->theme_selected; ?>');
|
2167 |
+
</script>
|
2168 |
+
<br /><br />
|
2169 |
+
<button id="save_styles_button" onclick="javascript: document.quiz_style_form.submit();">Save Quiz Style</button>
|
2170 |
+
<hr />
|
2171 |
+
<h3>Custom Theme CSS</h3>
|
2172 |
<p>Entire quiz is a div with class 'mlw_qmn_quiz'</p>
|
2173 |
<p>Each page of the quiz is div with class 'quiz_section'</p>
|
2174 |
<p>Message before quiz text is a span with class 'mlw_qmn_message_before'</p>
|
2179 |
<p>Each button shown for pagination (i.e Next/Previous) is wrapped in class 'mlw_qmn_quiz_link'</p>
|
2180 |
<p>Timer is wrapped in class 'mlw_qmn_timer'</p>
|
2181 |
<button id="save_styles_button" onclick="javascript: document.quiz_style_form.submit();">Save Quiz Style</button>
|
2182 |
+
|
|
|
|
|
|
|
|
|
2183 |
<table class="form-table">
|
2184 |
<tr>
|
2185 |
<td width="66%"><textarea style="width: 100%; height: 100%;" id="quiz_css" name="quiz_css"><?php echo $mlw_quiz_options->quiz_stye; ?></textarea>
|
includes/mlw_results.php
CHANGED
@@ -149,7 +149,7 @@ function mlw_generate_quiz_results()
|
|
149 |
if($alternate) $alternate = "";
|
150 |
else $alternate = " class=\"alternate\"";
|
151 |
$quotes_list .= "<tr{$alternate}>";
|
152 |
-
$quotes_list .= "<td><span style='color:green;font-size:16px;'><a href='admin.php?page=mlw_quiz_result_details&&result_id=".$mlw_quiz_info->result_id."'>View</a>|<a onclick=\"deleteResults('".$mlw_quiz_info->result_id."','"
|
153 |
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->quiz_name . "</span></td>";
|
154 |
if ($mlw_quiz_info->quiz_system == 0)
|
155 |
{
|
149 |
if($alternate) $alternate = "";
|
150 |
else $alternate = " class=\"alternate\"";
|
151 |
$quotes_list .= "<tr{$alternate}>";
|
152 |
+
$quotes_list .= "<td><span style='color:green;font-size:16px;'><a href='admin.php?page=mlw_quiz_result_details&&result_id=".$mlw_quiz_info->result_id."'>View</a>|<a onclick=\"deleteResults('".$mlw_quiz_info->result_id."','".esc_js($mlw_quiz_info->quiz_name)."')\" href='#'>Delete</a></span></td>";
|
153 |
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->quiz_name . "</span></td>";
|
154 |
if ($mlw_quiz_info->quiz_system == 0)
|
155 |
{
|
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 = "
|
10 |
if ( ! get_option('mlw_quiz_master_version'))
|
11 |
{
|
12 |
add_option('mlw_quiz_master_version' , $data);
|
@@ -236,6 +236,15 @@ function mlw_quiz_update()
|
|
236 |
$results = $wpdb->query( $update_sql );
|
237 |
}
|
238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
|
240 |
global $wpdb;
|
241 |
$table_name = $wpdb->prefix . "mlw_questions";
|
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 = "3.0.1";
|
10 |
if ( ! get_option('mlw_quiz_master_version'))
|
11 |
{
|
12 |
add_option('mlw_quiz_master_version' , $data);
|
236 |
$results = $wpdb->query( $update_sql );
|
237 |
}
|
238 |
|
239 |
+
//Update 3.0.1
|
240 |
+
if($wpdb->get_var("SHOW COLUMNS FROM ".$table_name." LIKE 'theme_selected'") != "theme_selected")
|
241 |
+
{
|
242 |
+
$sql = "ALTER TABLE ".$table_name." ADD theme_selected TEXT NOT NULL AFTER quiz_settings";
|
243 |
+
$results = $wpdb->query( $sql );
|
244 |
+
$update_sql = "UPDATE ".$table_name." SET theme_selected='default'";
|
245 |
+
$results = $wpdb->query( $update_sql );
|
246 |
+
}
|
247 |
+
|
248 |
|
249 |
global $wpdb;
|
250 |
$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:
|
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: 3.0.1
|
7 |
Author: Frank Corso
|
8 |
Author URI: http://www.mylocalwebstop.com/
|
9 |
Plugin URI: http://www.mylocalwebstop.com/
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: fpcorso
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RTGYAETX36ZQJ
|
4 |
Tags: quiz, test, score, exam, survey, contact, form, email, answer, question
|
5 |
Requires at least: 3.7.1
|
6 |
-
Tested up to: 3.9.
|
7 |
-
Stable tag:
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
|
@@ -104,6 +104,15 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
|
|
104 |
|
105 |
== Changelog ==
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
= 2.9.1 (August 11, 2014) =
|
108 |
* Added Facebook Sharing
|
109 |
* Added Ability To Edit Email Subject
|
@@ -484,6 +493,9 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
|
|
484 |
|
485 |
== Upgrade Notice ==
|
486 |
|
|
|
|
|
|
|
487 |
= 2.9.1 =
|
488 |
Upgrade for facebook sharing, a new question type, the ability to edit the email's subject, and much more!
|
489 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RTGYAETX36ZQJ
|
4 |
Tags: quiz, test, score, exam, survey, contact, form, email, answer, question
|
5 |
Requires at least: 3.7.1
|
6 |
+
Tested up to: 3.9.2
|
7 |
+
Stable tag: 3.0.1
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
|
104 |
|
105 |
== Changelog ==
|
106 |
|
107 |
+
= 3.0.1 (August 28, 2014) =
|
108 |
+
* Added New Style Manager
|
109 |
+
* Added Ability For Non-Question Question Types
|
110 |
+
* Added New Text Block Question Type
|
111 |
+
* Added Question Type Column To Question List
|
112 |
+
* Minor Design Changes To Quiz Questions Tab
|
113 |
+
* Fixed Results Delete Link Not Working Bug
|
114 |
+
* Fixed Quiz Name Showing Escaped Values Bug
|
115 |
+
|
116 |
= 2.9.1 (August 11, 2014) =
|
117 |
* Added Facebook Sharing
|
118 |
* Added Ability To Edit Email Subject
|
493 |
|
494 |
== Upgrade Notice ==
|
495 |
|
496 |
+
= 3.0.1 =
|
497 |
+
Upgrade for new style manager, new non-question types, text block question type, and various design/bug fixes!
|
498 |
+
|
499 |
= 2.9.1 =
|
500 |
Upgrade for facebook sharing, a new question type, the ability to edit the email's subject, and much more!
|
501 |
|