Version Description
Upgrade for facebook sharing, a new question type, the ability to edit the email's subject, and much more!
Download this release
Release Info
Developer | fpcorso |
Plugin | ![]() |
Version | 2.9.1 |
Comparing to | |
See all releases |
Code changes from version 2.8.5 to 2.9.1
- includes/mlw_qmn_credits.php +147 -137
- includes/mlw_quiz.php +84 -21
- includes/mlw_quiz_options.php +23 -9
- includes/mlw_update.php +1 -1
- mlw_quizmaster2.php +1 -1
- readme.txt +15 -3
includes/mlw_qmn_credits.php
CHANGED
@@ -1,138 +1,148 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
This page shows the about page
|
4 |
-
*/
|
5 |
-
/*
|
6 |
-
Copyright 2014, My Local Webstop (email : fpcorso@mylocalwebstop.com)
|
7 |
-
*/
|
8 |
-
|
9 |
-
function mlw_generate_about_page()
|
10 |
-
{
|
11 |
-
//Page Variables
|
12 |
-
$mlw_quiz_version = get_option('mlw_quiz_master_version');
|
13 |
-
|
14 |
-
|
15 |
-
?>
|
16 |
-
<!-- css -->
|
17 |
-
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" />
|
18 |
-
<!-- jquery scripts -->
|
19 |
-
<?php
|
20 |
-
wp_enqueue_script( 'jquery' );
|
21 |
-
wp_enqueue_script( 'jquery-ui-core' );
|
22 |
-
wp_enqueue_script( 'jquery-ui-dialog' );
|
23 |
-
wp_enqueue_script( 'jquery-ui-button' );
|
24 |
-
wp_enqueue_script( 'jquery-effects-blind' );
|
25 |
-
wp_enqueue_script( 'jquery-effects-explode' );
|
26 |
-
?>
|
27 |
-
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
|
28 |
-
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>-->
|
29 |
-
<script type="text/javascript">
|
30 |
-
var $j = jQuery.noConflict();
|
31 |
-
// increase the default animation speed to exaggerate the effect
|
32 |
-
$j.fx.speeds._default = 1000;
|
33 |
-
function mlw_qmn_setTab(tab) {
|
34 |
-
jQuery("a.nav-tab-active").toggleClass("nav-tab-active");
|
35 |
-
if (tab == 1)
|
36 |
-
{
|
37 |
-
jQuery("#mlw_quiz_what_new").show();
|
38 |
-
jQuery("#mlw_quiz_changelog").hide();
|
39 |
-
jQuery("#mlw_quiz_requested").hide();
|
40 |
-
jQuery("#mlw_qmn_tab_1").toggleClass("nav-tab-active");
|
41 |
-
}
|
42 |
-
if (tab == 2)
|
43 |
-
{
|
44 |
-
jQuery("#mlw_quiz_what_new").hide();
|
45 |
-
jQuery("#mlw_quiz_changelog").show();
|
46 |
-
jQuery("#mlw_quiz_requested").hide();
|
47 |
-
jQuery("#mlw_qmn_tab_2").toggleClass("nav-tab-active");
|
48 |
-
}
|
49 |
-
if (tab == 3)
|
50 |
-
{
|
51 |
-
jQuery("#mlw_quiz_what_new").hide();
|
52 |
-
jQuery("#mlw_quiz_changelog").hide();
|
53 |
-
jQuery("#mlw_quiz_requested").show();
|
54 |
-
jQuery("#mlw_qmn_tab_3").toggleClass("nav-tab-active");
|
55 |
-
}
|
56 |
-
}
|
57 |
-
</script>
|
58 |
-
<style>
|
59 |
-
div.mlw_qmn_icon_wrap
|
60 |
-
{
|
61 |
-
background: <?php echo 'url("'.plugins_url( 'images/quiz_icon.png' , __FILE__ ).'")'; ?> no-repeat;
|
62 |
-
background: none, <?php echo 'url("'.plugins_url( 'images/quiz_icon.png' , __FILE__ ).'")'; ?> no-repeat;
|
63 |
-
position: absolute;
|
64 |
-
top: 0;
|
65 |
-
right: 0;
|
66 |
-
background-color: #0d97d8;
|
67 |
-
color: yellow;
|
68 |
-
background-position: center 24px;
|
69 |
-
background-size: 85px 85px;
|
70 |
-
font-size: 14px;
|
71 |
-
text-align: center;
|
72 |
-
font-weight: 600;
|
73 |
-
margin: 5px 0 0;
|
74 |
-
padding-top: 120px;
|
75 |
-
height: 40px;
|
76 |
-
display: inline-block;
|
77 |
-
width: 150px;
|
78 |
-
text-rendering: optimizeLegibility;
|
79 |
-
border: 5px solid #106daa;
|
80 |
-
-moz-border-radius: 20px;
|
81 |
-
-webkit-border-radius: 20px;
|
82 |
-
-khtml-border-radius: 20px;
|
83 |
-
border-radius: 20px;
|
84 |
-
}
|
85 |
-
</style>
|
86 |
-
<div class="wrap about-wrap">
|
87 |
-
<h1>Welcome To Quiz Master Next <?php echo $mlw_quiz_version; ?></h1>
|
88 |
-
<div class="about-text">Thank you for updating!</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 2.
|
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>
|
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
|
104 |
-
|
105 |
-
<
|
106 |
-
<
|
107 |
-
<
|
108 |
-
|
109 |
-
|
110 |
-
</
|
111 |
-
|
112 |
-
<
|
113 |
-
<
|
114 |
-
|
115 |
-
<li
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
<li
|
120 |
-
<li
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
<li>
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
<li>
|
131 |
-
<li>
|
132 |
-
<li>
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
This page shows the about page
|
4 |
+
*/
|
5 |
+
/*
|
6 |
+
Copyright 2014, My Local Webstop (email : fpcorso@mylocalwebstop.com)
|
7 |
+
*/
|
8 |
+
|
9 |
+
function mlw_generate_about_page()
|
10 |
+
{
|
11 |
+
//Page Variables
|
12 |
+
$mlw_quiz_version = get_option('mlw_quiz_master_version');
|
13 |
+
|
14 |
+
|
15 |
+
?>
|
16 |
+
<!-- css -->
|
17 |
+
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" />
|
18 |
+
<!-- jquery scripts -->
|
19 |
+
<?php
|
20 |
+
wp_enqueue_script( 'jquery' );
|
21 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
22 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
23 |
+
wp_enqueue_script( 'jquery-ui-button' );
|
24 |
+
wp_enqueue_script( 'jquery-effects-blind' );
|
25 |
+
wp_enqueue_script( 'jquery-effects-explode' );
|
26 |
+
?>
|
27 |
+
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
|
28 |
+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>-->
|
29 |
+
<script type="text/javascript">
|
30 |
+
var $j = jQuery.noConflict();
|
31 |
+
// increase the default animation speed to exaggerate the effect
|
32 |
+
$j.fx.speeds._default = 1000;
|
33 |
+
function mlw_qmn_setTab(tab) {
|
34 |
+
jQuery("a.nav-tab-active").toggleClass("nav-tab-active");
|
35 |
+
if (tab == 1)
|
36 |
+
{
|
37 |
+
jQuery("#mlw_quiz_what_new").show();
|
38 |
+
jQuery("#mlw_quiz_changelog").hide();
|
39 |
+
jQuery("#mlw_quiz_requested").hide();
|
40 |
+
jQuery("#mlw_qmn_tab_1").toggleClass("nav-tab-active");
|
41 |
+
}
|
42 |
+
if (tab == 2)
|
43 |
+
{
|
44 |
+
jQuery("#mlw_quiz_what_new").hide();
|
45 |
+
jQuery("#mlw_quiz_changelog").show();
|
46 |
+
jQuery("#mlw_quiz_requested").hide();
|
47 |
+
jQuery("#mlw_qmn_tab_2").toggleClass("nav-tab-active");
|
48 |
+
}
|
49 |
+
if (tab == 3)
|
50 |
+
{
|
51 |
+
jQuery("#mlw_quiz_what_new").hide();
|
52 |
+
jQuery("#mlw_quiz_changelog").hide();
|
53 |
+
jQuery("#mlw_quiz_requested").show();
|
54 |
+
jQuery("#mlw_qmn_tab_3").toggleClass("nav-tab-active");
|
55 |
+
}
|
56 |
+
}
|
57 |
+
</script>
|
58 |
+
<style>
|
59 |
+
div.mlw_qmn_icon_wrap
|
60 |
+
{
|
61 |
+
background: <?php echo 'url("'.plugins_url( 'images/quiz_icon.png' , __FILE__ ).'")'; ?> no-repeat;
|
62 |
+
background: none, <?php echo 'url("'.plugins_url( 'images/quiz_icon.png' , __FILE__ ).'")'; ?> no-repeat;
|
63 |
+
position: absolute;
|
64 |
+
top: 0;
|
65 |
+
right: 0;
|
66 |
+
background-color: #0d97d8;
|
67 |
+
color: yellow;
|
68 |
+
background-position: center 24px;
|
69 |
+
background-size: 85px 85px;
|
70 |
+
font-size: 14px;
|
71 |
+
text-align: center;
|
72 |
+
font-weight: 600;
|
73 |
+
margin: 5px 0 0;
|
74 |
+
padding-top: 120px;
|
75 |
+
height: 40px;
|
76 |
+
display: inline-block;
|
77 |
+
width: 150px;
|
78 |
+
text-rendering: optimizeLegibility;
|
79 |
+
border: 5px solid #106daa;
|
80 |
+
-moz-border-radius: 20px;
|
81 |
+
-webkit-border-radius: 20px;
|
82 |
+
-khtml-border-radius: 20px;
|
83 |
+
border-radius: 20px;
|
84 |
+
}
|
85 |
+
</style>
|
86 |
+
<div class="wrap about-wrap">
|
87 |
+
<h1>Welcome To Quiz Master Next <?php echo $mlw_quiz_version; ?></h1>
|
88 |
+
<div class="about-text">Thank you for updating!</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 2.9</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;">Facebook Sharing</h2>
|
100 |
+
<p style="text-align: center;">You users can now share their results with their facebook friends in addition to their twitter friends!</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;">New Question Type</h2>
|
103 |
+
<p style="text-align: center;">This update gives you a new question type - Large Open Answer. This type will give you a large text box for your users to fill in as opposed to the smaller text field for the regular open answer.</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;">Edit The Email's Subject</h2>
|
106 |
+
<p style="text-align: center;">You can now edit the subject of the email sent to your user after they submit your form.</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 11, 2014)</h3>
|
113 |
+
<ul>
|
114 |
+
<li>* Added Facebook Sharing</li>
|
115 |
+
<li>* Added Ability To Edit Email Subject</li>
|
116 |
+
<li>* Added Large Open Answer Question Type</li>
|
117 |
+
<li>* Added Ability For Points To Have Decimal Values</li>
|
118 |
+
<li>* Fixed Not All Questions Showing In Results Bug</li>
|
119 |
+
<li>* Fixed Not Valid Email On Non-Required Email Bug</li>
|
120 |
+
<li>* Fixed Special Character Not Grading Properly In Open Answer Bug</li>
|
121 |
+
</ul>
|
122 |
+
</div>
|
123 |
+
<div id="mlw_quiz_requested" style="display: none;">
|
124 |
+
<h3>Requested Features For Future Updates By Premium Support Users</h3>
|
125 |
+
<ul>
|
126 |
+
<li>None</li>
|
127 |
+
</ul>
|
128 |
+
<h3>Requested Features For Future Updates By Non-Premium Support Users</h3>
|
129 |
+
<ul>
|
130 |
+
<li>Importing Questions</li>
|
131 |
+
<li>Stats For Each Quiz</li>
|
132 |
+
<li>Force Login/Register Option</li>
|
133 |
+
<li>Categories</li>
|
134 |
+
<li>More Social Media Integration</li>
|
135 |
+
<li>Show Question Amount On Pagination</li>
|
136 |
+
<li>Required Questions</li>
|
137 |
+
<li>Duplicate Question</li>
|
138 |
+
<li>Allow Quiz To Not Show Start Page</li>
|
139 |
+
<li>Progress Bar For Timer</li>
|
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>
|
146 |
+
<?php
|
147 |
+
}
|
148 |
?>
|
includes/mlw_quiz.php
CHANGED
@@ -129,6 +129,9 @@ function mlw_quiz_shortcode($atts)
|
|
129 |
max-width: 500px !important;
|
130 |
}
|
131 |
</style>
|
|
|
|
|
|
|
132 |
<?php
|
133 |
|
134 |
/*
|
@@ -142,6 +145,8 @@ function mlw_quiz_shortcode($atts)
|
|
142 |
return $mlw_display;
|
143 |
}
|
144 |
|
|
|
|
|
145 |
//Display Quiz
|
146 |
if (!isset($_POST["complete_quiz"]) && $mlw_quiz_options->quiz_name != "" && $mlw_qmn_isAllowed)
|
147 |
{
|
@@ -167,14 +172,14 @@ function mlw_quiz_shortcode($atts)
|
|
167 |
var $j = jQuery.noConflict();
|
168 |
$j( ".quiz_section" ).hide();
|
169 |
$j( ".quiz_section" ).append( "<br />" );
|
170 |
-
$j( ".mlw_qmn_quiz" ).append( "<a class=\"mlw_qmn_quiz_link mlw_previous\" href=\"javascript:prevSlide(<?php echo $mlw_quiz_options->pagination;
|
171 |
-
$j( ".mlw_qmn_quiz" ).append( "<a class=\"mlw_qmn_quiz_link mlw_next\" href=\"javascript:nextSlide(<?php echo $mlw_quiz_options->pagination;
|
172 |
window.mlw_quiz_slide = 0;
|
173 |
window.mlw_previous = 0;
|
174 |
window.mlw_quiz_total_slides = <?php echo $mlw_qmn_section_limit; ?>;
|
175 |
-
nextSlide(1);
|
176 |
}, 100);
|
177 |
-
function nextSlide(mlw_pagination)
|
178 |
{
|
179 |
jQuery( ".quiz_section" ).hide();
|
180 |
for (var i = 0; i < mlw_pagination; i++)
|
@@ -210,11 +215,14 @@ function mlw_quiz_shortcode($atts)
|
|
210 |
jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
|
211 |
}
|
212 |
window.mlw_previous = 0;
|
213 |
-
|
214 |
-
|
|
|
|
|
|
|
215 |
|
216 |
}
|
217 |
-
function prevSlide(mlw_pagination)
|
218 |
{
|
219 |
jQuery( ".quiz_section" ).hide();
|
220 |
for (var i = 0; i < mlw_pagination; i++)
|
@@ -250,8 +258,11 @@ function mlw_quiz_shortcode($atts)
|
|
250 |
jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
|
251 |
}
|
252 |
window.mlw_previous = 1;
|
253 |
-
|
254 |
-
|
|
|
|
|
|
|
255 |
}
|
256 |
</script>
|
257 |
<?php
|
@@ -328,9 +339,6 @@ function mlw_quiz_shortcode($atts)
|
|
328 |
}
|
329 |
|
330 |
</script>
|
331 |
-
<style type="text/css">
|
332 |
-
<?php echo $mlw_quiz_options->quiz_stye; ?>
|
333 |
-
</style>
|
334 |
<?php
|
335 |
//Update the quiz views
|
336 |
$mlw_views = $mlw_quiz_options->quiz_views;
|
@@ -394,7 +402,7 @@ function mlw_quiz_shortcode($atts)
|
|
394 |
}";
|
395 |
}
|
396 |
$mlw_display .= "
|
397 |
-
if (document.forms['quizForm']['mlwUserEmail'].
|
398 |
{
|
399 |
var x=document.forms['quizForm']['mlwUserEmail'].value;
|
400 |
var atpos=x.indexOf('@');
|
@@ -460,6 +468,7 @@ function mlw_quiz_shortcode($atts)
|
|
460 |
$mlw_display .= "<br />";
|
461 |
}
|
462 |
}
|
|
|
463 |
}
|
464 |
else
|
465 |
{
|
@@ -535,6 +544,7 @@ function mlw_quiz_shortcode($atts)
|
|
535 |
$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);
|
536 |
}
|
537 |
}
|
|
|
538 |
}
|
539 |
else
|
540 |
{
|
@@ -615,6 +625,11 @@ function mlw_quiz_shortcode($atts)
|
|
615 |
$mlw_display .= "</select>";
|
616 |
$mlw_display .= "<br />";
|
617 |
}
|
|
|
|
|
|
|
|
|
|
|
618 |
else
|
619 |
{
|
620 |
$mlw_display .= "<input type='text' class='mlw_answer_open_text' name='question".$mlw_question->question_id."' />";
|
@@ -783,7 +798,7 @@ function mlw_quiz_shortcode($atts)
|
|
783 |
}
|
784 |
}
|
785 |
}
|
786 |
-
elseif ( $mlw_question->question_type == 3 )
|
787 |
{
|
788 |
if (isset($_POST["question".$mlw_question->question_id]))
|
789 |
{
|
@@ -793,12 +808,12 @@ function mlw_quiz_shortcode($atts)
|
|
793 |
{
|
794 |
$mlw_user_answer = " ";
|
795 |
}
|
796 |
-
$mlw_user_text .= strval(htmlspecialchars_decode($mlw_user_answer, ENT_QUOTES));
|
797 |
$mlw_qmn_question_answers_array = $mlw_qmn_loaded_answer_arrays[$mlw_question->question_id];
|
798 |
foreach($mlw_qmn_question_answers_array as $mlw_qmn_question_answers_each)
|
799 |
{
|
800 |
$mlw_correct_text = strval(htmlspecialchars_decode($mlw_qmn_question_answers_each[0], ENT_QUOTES));
|
801 |
-
if (strtoupper($
|
802 |
{
|
803 |
$mlw_correct += 1;
|
804 |
$mlw_points += $mlw_qmn_question_answers_each[1];
|
@@ -1050,6 +1065,34 @@ EOC;
|
|
1050 |
|
1051 |
if ($mlw_quiz_options->social_media == 1)
|
1052 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1053 |
$mlw_social_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_quiz_options->social_media_text);
|
1054 |
$mlw_social_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_social_message);
|
1055 |
$mlw_social_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_social_message);
|
@@ -1059,8 +1102,8 @@ EOC;
|
|
1059 |
$mlw_social_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_social_message);
|
1060 |
$mlw_social_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_social_message);
|
1061 |
$mlw_display .= "<br />
|
1062 |
-
<a
|
1063 |
-
<
|
1064 |
<br />";
|
1065 |
}
|
1066 |
|
@@ -1083,6 +1126,26 @@ EOC;
|
|
1083 |
//Cycle through landing pages
|
1084 |
foreach($mlw_user_email_array as $mlw_each)
|
1085 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1086 |
//Check to see if default
|
1087 |
if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
|
1088 |
{
|
@@ -1106,7 +1169,7 @@ EOC;
|
|
1106 |
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1107 |
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1108 |
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1109 |
-
wp_mail($mlw_user_email,
|
1110 |
break;
|
1111 |
}
|
1112 |
else
|
@@ -1134,7 +1197,7 @@ EOC;
|
|
1134 |
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1135 |
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1136 |
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1137 |
-
wp_mail($mlw_user_email,
|
1138 |
break;
|
1139 |
}
|
1140 |
|
@@ -1161,7 +1224,7 @@ EOC;
|
|
1161 |
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1162 |
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1163 |
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1164 |
-
wp_mail($mlw_user_email,
|
1165 |
break;
|
1166 |
}
|
1167 |
}
|
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 |
/*
|
145 |
return $mlw_display;
|
146 |
}
|
147 |
|
148 |
+
|
149 |
+
|
150 |
//Display Quiz
|
151 |
if (!isset($_POST["complete_quiz"]) && $mlw_quiz_options->quiz_name != "" && $mlw_qmn_isAllowed)
|
152 |
{
|
172 |
var $j = jQuery.noConflict();
|
173 |
$j( ".quiz_section" ).hide();
|
174 |
$j( ".quiz_section" ).append( "<br />" );
|
175 |
+
$j( ".mlw_qmn_quiz" ).append( "<a class=\"mlw_qmn_quiz_link mlw_previous\" href=\"javascript:prevSlide(<?php echo $mlw_quiz_options->pagination; ?>, 1);\"><?php echo $mlw_qmn_pagination_text[0]; ?></a>" );
|
176 |
+
$j( ".mlw_qmn_quiz" ).append( "<a class=\"mlw_qmn_quiz_link mlw_next\" href=\"javascript:nextSlide(<?php echo $mlw_quiz_options->pagination; ?>, 1);\"><?php echo $mlw_qmn_pagination_text[1]; ?></a>" );
|
177 |
window.mlw_quiz_slide = 0;
|
178 |
window.mlw_previous = 0;
|
179 |
window.mlw_quiz_total_slides = <?php echo $mlw_qmn_section_limit; ?>;
|
180 |
+
nextSlide(1, 0);
|
181 |
}, 100);
|
182 |
+
function nextSlide(mlw_pagination, mlw_goto_top)
|
183 |
{
|
184 |
jQuery( ".quiz_section" ).hide();
|
185 |
for (var i = 0; i < mlw_pagination; i++)
|
215 |
jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
|
216 |
}
|
217 |
window.mlw_previous = 0;
|
218 |
+
if (mlw_goto_top == 1)
|
219 |
+
{
|
220 |
+
window.location.hash = "mlw_does_not_exist";
|
221 |
+
window.location.hash = "mlw_top_of_quiz";
|
222 |
+
}
|
223 |
|
224 |
}
|
225 |
+
function prevSlide(mlw_pagination, mlw_goto_top)
|
226 |
{
|
227 |
jQuery( ".quiz_section" ).hide();
|
228 |
for (var i = 0; i < mlw_pagination; i++)
|
258 |
jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
|
259 |
}
|
260 |
window.mlw_previous = 1;
|
261 |
+
if (mlw_goto_top == 1)
|
262 |
+
{
|
263 |
+
window.location.hash = "mlw_does_not_exist";
|
264 |
+
window.location.hash = "mlw_top_of_quiz";
|
265 |
+
}
|
266 |
}
|
267 |
</script>
|
268 |
<?php
|
339 |
}
|
340 |
|
341 |
</script>
|
|
|
|
|
|
|
342 |
<?php
|
343 |
//Update the quiz views
|
344 |
$mlw_views = $mlw_quiz_options->quiz_views;
|
402 |
}";
|
403 |
}
|
404 |
$mlw_display .= "
|
405 |
+
if (document.forms['quizForm']['mlwUserEmail'].value != '')
|
406 |
{
|
407 |
var x=document.forms['quizForm']['mlwUserEmail'].value;
|
408 |
var atpos=x.indexOf('@');
|
468 |
$mlw_display .= "<br />";
|
469 |
}
|
470 |
}
|
471 |
+
$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' />";
|
472 |
}
|
473 |
else
|
474 |
{
|
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' />";
|
548 |
}
|
549 |
else
|
550 |
{
|
625 |
$mlw_display .= "</select>";
|
626 |
$mlw_display .= "<br />";
|
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."' />";
|
798 |
}
|
799 |
}
|
800 |
}
|
801 |
+
elseif ( $mlw_question->question_type == 3 || $mlw_question->question_type == 5)
|
802 |
{
|
803 |
if (isset($_POST["question".$mlw_question->question_id]))
|
804 |
{
|
808 |
{
|
809 |
$mlw_user_answer = " ";
|
810 |
}
|
811 |
+
$mlw_user_text .= strval(stripslashes(htmlspecialchars_decode($mlw_user_answer, ENT_QUOTES)));
|
812 |
$mlw_qmn_question_answers_array = $mlw_qmn_loaded_answer_arrays[$mlw_question->question_id];
|
813 |
foreach($mlw_qmn_question_answers_array as $mlw_qmn_question_answers_each)
|
814 |
{
|
815 |
$mlw_correct_text = strval(htmlspecialchars_decode($mlw_qmn_question_answers_each[0], ENT_QUOTES));
|
816 |
+
if (strtoupper($mlw_user_text) == strtoupper($mlw_correct_text))
|
817 |
{
|
818 |
$mlw_correct += 1;
|
819 |
$mlw_points += $mlw_qmn_question_answers_each[1];
|
1065 |
|
1066 |
if ($mlw_quiz_options->social_media == 1)
|
1067 |
{
|
1068 |
+
?>
|
1069 |
+
<script>
|
1070 |
+
function mlw_qmn_share(network, mlw_qmn_social_text, mlw_qmn_title)
|
1071 |
+
{
|
1072 |
+
var sTop = window.screen.height/2-(218);
|
1073 |
+
var sLeft = window.screen.width/2-(313);
|
1074 |
+
var sqShareOptions = "height=400,width=580,toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=0,top=" + sTop + ",left=" + sLeft;
|
1075 |
+
var pageUrl = window.location.href;
|
1076 |
+
var pageUrlEncoded = encodeURIComponent(pageUrl);
|
1077 |
+
if (network == 1)
|
1078 |
+
{
|
1079 |
+
var Url = "https://www.facebook.com/dialog/feed?"
|
1080 |
+
+ "display=popup&"
|
1081 |
+
+ "app_id=483815031724529&"
|
1082 |
+
+ "link=" + pageUrlEncoded + "&"
|
1083 |
+
+ "name=" + encodeURIComponent(mlw_qmn_social_text) + "&"
|
1084 |
+
+ "description= &"
|
1085 |
+
+ "redirect_uri=http://www.mylocalwebstop.com/mlw_qmn_close.html";
|
1086 |
+
}
|
1087 |
+
if (network == 2)
|
1088 |
+
{
|
1089 |
+
var Url = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(mlw_qmn_social_text);
|
1090 |
+
}
|
1091 |
+
window.open(Url, "Share", sqShareOptions);
|
1092 |
+
return false;
|
1093 |
+
}
|
1094 |
+
</script>
|
1095 |
+
<?php
|
1096 |
$mlw_social_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_quiz_options->social_media_text);
|
1097 |
$mlw_social_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_social_message);
|
1098 |
$mlw_social_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_social_message);
|
1102 |
$mlw_social_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_social_message);
|
1103 |
$mlw_social_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_social_message);
|
1104 |
$mlw_display .= "<br />
|
1105 |
+
<a class=\"mlw_qmn_quiz_link\" style=\"display: inline; vertical-align:top !important;font-weight: bold; cursor: pointer;text-decoration: none;\" onclick=\"mlw_qmn_share(1, '".esc_js($mlw_social_message)."', '".esc_js($mlw_quiz_options->quiz_name)."');\">Facebook</a>
|
1106 |
+
<a class=\"mlw_qmn_quiz_link\" style=\"display: inline; vertical-align:top !important;font-weight: bold; cursor: pointer;text-decoration: none;\" onclick=\"mlw_qmn_share(2, '".esc_js($mlw_social_message)."', '".esc_js($mlw_quiz_options->quiz_name)."');\">Twitter</a>
|
1107 |
<br />";
|
1108 |
}
|
1109 |
|
1126 |
//Cycle through landing pages
|
1127 |
foreach($mlw_user_email_array as $mlw_each)
|
1128 |
{
|
1129 |
+
|
1130 |
+
//Generate Email Subject
|
1131 |
+
if (!isset($mlw_each[3]))
|
1132 |
+
{
|
1133 |
+
$mlw_each[3] = "Quiz Results For %QUIZ_NAME";
|
1134 |
+
}
|
1135 |
+
$mlw_each[3] = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_each[3]);
|
1136 |
+
$mlw_each[3] = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_each[3]);
|
1137 |
+
$mlw_each[3] = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_each[3]);
|
1138 |
+
$mlw_each[3] = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_each[3]);
|
1139 |
+
$mlw_each[3] = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_each[3]);
|
1140 |
+
$mlw_each[3] = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_each[3]);
|
1141 |
+
$mlw_each[3] = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_each[3]);
|
1142 |
+
$mlw_each[3] = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_each[3]);
|
1143 |
+
$mlw_each[3] = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_each[3]);
|
1144 |
+
$mlw_each[3] = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_each[3]);
|
1145 |
+
$mlw_each[3] = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_each[3]);
|
1146 |
+
$mlw_each[3] = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_each[3]);
|
1147 |
+
|
1148 |
+
|
1149 |
//Check to see if default
|
1150 |
if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
|
1151 |
{
|
1169 |
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1170 |
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1171 |
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1172 |
+
wp_mail($mlw_user_email, $mlw_each[3], $mlw_message, $mlw_headers);
|
1173 |
break;
|
1174 |
}
|
1175 |
else
|
1197 |
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1198 |
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1199 |
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1200 |
+
wp_mail($mlw_user_email, $mlw_each[3], $mlw_message, $mlw_headers);
|
1201 |
break;
|
1202 |
}
|
1203 |
|
1224 |
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1225 |
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1226 |
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1227 |
+
wp_mail($mlw_user_email, $mlw_each[3], $mlw_message, $mlw_headers);
|
1228 |
break;
|
1229 |
}
|
1230 |
}
|
includes/mlw_quiz_options.php
CHANGED
@@ -57,7 +57,7 @@ function mlw_generate_quiz_options()
|
|
57 |
{
|
58 |
$mlw_qmn_correct = 1;
|
59 |
}
|
60 |
-
$mlw_qmn_answer_each = array(htmlspecialchars(stripslashes($_POST["edit_answer_".$i]), ENT_QUOTES),
|
61 |
$mlw_qmn_new_answer_array[] = $mlw_qmn_answer_each;
|
62 |
}
|
63 |
$i++;
|
@@ -138,7 +138,7 @@ function mlw_generate_quiz_options()
|
|
138 |
{
|
139 |
$mlw_qmn_correct = 1;
|
140 |
}
|
141 |
-
$mlw_qmn_answer_each = array(htmlspecialchars(stripslashes($_POST["answer_".$i]), ENT_QUOTES),
|
142 |
$mlw_qmn_new_answer_array[] = $mlw_qmn_answer_each;
|
143 |
}
|
144 |
$i++;
|
@@ -376,15 +376,15 @@ function mlw_generate_quiz_options()
|
|
376 |
$mlw_qmn_email_array = @unserialize($mlw_qmn_user_email);
|
377 |
if (is_array($mlw_qmn_email_array))
|
378 |
{
|
379 |
-
$mlw_new_landing_array = array(0, 100, 'Enter Your Text Here');
|
380 |
array_unshift($mlw_qmn_email_array , $mlw_new_landing_array);
|
381 |
$mlw_qmn_email_array = serialize($mlw_qmn_email_array);
|
382 |
|
383 |
}
|
384 |
else
|
385 |
{
|
386 |
-
$mlw_qmn_email_array = array(array(0, 0, $mlw_qmn_user_email));
|
387 |
-
$mlw_new_landing_array = array(0, 100, 'Enter Your Text Here');
|
388 |
array_unshift($mlw_qmn_email_array , $mlw_new_landing_array);
|
389 |
$mlw_qmn_email_array = serialize($mlw_qmn_email_array);
|
390 |
}
|
@@ -425,7 +425,7 @@ function mlw_generate_quiz_options()
|
|
425 |
{
|
426 |
if ($_POST["user_email_".$i] != "Delete")
|
427 |
{
|
428 |
-
$mlw_qmn_email_each = array(intval($_POST["user_email_begin_".$i]), intval($_POST["user_email_end_".$i]), htmlspecialchars(stripslashes($_POST["user_email_".$i]), ENT_QUOTES));
|
429 |
$mlw_qmn_new_email_array[] = $mlw_qmn_email_each;
|
430 |
}
|
431 |
$i++;
|
@@ -658,7 +658,7 @@ function mlw_generate_quiz_options()
|
|
658 |
$mlw_qmn_user_email_array = @unserialize($mlw_quiz_options->user_email_template);
|
659 |
if (!is_array($mlw_qmn_user_email_array)) {
|
660 |
// something went wrong, initialize to empty array
|
661 |
-
$mlw_qmn_user_email_array = array(array(0, 0, $mlw_quiz_options->user_email_template));
|
662 |
}
|
663 |
|
664 |
//Load Landing Pages
|
@@ -1192,6 +1192,7 @@ function mlw_generate_quiz_options()
|
|
1192 |
<option value="1" <?php if ($mlw_question_info->question_type == 1) { echo 'selected="selected"'; } ?>>Horizontal Multiple Choice (Horizontal Radio)</option>
|
1193 |
<option value="2" <?php if ($mlw_question_info->question_type == 2) { echo 'selected="selected"'; } ?>>Drop Down (Select)</option>
|
1194 |
<option value="3" <?php if ($mlw_question_info->question_type == 3) { echo 'selected="selected"'; } ?>>Open Answer (Text Input)</option>
|
|
|
1195 |
<option value="4" <?php if ($mlw_question_info->question_type == 4) { echo 'selected="selected"'; } ?>>Multiple Response (Checkbox)</option>
|
1196 |
</select>
|
1197 |
</div></td>
|
@@ -1331,6 +1332,7 @@ function mlw_generate_quiz_options()
|
|
1331 |
<option value="1">Horizontal Multiple Choice (Horizontal Radio)</option>
|
1332 |
<option value="2">Drop Down (Select)</option>
|
1333 |
<option value="3">Open Answer (Text Input)</option>
|
|
|
1334 |
<option value="4">Multiple Response (Checkbox)</option>
|
1335 |
</select>
|
1336 |
</div></td>
|
@@ -1670,7 +1672,7 @@ function mlw_generate_quiz_options()
|
|
1670 |
</div></td>
|
1671 |
</tr>
|
1672 |
<tr valign="top">
|
1673 |
-
<th scope="row"><label for="social_media">Show social media sharing buttons? (Twitter
|
1674 |
<td><div id="social_media">
|
1675 |
<input type="radio" id="social_media_radio2" name="social_media" <?php if ($mlw_quiz_options->social_media == 1) {echo 'checked="checked"';} ?> value='1' /><label for="social_media_radio2">Yes</label>
|
1676 |
<input type="radio" id="social_media_radio" name="social_media" <?php if ($mlw_quiz_options->social_media == 0) {echo 'checked="checked"';} ?> value='0' /><label for="social_media_radio">No</label>
|
@@ -1860,6 +1862,7 @@ function mlw_generate_quiz_options()
|
|
1860 |
<th>ID</th>
|
1861 |
<th>Score Greater Than</th>
|
1862 |
<th>Score Less Than</th>
|
|
|
1863 |
<th>Email To Send</th>
|
1864 |
</tr>
|
1865 |
</thead>
|
@@ -1872,6 +1875,10 @@ function mlw_generate_quiz_options()
|
|
1872 |
if($alternate) $alternate = "";
|
1873 |
else $alternate = " class=\"alternate\"";
|
1874 |
$mlw_each_count += 1;
|
|
|
|
|
|
|
|
|
1875 |
if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
|
1876 |
{
|
1877 |
echo "<tr{$alternate}>";
|
@@ -1884,6 +1891,9 @@ function mlw_generate_quiz_options()
|
|
1884 |
echo "<td>";
|
1885 |
echo "<input type='hidden' id='user_email_end_".$mlw_each_count."' name='user_email_end_".$mlw_each_count."' value='0'/>-";
|
1886 |
echo "</td>";
|
|
|
|
|
|
|
1887 |
echo "<td>";
|
1888 |
echo "<textarea cols='80' rows='15' id='user_email_".$mlw_each_count."' name='user_email_".$mlw_each_count."'>".$mlw_each[2]."</textarea>";
|
1889 |
echo "</td>";
|
@@ -1902,6 +1912,9 @@ function mlw_generate_quiz_options()
|
|
1902 |
echo "<td>";
|
1903 |
echo "<input type='text' id='user_email_end_".$mlw_each_count."' name='user_email_end_".$mlw_each_count."' title='What score must the user score worse than to see this page' value='".$mlw_each[1]."' />";
|
1904 |
echo "</td>";
|
|
|
|
|
|
|
1905 |
echo "<td>";
|
1906 |
echo "<textarea cols='80' rows='15' id='user_email_".$mlw_each_count."' title='What email will the user be sent' name='user_email_".$mlw_each_count."'>".$mlw_each[2]."</textarea>";
|
1907 |
echo "</td>";
|
@@ -1915,6 +1928,7 @@ function mlw_generate_quiz_options()
|
|
1915 |
<th>ID</th>
|
1916 |
<th>Score Greater Than</th>
|
1917 |
<th>Score Less Than</th>
|
|
|
1918 |
<th>Email To Send</th>
|
1919 |
</tr>
|
1920 |
</tfoot>
|
@@ -2182,7 +2196,7 @@ function mlw_generate_quiz_options()
|
|
2182 |
|
2183 |
<div id="dialog" title="Help" style="display:none;">
|
2184 |
<h3><b>Help</b></h3>
|
2185 |
-
<p>
|
2186 |
</div>
|
2187 |
|
2188 |
<div id="options_help_dialog" title="Help" style="display:none;">
|
57 |
{
|
58 |
$mlw_qmn_correct = 1;
|
59 |
}
|
60 |
+
$mlw_qmn_answer_each = array(htmlspecialchars(stripslashes($_POST["edit_answer_".$i]), ENT_QUOTES), floatval($_POST["edit_answer_".$i."_points"]), $mlw_qmn_correct);
|
61 |
$mlw_qmn_new_answer_array[] = $mlw_qmn_answer_each;
|
62 |
}
|
63 |
$i++;
|
138 |
{
|
139 |
$mlw_qmn_correct = 1;
|
140 |
}
|
141 |
+
$mlw_qmn_answer_each = array(htmlspecialchars(stripslashes($_POST["answer_".$i]), ENT_QUOTES), floatval($_POST["answer_".$i."_points"]), $mlw_qmn_correct);
|
142 |
$mlw_qmn_new_answer_array[] = $mlw_qmn_answer_each;
|
143 |
}
|
144 |
$i++;
|
376 |
$mlw_qmn_email_array = @unserialize($mlw_qmn_user_email);
|
377 |
if (is_array($mlw_qmn_email_array))
|
378 |
{
|
379 |
+
$mlw_new_landing_array = array(0, 100, 'Enter Your Text Here', 'Quiz Results For %QUIZ_NAME%');
|
380 |
array_unshift($mlw_qmn_email_array , $mlw_new_landing_array);
|
381 |
$mlw_qmn_email_array = serialize($mlw_qmn_email_array);
|
382 |
|
383 |
}
|
384 |
else
|
385 |
{
|
386 |
+
$mlw_qmn_email_array = array(array(0, 0, $mlw_qmn_user_email, 'Quiz Results For %QUIZ_NAME%'));
|
387 |
+
$mlw_new_landing_array = array(0, 100, 'Enter Your Text Here', 'Quiz Results For %QUIZ_NAME%');
|
388 |
array_unshift($mlw_qmn_email_array , $mlw_new_landing_array);
|
389 |
$mlw_qmn_email_array = serialize($mlw_qmn_email_array);
|
390 |
}
|
425 |
{
|
426 |
if ($_POST["user_email_".$i] != "Delete")
|
427 |
{
|
428 |
+
$mlw_qmn_email_each = array(intval($_POST["user_email_begin_".$i]), intval($_POST["user_email_end_".$i]), htmlspecialchars(stripslashes($_POST["user_email_".$i]), ENT_QUOTES), htmlspecialchars(stripslashes($_POST["user_email_subject_".$i]), ENT_QUOTES));
|
429 |
$mlw_qmn_new_email_array[] = $mlw_qmn_email_each;
|
430 |
}
|
431 |
$i++;
|
658 |
$mlw_qmn_user_email_array = @unserialize($mlw_quiz_options->user_email_template);
|
659 |
if (!is_array($mlw_qmn_user_email_array)) {
|
660 |
// something went wrong, initialize to empty array
|
661 |
+
$mlw_qmn_user_email_array = array(array(0, 0, $mlw_quiz_options->user_email_template, 'Quiz Results For %QUIZ_NAME%'));
|
662 |
}
|
663 |
|
664 |
//Load Landing Pages
|
1192 |
<option value="1" <?php if ($mlw_question_info->question_type == 1) { echo 'selected="selected"'; } ?>>Horizontal Multiple Choice (Horizontal Radio)</option>
|
1193 |
<option value="2" <?php if ($mlw_question_info->question_type == 2) { echo 'selected="selected"'; } ?>>Drop Down (Select)</option>
|
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>
|
1332 |
<option value="1">Horizontal Multiple Choice (Horizontal Radio)</option>
|
1333 |
<option value="2">Drop Down (Select)</option>
|
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>
|
1672 |
</div></td>
|
1673 |
</tr>
|
1674 |
<tr valign="top">
|
1675 |
+
<th scope="row"><label for="social_media">Show social media sharing buttons? (Twitter & Facebook)</label></th>
|
1676 |
<td><div id="social_media">
|
1677 |
<input type="radio" id="social_media_radio2" name="social_media" <?php if ($mlw_quiz_options->social_media == 1) {echo 'checked="checked"';} ?> value='1' /><label for="social_media_radio2">Yes</label>
|
1678 |
<input type="radio" id="social_media_radio" name="social_media" <?php if ($mlw_quiz_options->social_media == 0) {echo 'checked="checked"';} ?> value='0' /><label for="social_media_radio">No</label>
|
1862 |
<th>ID</th>
|
1863 |
<th>Score Greater Than</th>
|
1864 |
<th>Score Less Than</th>
|
1865 |
+
<th>Subject</th>
|
1866 |
<th>Email To Send</th>
|
1867 |
</tr>
|
1868 |
</thead>
|
1875 |
if($alternate) $alternate = "";
|
1876 |
else $alternate = " class=\"alternate\"";
|
1877 |
$mlw_each_count += 1;
|
1878 |
+
if (!isset($mlw_each[3]))
|
1879 |
+
{
|
1880 |
+
$mlw_each[3] = "Quiz Results For %QUIZ_NAME%";
|
1881 |
+
}
|
1882 |
if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
|
1883 |
{
|
1884 |
echo "<tr{$alternate}>";
|
1891 |
echo "<td>";
|
1892 |
echo "<input type='hidden' id='user_email_end_".$mlw_each_count."' name='user_email_end_".$mlw_each_count."' value='0'/>-";
|
1893 |
echo "</td>";
|
1894 |
+
echo "<td>";
|
1895 |
+
echo "<input type='text' id='user_email_subject_".$mlw_each_count."' name='user_email_subject_".$mlw_each_count."' value='".$mlw_each[3]."' />";
|
1896 |
+
echo "</td>";
|
1897 |
echo "<td>";
|
1898 |
echo "<textarea cols='80' rows='15' id='user_email_".$mlw_each_count."' name='user_email_".$mlw_each_count."'>".$mlw_each[2]."</textarea>";
|
1899 |
echo "</td>";
|
1912 |
echo "<td>";
|
1913 |
echo "<input type='text' id='user_email_end_".$mlw_each_count."' name='user_email_end_".$mlw_each_count."' title='What score must the user score worse than to see this page' value='".$mlw_each[1]."' />";
|
1914 |
echo "</td>";
|
1915 |
+
echo "<td>";
|
1916 |
+
echo "<input type='text' id='user_email_subject_".$mlw_each_count."' name='user_email_subject_".$mlw_each_count."' value='".$mlw_each[3]."' />";
|
1917 |
+
echo "</td>";
|
1918 |
echo "<td>";
|
1919 |
echo "<textarea cols='80' rows='15' id='user_email_".$mlw_each_count."' title='What email will the user be sent' name='user_email_".$mlw_each_count."'>".$mlw_each[2]."</textarea>";
|
1920 |
echo "</td>";
|
1928 |
<th>ID</th>
|
1929 |
<th>Score Greater Than</th>
|
1930 |
<th>Score Less Than</th>
|
1931 |
+
<th>Subject</th>
|
1932 |
<th>Email To Send</th>
|
1933 |
</tr>
|
1934 |
</tfoot>
|
2196 |
|
2197 |
<div id="dialog" title="Help" style="display:none;">
|
2198 |
<h3><b>Help</b></h3>
|
2199 |
+
<p>Having trouble using this page? Be sure to check out our useful <a href='http://mylocalwebstop.com/plugin-documentation/' target="_blank" style="color:blue;">Plugin Documentation</a>!</p>
|
2200 |
</div>
|
2201 |
|
2202 |
<div id="options_help_dialog" title="Help" style="display:none;">
|
includes/mlw_update.php
CHANGED
@@ -6,7 +6,7 @@ function mlw_quiz_update()
|
|
6 |
{
|
7 |
|
8 |
//Update this variable each update. This is what is checked when the plugin is deciding to run the upgrade script or not.
|
9 |
-
$data = "2.
|
10 |
if ( ! get_option('mlw_quiz_master_version'))
|
11 |
{
|
12 |
add_option('mlw_quiz_master_version' , $data);
|
6 |
{
|
7 |
|
8 |
//Update this variable each update. This is what is checked when the plugin is deciding to run the upgrade script or not.
|
9 |
+
$data = "2.9.1";
|
10 |
if ( ! get_option('mlw_quiz_master_version'))
|
11 |
{
|
12 |
add_option('mlw_quiz_master_version' , $data);
|
mlw_quizmaster2.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Quiz Master Next
|
5 |
Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
|
6 |
-
Version: 2.
|
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: 2.9.1
|
7 |
Author: Frank Corso
|
8 |
Author URI: http://www.mylocalwebstop.com/
|
9 |
Plugin URI: http://www.mylocalwebstop.com/
|
readme.txt
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
=== Quiz Master Next ===
|
2 |
Contributors: fpcorso
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RTGYAETX36ZQJ
|
4 |
-
Tags: quiz, test, score, survey, contact, form, email, answer, question
|
5 |
Requires at least: 3.7.1
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 2.
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
The easiest and most flexible way to add multiple quizzes, tests, and
|
15 |
|
16 |
= Have Unlimted Quizzes, Tests, Surveys, Contact Forms, etc.. =
|
17 |
Each of your quizzes can have **unlimited** questions and each of those questions can have **unlimited** answers! Your questions can contain **HTML** to show images, Youtube videos and more.
|
@@ -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.8.5 (August 9, 2014) =
|
108 |
* Minor Bug Fixes
|
109 |
* Minor Design Tweaks To About Page
|
@@ -475,6 +484,9 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
|
|
475 |
|
476 |
== Upgrade Notice ==
|
477 |
|
|
|
|
|
|
|
478 |
= 2.8.5 =
|
479 |
Upgrade for minor bug fixes.
|
480 |
|
1 |
=== Quiz Master Next ===
|
2 |
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.1
|
7 |
+
Stable tag: 2.9.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.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
The easiest and most flexible way to add multiple quizzes, tests, surveys, and contact forms to your website. This plugin allows for unlimited quizzes each with unlimited amount of questions. The plugin allows you to create the quiz, add it to any page using a customized shortcode, allows the user to take the quiz, and then saves the results. You can set up what the user sees after he or she takes the quiz based on the user's score. You can also have the plugin create a certificate for the user as well!
|
15 |
|
16 |
= Have Unlimted Quizzes, Tests, Surveys, Contact Forms, etc.. =
|
17 |
Each of your quizzes can have **unlimited** questions and each of those questions can have **unlimited** answers! Your questions can contain **HTML** to show images, Youtube videos and more.
|
104 |
|
105 |
== Changelog ==
|
106 |
|
107 |
+
= 2.9.1 (August 11, 2014) =
|
108 |
+
* Added Facebook Sharing
|
109 |
+
* Added Ability To Edit Email Subject
|
110 |
+
* Added Large Open Answer Question Type
|
111 |
+
* Added Ability For Points To Have Decimal Values
|
112 |
+
* Fixed Not All Questions Showing In Results Bug
|
113 |
+
* Fixed Not Valid Email On Non-Required Email Bug
|
114 |
+
* Fixed Special Character Not Grading Properly In Open Answer Bug
|
115 |
+
|
116 |
= 2.8.5 (August 9, 2014) =
|
117 |
* Minor Bug Fixes
|
118 |
* Minor Design Tweaks To About Page
|
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 |
+
|
490 |
= 2.8.5 =
|
491 |
Upgrade for minor bug fixes.
|
492 |
|