Version Description
Upgrade for minor bug fixes.
Download this release
Release Info
Developer | fpcorso |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 3.3.3 |
Comparing to | |
See all releases |
Code changes from version 3.3.2 to 3.3.3
- README.md +4 -0
- includes/mlw_qmn_credits.php +148 -146
- includes/mlw_quiz.php +1568 -1569
- mlw_quizmaster2.php +192 -189
- readme.txt +716 -708
README.md
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
quiz_master_next
|
2 |
+
================
|
3 |
+
|
4 |
+
Attempting to use github for my plugin
|
includes/mlw_qmn_credits.php
CHANGED
@@ -1,147 +1,149 @@
|
|
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 3.3</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;">Duplicate Questions With Quizzes</h2>
|
100 |
-
<p style="text-align: center;">You can now duplicate your questions with your quizzes when duplicating!</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;">You can now use the new Horizontal Multiple Response type to have your multiple reponse check boxes go horizontally instead of vertically.</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;">Our Premium Add-Ons!</h2>
|
106 |
-
<p style="text-align: center;">We have several new premium add-ons in our WordPress Store: MailPoet Integration (subscribes users to your MailPoet list), 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>
|
107 |
-
</div>
|
108 |
-
<div id="mlw_quiz_changelog" style="display: none;">
|
109 |
-
<h3><?php echo $mlw_quiz_version; ?> (
|
110 |
-
<ul>
|
111 |
-
<li>* Minor
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
<
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
<li>
|
124 |
-
<li>
|
125 |
-
<li>
|
126 |
-
<li>
|
127 |
-
<li>
|
128 |
-
<li>
|
129 |
-
<li>
|
130 |
-
<li>
|
131 |
-
<li>
|
132 |
-
<li>
|
133 |
-
<li>
|
134 |
-
<li>
|
135 |
-
<li>
|
136 |
-
<li>
|
137 |
-
<li>
|
138 |
-
<li>
|
139 |
-
<li>
|
140 |
-
<li>
|
141 |
-
<li>
|
142 |
-
|
143 |
-
|
144 |
-
</
|
145 |
-
|
146 |
-
|
|
|
|
|
147 |
?>
|
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 3.3</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;">Duplicate Questions With Quizzes</h2>
|
100 |
+
<p style="text-align: center;">You can now duplicate your questions with your quizzes when duplicating!</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;">You can now use the new Horizontal Multiple Response type to have your multiple reponse check boxes go horizontally instead of vertically.</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;">Our Premium Add-Ons!</h2>
|
106 |
+
<p style="text-align: center;">We have several new premium add-ons in our WordPress Store: MailPoet Integration (subscribes users to your MailPoet list), 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>
|
107 |
+
</div>
|
108 |
+
<div id="mlw_quiz_changelog" style="display: none;">
|
109 |
+
<h3><?php echo $mlw_quiz_version; ?> (November 14, 2014)</h3>
|
110 |
+
<ul>
|
111 |
+
<li>* Minor Backend Change To Quiz Validation</li>
|
112 |
+
<li>* Disabled Enter Key On Quiz</li>
|
113 |
+
<li>* Minor Bug Fixes</li>
|
114 |
+
</ul>
|
115 |
+
</div>
|
116 |
+
<div id="mlw_quiz_requested" style="display: none;">
|
117 |
+
<h3>Requested Features For Future Updates By Premium Support Users</h3>
|
118 |
+
<ul>
|
119 |
+
<li>None</li>
|
120 |
+
</ul>
|
121 |
+
<h3>Requested Features For Future Updates By Non-Premium Support Users</h3>
|
122 |
+
<ul>
|
123 |
+
<li>Importing Questions</li>
|
124 |
+
<li>Stats For Each Quiz</li>
|
125 |
+
<li>Force Login/Register Option</li>
|
126 |
+
<li>Categories</li>
|
127 |
+
<li>More Social Media Integration</li>
|
128 |
+
<li>Show Question Amount On Pagination</li>
|
129 |
+
<li>Required Questions</li>
|
130 |
+
<li>Allow Quiz To Not Show Start Page</li>
|
131 |
+
<li>Progress Bar For Timer</li>
|
132 |
+
<li>Ability To Redirect User Instead Of Showing Results Page</li>
|
133 |
+
<li>Multi-Delete Option For Quiz Results</li>
|
134 |
+
<li>Spam Prevention</li>
|
135 |
+
<li>Graphical Click Aware Questions</li>
|
136 |
+
<li>Results Bar Graph For Users Taking Polls</li>
|
137 |
+
<li>Head To Head Comparison Questions</li>
|
138 |
+
<li>Enhanced Leaderboard</li>
|
139 |
+
<li>Different Social Media Sharing Text For Different Social Media</li>
|
140 |
+
<li>Ability To Highlight Incorrect Answers</li>
|
141 |
+
<li>Set Default Question Type</li>
|
142 |
+
<li>Show Pop-Up When Clicking Submit</li>
|
143 |
+
<li>Conditional Continuation To Next Quiz</li>
|
144 |
+
</ul>
|
145 |
+
</div>
|
146 |
+
</div>
|
147 |
+
<?php
|
148 |
+
}
|
149 |
?>
|
includes/mlw_quiz.php
CHANGED
@@ -1,1570 +1,1569 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
This function is the very heart of the plugin. This function displays the quiz to the user as well as handles all the scripts that are part of the quiz. Please be very careful if you are editing this script without my assistance.
|
4 |
-
*/
|
5 |
-
function mlw_quiz_shortcode($atts)
|
6 |
-
{
|
7 |
-
extract(shortcode_atts(array(
|
8 |
-
'quiz' => 0
|
9 |
-
), $atts));
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
/*
|
14 |
-
Code before loading the quiz
|
15 |
-
*/
|
16 |
-
|
17 |
-
//Variables needed throughout script
|
18 |
-
$mlw_quiz_id = intval($quiz);
|
19 |
-
$GLOBALS['mlw_qmn_quiz'] = $mlw_quiz_id;
|
20 |
-
$mlw_display = "";
|
21 |
-
global $wpdb;
|
22 |
-
$mlw_qmn_isAllowed = true;
|
23 |
-
$mlw_qmn_section_count = 1;
|
24 |
-
$mlw_qmn_section_limit = 0;
|
25 |
-
|
26 |
-
|
27 |
-
//Load quiz
|
28 |
-
$sql = "SELECT * FROM " . $wpdb->prefix . "mlw_quizzes" . " WHERE quiz_id=".$mlw_quiz_id." AND deleted='0'";
|
29 |
-
$mlw_quiz_options = $wpdb->get_results($sql);
|
30 |
-
|
31 |
-
foreach($mlw_quiz_options as $mlw_eaches) {
|
32 |
-
$mlw_quiz_options = $mlw_eaches;
|
33 |
-
break;
|
34 |
-
}
|
35 |
-
|
36 |
-
//Check to see if there is limit on the amount of tries
|
37 |
-
if ( $mlw_quiz_options->total_user_tries != 0 && is_user_logged_in() )
|
38 |
-
{
|
39 |
-
$current_user = wp_get_current_user();
|
40 |
-
$mlw_qmn_user_try_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM ".$wpdb->prefix."mlw_results WHERE email='%s' AND deleted='0' AND quiz_id=%d", $current_user->user_email, $mlw_quiz_id ) );
|
41 |
-
if ($mlw_qmn_user_try_count >= $mlw_quiz_options->total_user_tries) { $mlw_qmn_isAllowed = false; }
|
42 |
-
}
|
43 |
-
|
44 |
-
|
45 |
-
//Load questions
|
46 |
-
$sql = "SELECT * FROM " . $wpdb->prefix . "mlw_questions" . " WHERE quiz_id=".$mlw_quiz_id." AND deleted='0' ";
|
47 |
-
if ($mlw_quiz_options->randomness_order == 0)
|
48 |
-
{
|
49 |
-
$sql .= "ORDER BY question_order ASC";
|
50 |
-
}
|
51 |
-
if ($mlw_quiz_options->randomness_order == 1 || $mlw_quiz_options->randomness_order == 2)
|
52 |
-
{
|
53 |
-
$sql .= "ORDER BY rand()";
|
54 |
-
}
|
55 |
-
if ($mlw_quiz_options->question_from_total != 0)
|
56 |
-
{
|
57 |
-
$sql .= " LIMIT ".$mlw_quiz_options->question_from_total;
|
58 |
-
}
|
59 |
-
$mlw_questions = $wpdb->get_results($sql);
|
60 |
-
|
61 |
-
|
62 |
-
//Load and prepare answer arrays
|
63 |
-
$mlw_qmn_answer_arrays = array();
|
64 |
-
foreach($mlw_questions as $mlw_question_info) {
|
65 |
-
$mlw_qmn_answer_array_each = @unserialize($mlw_question_info->answer_array);
|
66 |
-
if ( !is_array($mlw_qmn_answer_array_each) )
|
67 |
-
{
|
68 |
-
$mlw_answer_array_correct = array(0, 0, 0, 0, 0, 0);
|
69 |
-
$mlw_answer_array_correct[$mlw_question_info->correct_answer-1] = 1;
|
70 |
-
$mlw_qmn_answer_arrays[$mlw_question_info->question_id] = array(
|
71 |
-
array($mlw_question_info->answer_one, $mlw_question_info->answer_one_points, $mlw_answer_array_correct[0]),
|
72 |
-
array($mlw_question_info->answer_two, $mlw_question_info->answer_two_points, $mlw_answer_array_correct[1]),
|
73 |
-
array($mlw_question_info->answer_three, $mlw_question_info->answer_three_points, $mlw_answer_array_correct[2]),
|
74 |
-
array($mlw_question_info->answer_four, $mlw_question_info->answer_four_points, $mlw_answer_array_correct[3]),
|
75 |
-
array($mlw_question_info->answer_five, $mlw_question_info->answer_five_points, $mlw_answer_array_correct[4]),
|
76 |
-
array($mlw_question_info->answer_six, $mlw_question_info->answer_six_points, $mlw_answer_array_correct[5]));
|
77 |
-
}
|
78 |
-
else
|
79 |
-
{
|
80 |
-
$mlw_qmn_answer_arrays[$mlw_question_info->question_id] = $mlw_qmn_answer_array_each;
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
//Variables to load if quiz has been taken
|
86 |
-
if (isset($_POST["complete_quiz"]) && $_POST["complete_quiz"] == "confirmation")
|
87 |
-
{
|
88 |
-
$mlw_success = $_POST["complete_quiz"];
|
89 |
-
$mlw_user_name = isset($_POST["mlwUserName"]) ? $_POST["mlwUserName"] : 'None';
|
90 |
-
$mlw_user_comp = isset($_POST["mlwUserComp"]) ? $_POST["mlwUserComp"] : 'None';
|
91 |
-
$mlw_user_email = isset($_POST["mlwUserEmail"]) ? $_POST["mlwUserEmail"] : 'None';
|
92 |
-
$mlw_user_phone = isset($_POST["mlwUserPhone"]) ? $_POST["mlwUserPhone"] : 'None';
|
93 |
-
$mlw_qmn_timer = isset($_POST["timer"]) ? $_POST["timer"] : 0;
|
94 |
-
$mlw_spam_email = $_POST["email"];
|
95 |
-
}
|
96 |
-
|
97 |
-
wp_enqueue_script( 'json2' );
|
98 |
-
wp_enqueue_script( 'jquery' );
|
99 |
-
wp_enqueue_script( 'jquery-ui-core' );
|
100 |
-
wp_enqueue_script( 'jquery-effects-core' );
|
101 |
-
wp_enqueue_script( 'jquery-effects-slide' );
|
102 |
-
wp_enqueue_script( 'jquery-ui-dialog' );
|
103 |
-
wp_enqueue_script( 'jquery-ui-button' );
|
104 |
-
wp_enqueue_script( 'jquery-ui-accordion' );
|
105 |
-
wp_enqueue_script( 'jquery-ui-tooltip' );
|
106 |
-
wp_enqueue_script( 'jquery-ui-tabs' );
|
107 |
-
?>
|
108 |
-
<!-- css -->
|
109 |
-
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" />
|
110 |
-
<script type="text/javascript">
|
111 |
-
setTimeout(function(){
|
112 |
-
var $j = jQuery.noConflict();
|
113 |
-
// increase the default animation speed to exaggerate the effect
|
114 |
-
$j.fx.speeds._default = 1000;
|
115 |
-
$j(function() {
|
116 |
-
$j( ".mlw_qmn_quiz" ).tooltip();
|
117 |
-
});
|
118 |
-
}, 100);
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
//
|
157 |
-
if (
|
158 |
-
{
|
159 |
-
$
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
window.
|
293 |
-
|
294 |
-
|
295 |
-
}
|
296 |
-
|
297 |
-
{
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
{
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
jQuery('
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
{
|
535 |
-
if ($
|
536 |
-
{
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
{
|
542 |
-
$
|
543 |
-
$
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
}
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
$
|
564 |
-
}
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
{
|
609 |
-
$
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
$
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
if ($mlw_question->
|
657 |
-
{
|
658 |
-
$mlw_display .= "<
|
659 |
-
}
|
660 |
-
if ($mlw_question->
|
661 |
-
{
|
662 |
-
$mlw_display .= "<
|
663 |
-
}
|
664 |
-
if ($mlw_question->
|
665 |
-
{
|
666 |
-
$mlw_display .= "<
|
667 |
-
}
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
$mlw_display .= "
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
$mlw_display .= "<
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
$mlw_display .= "<
|
748 |
-
$
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
$mlw_display .= "<
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
$mlw_display .= "</
|
763 |
-
$mlw_display .= "<
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
$mlw_display .= "<
|
768 |
-
$mlw_display .= "<
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
}
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
$
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
$
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
$
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
$
|
1040 |
-
$
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
$
|
1045 |
-
$
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
$
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
$
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
$
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
$
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
$
|
1211 |
-
$
|
1212 |
-
$
|
1213 |
-
$
|
1214 |
-
$
|
1215 |
-
$
|
1216 |
-
$
|
1217 |
-
$
|
1218 |
-
$mlw_display .=
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
$
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
$mlw_message =
|
1336 |
-
$mlw_message = str_replace( "%
|
1337 |
-
$mlw_message = str_replace( "
|
1338 |
-
$mlw_message = str_replace( "
|
1339 |
-
$mlw_message = str_replace( "
|
1340 |
-
$
|
1341 |
-
$
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
$
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
if ($mlw_quiz_options->
|
1494 |
-
{
|
1495 |
-
$
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
$mlw_contact_display .= "<
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
if
|
1514 |
-
|
1515 |
-
|
1516 |
-
$
|
1517 |
-
$
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->
|
1522 |
-
$mlw_contact_display .= "<input type='text' x-webkit-speech name='
|
1523 |
-
$mlw_contact_display .= "<br /><br />";
|
1524 |
-
}
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
$
|
1539 |
-
$
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->
|
1544 |
-
$mlw_contact_display .= "<input type='text' x-webkit-speech name='
|
1545 |
-
$mlw_contact_display .= "<br /><br />";
|
1546 |
-
}
|
1547 |
-
if ($mlw_quiz_options->
|
1548 |
-
{
|
1549 |
-
$
|
1550 |
-
$
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
$mlw_contact_display .= "<
|
1556 |
-
$mlw_contact_display .= "<
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
}
|
1570 |
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
This function is the very heart of the plugin. This function displays the quiz to the user as well as handles all the scripts that are part of the quiz. Please be very careful if you are editing this script without my assistance.
|
4 |
+
*/
|
5 |
+
function mlw_quiz_shortcode($atts)
|
6 |
+
{
|
7 |
+
extract(shortcode_atts(array(
|
8 |
+
'quiz' => 0
|
9 |
+
), $atts));
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
/*
|
14 |
+
Code before loading the quiz
|
15 |
+
*/
|
16 |
+
|
17 |
+
//Variables needed throughout script
|
18 |
+
$mlw_quiz_id = intval($quiz);
|
19 |
+
$GLOBALS['mlw_qmn_quiz'] = $mlw_quiz_id;
|
20 |
+
$mlw_display = "";
|
21 |
+
global $wpdb;
|
22 |
+
$mlw_qmn_isAllowed = true;
|
23 |
+
$mlw_qmn_section_count = 1;
|
24 |
+
$mlw_qmn_section_limit = 0;
|
25 |
+
|
26 |
+
|
27 |
+
//Load quiz
|
28 |
+
$sql = "SELECT * FROM " . $wpdb->prefix . "mlw_quizzes" . " WHERE quiz_id=".$mlw_quiz_id." AND deleted='0'";
|
29 |
+
$mlw_quiz_options = $wpdb->get_results($sql);
|
30 |
+
|
31 |
+
foreach($mlw_quiz_options as $mlw_eaches) {
|
32 |
+
$mlw_quiz_options = $mlw_eaches;
|
33 |
+
break;
|
34 |
+
}
|
35 |
+
|
36 |
+
//Check to see if there is limit on the amount of tries
|
37 |
+
if ( $mlw_quiz_options->total_user_tries != 0 && is_user_logged_in() )
|
38 |
+
{
|
39 |
+
$current_user = wp_get_current_user();
|
40 |
+
$mlw_qmn_user_try_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM ".$wpdb->prefix."mlw_results WHERE email='%s' AND deleted='0' AND quiz_id=%d", $current_user->user_email, $mlw_quiz_id ) );
|
41 |
+
if ($mlw_qmn_user_try_count >= $mlw_quiz_options->total_user_tries) { $mlw_qmn_isAllowed = false; }
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
//Load questions
|
46 |
+
$sql = "SELECT * FROM " . $wpdb->prefix . "mlw_questions" . " WHERE quiz_id=".$mlw_quiz_id." AND deleted='0' ";
|
47 |
+
if ($mlw_quiz_options->randomness_order == 0)
|
48 |
+
{
|
49 |
+
$sql .= "ORDER BY question_order ASC";
|
50 |
+
}
|
51 |
+
if ($mlw_quiz_options->randomness_order == 1 || $mlw_quiz_options->randomness_order == 2)
|
52 |
+
{
|
53 |
+
$sql .= "ORDER BY rand()";
|
54 |
+
}
|
55 |
+
if ($mlw_quiz_options->question_from_total != 0)
|
56 |
+
{
|
57 |
+
$sql .= " LIMIT ".$mlw_quiz_options->question_from_total;
|
58 |
+
}
|
59 |
+
$mlw_questions = $wpdb->get_results($sql);
|
60 |
+
|
61 |
+
|
62 |
+
//Load and prepare answer arrays
|
63 |
+
$mlw_qmn_answer_arrays = array();
|
64 |
+
foreach($mlw_questions as $mlw_question_info) {
|
65 |
+
$mlw_qmn_answer_array_each = @unserialize($mlw_question_info->answer_array);
|
66 |
+
if ( !is_array($mlw_qmn_answer_array_each) )
|
67 |
+
{
|
68 |
+
$mlw_answer_array_correct = array(0, 0, 0, 0, 0, 0);
|
69 |
+
$mlw_answer_array_correct[$mlw_question_info->correct_answer-1] = 1;
|
70 |
+
$mlw_qmn_answer_arrays[$mlw_question_info->question_id] = array(
|
71 |
+
array($mlw_question_info->answer_one, $mlw_question_info->answer_one_points, $mlw_answer_array_correct[0]),
|
72 |
+
array($mlw_question_info->answer_two, $mlw_question_info->answer_two_points, $mlw_answer_array_correct[1]),
|
73 |
+
array($mlw_question_info->answer_three, $mlw_question_info->answer_three_points, $mlw_answer_array_correct[2]),
|
74 |
+
array($mlw_question_info->answer_four, $mlw_question_info->answer_four_points, $mlw_answer_array_correct[3]),
|
75 |
+
array($mlw_question_info->answer_five, $mlw_question_info->answer_five_points, $mlw_answer_array_correct[4]),
|
76 |
+
array($mlw_question_info->answer_six, $mlw_question_info->answer_six_points, $mlw_answer_array_correct[5]));
|
77 |
+
}
|
78 |
+
else
|
79 |
+
{
|
80 |
+
$mlw_qmn_answer_arrays[$mlw_question_info->question_id] = $mlw_qmn_answer_array_each;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
//Variables to load if quiz has been taken
|
86 |
+
if (isset($_POST["complete_quiz"]) && $_POST["complete_quiz"] == "confirmation")
|
87 |
+
{
|
88 |
+
$mlw_success = $_POST["complete_quiz"];
|
89 |
+
$mlw_user_name = isset($_POST["mlwUserName"]) ? $_POST["mlwUserName"] : 'None';
|
90 |
+
$mlw_user_comp = isset($_POST["mlwUserComp"]) ? $_POST["mlwUserComp"] : 'None';
|
91 |
+
$mlw_user_email = isset($_POST["mlwUserEmail"]) ? $_POST["mlwUserEmail"] : 'None';
|
92 |
+
$mlw_user_phone = isset($_POST["mlwUserPhone"]) ? $_POST["mlwUserPhone"] : 'None';
|
93 |
+
$mlw_qmn_timer = isset($_POST["timer"]) ? $_POST["timer"] : 0;
|
94 |
+
$mlw_spam_email = $_POST["email"];
|
95 |
+
}
|
96 |
+
|
97 |
+
wp_enqueue_script( 'json2' );
|
98 |
+
wp_enqueue_script( 'jquery' );
|
99 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
100 |
+
wp_enqueue_script( 'jquery-effects-core' );
|
101 |
+
wp_enqueue_script( 'jquery-effects-slide' );
|
102 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
103 |
+
wp_enqueue_script( 'jquery-ui-button' );
|
104 |
+
wp_enqueue_script( 'jquery-ui-accordion' );
|
105 |
+
wp_enqueue_script( 'jquery-ui-tooltip' );
|
106 |
+
wp_enqueue_script( 'jquery-ui-tabs' );
|
107 |
+
?>
|
108 |
+
<!-- css -->
|
109 |
+
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" />
|
110 |
+
<script type="text/javascript">
|
111 |
+
setTimeout(function(){
|
112 |
+
var $j = jQuery.noConflict();
|
113 |
+
// increase the default animation speed to exaggerate the effect
|
114 |
+
$j.fx.speeds._default = 1000;
|
115 |
+
$j(function() {
|
116 |
+
$j( ".mlw_qmn_quiz" ).tooltip();
|
117 |
+
});
|
118 |
+
}, 100);
|
119 |
+
setTimeout(function()
|
120 |
+
{
|
121 |
+
var $j = jQuery.noConflict();
|
122 |
+
$j('.mlw_qmn_quiz input').on('keypress', function (e) {
|
123 |
+
if (e.which === 13) {
|
124 |
+
e.preventDefault();
|
125 |
+
}
|
126 |
+
});
|
127 |
+
}, 100);
|
128 |
+
</script>
|
129 |
+
<style type="text/css">
|
130 |
+
.ui-tooltip
|
131 |
+
{
|
132 |
+
/* tooltip container box */
|
133 |
+
max-width: 500px !important;
|
134 |
+
}
|
135 |
+
.ui-tooltip-content
|
136 |
+
{
|
137 |
+
/* tooltip content */
|
138 |
+
max-width: 500px !important;
|
139 |
+
}
|
140 |
+
</style>
|
141 |
+
|
142 |
+
<?php
|
143 |
+
if ($mlw_quiz_options->theme_selected == "default")
|
144 |
+
{
|
145 |
+
echo "<style type='text/css'>".$mlw_quiz_options->quiz_stye."</style>";
|
146 |
+
}
|
147 |
+
else
|
148 |
+
{
|
149 |
+
echo "<link type='text/css' href='".get_option('mlw_qmn_theme_'.$mlw_quiz_options->theme_selected)."' rel='stylesheet' />";
|
150 |
+
}
|
151 |
+
|
152 |
+
/*
|
153 |
+
The following code is for displaying the quiz and completion screen
|
154 |
+
*/
|
155 |
+
|
156 |
+
//If there is no quiz for the shortcode provided
|
157 |
+
if ($mlw_quiz_options->quiz_name == "")
|
158 |
+
{
|
159 |
+
$mlw_display .= "It appears that this quiz is not set up correctly.";
|
160 |
+
return $mlw_display;
|
161 |
+
}
|
162 |
+
|
163 |
+
|
164 |
+
|
165 |
+
//Display Quiz
|
166 |
+
if (!isset($_POST["complete_quiz"]) && $mlw_quiz_options->quiz_name != "" && $mlw_qmn_isAllowed)
|
167 |
+
{
|
168 |
+
$mlw_qmn_total_questions = 0;
|
169 |
+
//Calculate number of pages if pagination is turned on
|
170 |
+
if ($mlw_quiz_options->pagination != 0)
|
171 |
+
{
|
172 |
+
$mlw_qmn_section_limit = 2 + count($mlw_questions);
|
173 |
+
if ($mlw_quiz_options->comment_section == 0)
|
174 |
+
{
|
175 |
+
$mlw_qmn_section_limit = $mlw_qmn_section_limit + 1;
|
176 |
+
}
|
177 |
+
|
178 |
+
//Gather text for pagination buttons
|
179 |
+
$mlw_qmn_pagination_text = "";
|
180 |
+
$mlw_qmn_pagination_text = @unserialize($mlw_quiz_options->pagination_text);
|
181 |
+
if (!is_array($mlw_qmn_pagination_text)) {
|
182 |
+
$mlw_qmn_pagination_text = array('Previous', $mlw_quiz_options->pagination_text);
|
183 |
+
}
|
184 |
+
?>
|
185 |
+
<script type="text/javascript">
|
186 |
+
setTimeout(function(){
|
187 |
+
var $j = jQuery.noConflict();
|
188 |
+
$j( ".quiz_section" ).hide();
|
189 |
+
$j( ".quiz_section" ).append( "<br />" );
|
190 |
+
$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>" );
|
191 |
+
$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>" );
|
192 |
+
window.mlw_quiz_slide = 0;
|
193 |
+
window.mlw_previous = 0;
|
194 |
+
window.mlw_quiz_total_slides = <?php echo $mlw_qmn_section_limit; ?>;
|
195 |
+
nextSlide(1, 0);
|
196 |
+
}, 100);
|
197 |
+
function nextSlide(mlw_pagination, mlw_goto_top)
|
198 |
+
{
|
199 |
+
jQuery( ".quiz_section" ).hide();
|
200 |
+
for (var i = 0; i < mlw_pagination; i++)
|
201 |
+
{
|
202 |
+
if (i == 0 && window.mlw_previous == 1 && window.mlw_quiz_slide > 1)
|
203 |
+
{
|
204 |
+
window.mlw_quiz_slide = window.mlw_quiz_slide + mlw_pagination;
|
205 |
+
}
|
206 |
+
else
|
207 |
+
{
|
208 |
+
window.mlw_quiz_slide++;
|
209 |
+
}
|
210 |
+
if (window.mlw_quiz_slide < 1)
|
211 |
+
{
|
212 |
+
window.mlw_quiz_slide = 1;
|
213 |
+
}
|
214 |
+
if (window.mlw_quiz_slide == 1)
|
215 |
+
{
|
216 |
+
jQuery( ".mlw_qmn_quiz_link.mlw_previous" ).hide();
|
217 |
+
}
|
218 |
+
if (window.mlw_quiz_slide > 1)
|
219 |
+
{
|
220 |
+
jQuery( ".mlw_qmn_quiz_link.mlw_previous" ).show();
|
221 |
+
}
|
222 |
+
if (window.mlw_quiz_slide == window.mlw_quiz_total_slides)
|
223 |
+
{
|
224 |
+
jQuery( ".mlw_qmn_quiz_link.mlw_next" ).hide();
|
225 |
+
}
|
226 |
+
if (window.mlw_quiz_slide < window.mlw_quiz_total_slides)
|
227 |
+
{
|
228 |
+
jQuery( ".mlw_qmn_quiz_link.mlw_next" ).show();
|
229 |
+
}
|
230 |
+
jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
|
231 |
+
}
|
232 |
+
window.mlw_previous = 0;
|
233 |
+
if (mlw_goto_top == 1)
|
234 |
+
{
|
235 |
+
window.location.hash = "mlw_does_not_exist";
|
236 |
+
window.location.hash = "mlw_top_of_quiz";
|
237 |
+
}
|
238 |
+
|
239 |
+
}
|
240 |
+
function prevSlide(mlw_pagination, mlw_goto_top)
|
241 |
+
{
|
242 |
+
jQuery( ".quiz_section" ).hide();
|
243 |
+
for (var i = 0; i < mlw_pagination; i++)
|
244 |
+
{
|
245 |
+
if (i == 0 && window.mlw_previous == 0)
|
246 |
+
{
|
247 |
+
window.mlw_quiz_slide = window.mlw_quiz_slide - mlw_pagination;
|
248 |
+
}
|
249 |
+
else
|
250 |
+
{
|
251 |
+
window.mlw_quiz_slide--;
|
252 |
+
}
|
253 |
+
if (window.mlw_quiz_slide < 1)
|
254 |
+
{
|
255 |
+
window.mlw_quiz_slide = 1;
|
256 |
+
}
|
257 |
+
if (window.mlw_quiz_slide == 1)
|
258 |
+
{
|
259 |
+
jQuery( ".mlw_qmn_quiz_link.mlw_previous" ).hide();
|
260 |
+
}
|
261 |
+
if (window.mlw_quiz_slide > 1)
|
262 |
+
{
|
263 |
+
jQuery( ".mlw_qmn_quiz_link.mlw_previous" ).show();
|
264 |
+
}
|
265 |
+
if (window.mlw_quiz_slide == window.mlw_quiz_total_slides)
|
266 |
+
{
|
267 |
+
jQuery( ".mlw_qmn_quiz_link.mlw_next" ).hide();
|
268 |
+
}
|
269 |
+
if (window.mlw_quiz_slide < window.mlw_quiz_total_slides)
|
270 |
+
{
|
271 |
+
jQuery( ".mlw_qmn_quiz_link.mlw_next" ).show();
|
272 |
+
}
|
273 |
+
jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
|
274 |
+
}
|
275 |
+
window.mlw_previous = 1;
|
276 |
+
if (mlw_goto_top == 1)
|
277 |
+
{
|
278 |
+
window.location.hash = "mlw_does_not_exist";
|
279 |
+
window.location.hash = "mlw_top_of_quiz";
|
280 |
+
}
|
281 |
+
}
|
282 |
+
</script>
|
283 |
+
<?php
|
284 |
+
}
|
285 |
+
if ($mlw_quiz_options->timer_limit != 0)
|
286 |
+
{
|
287 |
+
?>
|
288 |
+
<div id="mlw_qmn_timer" class="mlw_qmn_timer"></div>
|
289 |
+
<script type="text/javascript">
|
290 |
+
setTimeout(function(){
|
291 |
+
var minutes = 0;
|
292 |
+
if (window.sessionStorage.getItem('mlw_started_quiz<?php echo $mlw_quiz_id; ?>') == "yes" && window.sessionStorage.getItem('mlw_time_quiz<?php echo $mlw_quiz_id; ?>') >= 0)
|
293 |
+
{
|
294 |
+
minutes = window.sessionStorage.getItem('mlw_time_quiz<?php echo $mlw_quiz_id; ?>');
|
295 |
+
}
|
296 |
+
else
|
297 |
+
{
|
298 |
+
minutes = <?php echo $mlw_quiz_options->timer_limit; ?>;
|
299 |
+
}
|
300 |
+
window.amount = (minutes*60);
|
301 |
+
window.titleText = window.document.title;
|
302 |
+
document.getElementById("mlw_qmn_timer").innerHTML = minToSec(window.amount);
|
303 |
+
window.counter=setInterval(timer, 1000);
|
304 |
+
}, 100);
|
305 |
+
function timer()
|
306 |
+
{
|
307 |
+
window.amount=window.amount-1;
|
308 |
+
if (window.amount < 0)
|
309 |
+
{
|
310 |
+
window.amount = 0;
|
311 |
+
}
|
312 |
+
window.sessionStorage.setItem('mlw_time_quiz<?php echo $mlw_quiz_id; ?>', window.amount/60);
|
313 |
+
window.sessionStorage.setItem('mlw_started_quiz<?php echo $mlw_quiz_id; ?>', "yes");
|
314 |
+
document.getElementById("mlw_qmn_timer").innerHTML = minToSec(window.amount);
|
315 |
+
window.document.title = minToSec(window.amount) + " " + window.titleText;
|
316 |
+
if (window.amount <= 0)
|
317 |
+
{
|
318 |
+
clearInterval(window.counter);
|
319 |
+
jQuery( ".mlw_qmn_quiz input:radio" ).attr('disabled',true);
|
320 |
+
jQuery( ".mlw_qmn_quiz input:checkbox" ).attr('disabled',true);
|
321 |
+
jQuery( ".mlw_qmn_quiz select" ).attr('disabled',true);
|
322 |
+
jQuery( ".mlw_qmn_question_comment" ).attr('disabled',true);
|
323 |
+
jQuery( ".mlw_answer_open_text" ).attr('disabled',true);
|
324 |
+
//document.quizForm.submit();
|
325 |
+
return;
|
326 |
+
}
|
327 |
+
}
|
328 |
+
function minToSec(amount)
|
329 |
+
{
|
330 |
+
var minutes = Math.floor(amount/60);
|
331 |
+
var seconds = amount - (minutes * 60);
|
332 |
+
if (seconds == '0')
|
333 |
+
{
|
334 |
+
seconds = "00";
|
335 |
+
}
|
336 |
+
else if (seconds < 10)
|
337 |
+
{
|
338 |
+
seconds = '0' + seconds;
|
339 |
+
}
|
340 |
+
return minutes+":"+seconds;
|
341 |
+
}
|
342 |
+
</script>
|
343 |
+
<?php
|
344 |
+
}
|
345 |
+
|
346 |
+
?>
|
347 |
+
<script type="text/javascript">
|
348 |
+
var myVar=setInterval("mlwQmnTimer();",1000);
|
349 |
+
function mlwQmnTimer()
|
350 |
+
{
|
351 |
+
var x = +document.getElementById("timer").value;
|
352 |
+
x = x + 1;
|
353 |
+
document.getElementById("timer").value = x;
|
354 |
+
}
|
355 |
+
|
356 |
+
</script>
|
357 |
+
<?php
|
358 |
+
//Update the quiz views
|
359 |
+
$mlw_views = $mlw_quiz_options->quiz_views;
|
360 |
+
$mlw_views += 1;
|
361 |
+
$update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET quiz_views='".$mlw_views."' WHERE quiz_id=".$mlw_quiz_id;
|
362 |
+
$results = $wpdb->query( $update );
|
363 |
+
|
364 |
+
//Form validation script
|
365 |
+
?>
|
366 |
+
<script>
|
367 |
+
function clear_field(field)
|
368 |
+
{
|
369 |
+
if (field.defaultValue == field.value) field.value = '';
|
370 |
+
}
|
371 |
+
|
372 |
+
function mlw_validateForm()
|
373 |
+
{
|
374 |
+
mlw_validateResult = true;
|
375 |
+
if (document.forms['quizForm']['mlwUserEmail'].value != '')
|
376 |
+
{
|
377 |
+
var x=document.forms['quizForm']['mlwUserEmail'].value;
|
378 |
+
var atpos=x.indexOf('@');
|
379 |
+
var dotpos=x.lastIndexOf('.');
|
380 |
+
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
|
381 |
+
{
|
382 |
+
document.getElementById('mlw_error_message').innerHTML = '**Not a valid e-mail address!**';
|
383 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**Not a valid e-mail address!**';
|
384 |
+
mlw_validateResult = false;
|
385 |
+
}
|
386 |
+
}
|
387 |
+
|
388 |
+
jQuery('#quizForm *').filter(':input').each(function(){
|
389 |
+
jQuery(this).css("outline", "");
|
390 |
+
if (jQuery(this).attr('class'))
|
391 |
+
{
|
392 |
+
if(jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value == "" && +this.value != NaN)
|
393 |
+
{
|
394 |
+
document.getElementById('mlw_error_message').innerHTML = '**This field must be a number!**';
|
395 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**This field must be a number!**';
|
396 |
+
jQuery(this).css("outline", "2px solid red");
|
397 |
+
mlw_validateResult = false;
|
398 |
+
}
|
399 |
+
if(jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && this.value == "")
|
400 |
+
{
|
401 |
+
document.getElementById('mlw_error_message').innerHTML = '**Please complete all required fields!**';
|
402 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**Please complete all required fields!**';
|
403 |
+
jQuery(this).css("outline", "2px solid red");
|
404 |
+
mlw_validateResult = false;
|
405 |
+
}
|
406 |
+
if(jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code)
|
407 |
+
{
|
408 |
+
document.getElementById('mlw_error_message').innerHTML = '**The entered text is not correct!**';
|
409 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**The entered text is not correct!**';
|
410 |
+
jQuery(this).css("outline", "2px solid red");
|
411 |
+
mlw_validateResult = false;
|
412 |
+
}
|
413 |
+
if(jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1 && !this.checked)
|
414 |
+
{
|
415 |
+
document.getElementById('mlw_error_message').innerHTML = '**Please complete all required fields!**';
|
416 |
+
document.getElementById('mlw_error_message_bottom').innerHTML = '**Please complete all required fields!**';
|
417 |
+
jQuery(this).css("outline", "2px solid red");
|
418 |
+
mlw_validateResult = false;
|
419 |
+
}
|
420 |
+
}
|
421 |
+
});
|
422 |
+
|
423 |
+
if (!mlw_validateResult) {return mlw_validateResult;}
|
424 |
+
|
425 |
+
jQuery( '.mlw_qmn_quiz input:radio' ).attr('disabled',false);
|
426 |
+
jQuery( '.mlw_qmn_quiz input:checkbox' ).attr('disabled',false);
|
427 |
+
jQuery( '.mlw_qmn_quiz select' ).attr('disabled',false);
|
428 |
+
jQuery( '.mlw_qmn_question_comment' ).attr('disabled',false);
|
429 |
+
jQuery( '.mlw_answer_open_text' ).attr('disabled',false);
|
430 |
+
}
|
431 |
+
</script>
|
432 |
+
<?php
|
433 |
+
|
434 |
+
if ( $mlw_quiz_options->pagination != 0) { $mlw_display .= "<style>.quiz_section { display: none; }</style>"; }
|
435 |
+
|
436 |
+
//Begin the quiz
|
437 |
+
$mlw_display .= "<div class='mlw_qmn_quiz'>";
|
438 |
+
$mlw_display .= "<form name='quizForm' id='quizForm' action='' method='post' class='mlw_quiz_form' onsubmit='return mlw_validateForm()' novalidate >";
|
439 |
+
$mlw_display .= "<span id='mlw_top_of_quiz'></span>";
|
440 |
+
$mlw_display .= "<div class='quiz_section quiz_begin slide".$mlw_qmn_section_count."'>";
|
441 |
+
$mlw_message_before = htmlspecialchars_decode($mlw_quiz_options->message_before, ENT_QUOTES);
|
442 |
+
$mlw_message_before = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_before);
|
443 |
+
$mlw_message_before = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message_before);
|
444 |
+
$mlw_display .= "<span class='mlw_qmn_message_before'>".$mlw_message_before."</span><br />";
|
445 |
+
$mlw_display .= "<span name='mlw_error_message' id='mlw_error_message' style='color: red;'></span><br />";
|
446 |
+
|
447 |
+
if ($mlw_quiz_options->contact_info_location == 0)
|
448 |
+
{
|
449 |
+
$mlw_display .= mlwDisplayContactInfo($mlw_quiz_options);
|
450 |
+
}
|
451 |
+
$mlw_display .= "</div>";
|
452 |
+
|
453 |
+
//Display the questions
|
454 |
+
foreach($mlw_questions as $mlw_question) {
|
455 |
+
$mlw_question_settings = @unserialize($mlw_question->question_settings);
|
456 |
+
if (!is_array($mlw_question_settings))
|
457 |
+
{
|
458 |
+
$mlw_question_settings = array();
|
459 |
+
$mlw_question_settings['required'] = 1;
|
460 |
+
}
|
461 |
+
if ( !isset($mlw_question_settings['required']))
|
462 |
+
{
|
463 |
+
$mlw_question_settings['required'] = 1;
|
464 |
+
}
|
465 |
+
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
466 |
+
$mlw_display .= "<div class='quiz_section slide".$mlw_qmn_section_count."'>";
|
467 |
+
if ($mlw_question->question_type == 0)
|
468 |
+
{
|
469 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
470 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
471 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
472 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
473 |
+
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
474 |
+
if (is_array($mlw_qmn_answer_array))
|
475 |
+
{
|
476 |
+
if ($mlw_quiz_options->randomness_order == 2)
|
477 |
+
{
|
478 |
+
shuffle($mlw_qmn_answer_array);
|
479 |
+
}
|
480 |
+
$mlw_answer_total = 0;
|
481 |
+
foreach($mlw_qmn_answer_array as $mlw_qmn_answer_each)
|
482 |
+
{
|
483 |
+
$mlw_answer_total++;
|
484 |
+
if ($mlw_qmn_answer_each[0] != "")
|
485 |
+
{
|
486 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_".$mlw_answer_total."' value='".esc_attr($mlw_qmn_answer_each[0])."' /> <label for='question".$mlw_question->question_id."_".$mlw_answer_total."'>".htmlspecialchars_decode($mlw_qmn_answer_each[0], ENT_QUOTES)."</label>";
|
487 |
+
$mlw_display .= "<br />";
|
488 |
+
}
|
489 |
+
}
|
490 |
+
$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' />";
|
491 |
+
}
|
492 |
+
else
|
493 |
+
{
|
494 |
+
if ($mlw_question->answer_one != "")
|
495 |
+
{
|
496 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_one' value='1' /> <label for='question".$mlw_question->question_id."_one'>".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES)."</label>";
|
497 |
+
$mlw_display .= "<br />";
|
498 |
+
}
|
499 |
+
if ($mlw_question->answer_two != "")
|
500 |
+
{
|
501 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_two' value='2' /> <label for='question".$mlw_question->question_id."_two'>".htmlspecialchars_decode($mlw_question->answer_two, ENT_QUOTES)."</label>";
|
502 |
+
$mlw_display .= "<br />";
|
503 |
+
}
|
504 |
+
if ($mlw_question->answer_three != "")
|
505 |
+
{
|
506 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_three' value='3' /> <label for='question".$mlw_question->question_id."_three'>".htmlspecialchars_decode($mlw_question->answer_three, ENT_QUOTES)."</label>";
|
507 |
+
$mlw_display .= "<br />";
|
508 |
+
}
|
509 |
+
if ($mlw_question->answer_four != "")
|
510 |
+
{
|
511 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_four' value='4' /> <label for='question".$mlw_question->question_id."_four'>".htmlspecialchars_decode($mlw_question->answer_four, ENT_QUOTES)."</label>";
|
512 |
+
$mlw_display .= "<br />";
|
513 |
+
}
|
514 |
+
if ($mlw_question->answer_five != "")
|
515 |
+
{
|
516 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_five' value='5' /> <label for='question".$mlw_question->question_id."_five'>".htmlspecialchars_decode($mlw_question->answer_five, ENT_QUOTES)."</label>";
|
517 |
+
$mlw_display .= "<br />";
|
518 |
+
}
|
519 |
+
if ($mlw_question->answer_six != "")
|
520 |
+
{
|
521 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_six' value='6' /> <label for='question".$mlw_question->question_id."_six'>".htmlspecialchars_decode($mlw_question->answer_six, ENT_QUOTES)."</label>";
|
522 |
+
$mlw_display .= "<br />";
|
523 |
+
}
|
524 |
+
}
|
525 |
+
}
|
526 |
+
elseif ($mlw_question->question_type == 4)
|
527 |
+
{
|
528 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
529 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
530 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
531 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
532 |
+
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
533 |
+
if (is_array($mlw_qmn_answer_array))
|
534 |
+
{
|
535 |
+
if ($mlw_quiz_options->randomness_order == 2)
|
536 |
+
{
|
537 |
+
shuffle($mlw_qmn_answer_array);
|
538 |
+
}
|
539 |
+
$mlw_answer_total = 0;
|
540 |
+
foreach($mlw_qmn_answer_array as $mlw_qmn_answer_each)
|
541 |
+
{
|
542 |
+
$mlw_answer_total++;
|
543 |
+
if ($mlw_qmn_answer_each[0] != "")
|
544 |
+
{
|
545 |
+
$mlw_display .= "<input type='hidden' name='question".$mlw_question->question_id."' value='This value does not matter' />";
|
546 |
+
$mlw_display .= "<input type='checkbox' name='question".$mlw_question->question_id."_".$mlw_answer_total."' id='question".$mlw_question->question_id."_".$mlw_answer_total."' value='".esc_attr($mlw_qmn_answer_each[0])."' /> <label for='question".$mlw_question->question_id."_".$mlw_answer_total."'>".htmlspecialchars_decode($mlw_qmn_answer_each[0], ENT_QUOTES)."</label>";
|
547 |
+
$mlw_display .= "<br />";
|
548 |
+
}
|
549 |
+
}
|
550 |
+
}
|
551 |
+
}
|
552 |
+
elseif ($mlw_question->question_type == 10)
|
553 |
+
{
|
554 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
555 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
556 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
557 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
558 |
+
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
559 |
+
if (is_array($mlw_qmn_answer_array))
|
560 |
+
{
|
561 |
+
if ($mlw_quiz_options->randomness_order == 2)
|
562 |
+
{
|
563 |
+
shuffle($mlw_qmn_answer_array);
|
564 |
+
}
|
565 |
+
$mlw_answer_total = 0;
|
566 |
+
foreach($mlw_qmn_answer_array as $mlw_qmn_answer_each)
|
567 |
+
{
|
568 |
+
$mlw_answer_total++;
|
569 |
+
if ($mlw_qmn_answer_each[0] != "")
|
570 |
+
{
|
571 |
+
$mlw_display .= "<input type='hidden' name='question".$mlw_question->question_id."' value='This value does not matter' />";
|
572 |
+
$mlw_display .= "<span class='mlw_horizontal_multiple'><input type='checkbox' name='question".$mlw_question->question_id."_".$mlw_answer_total."' id='question".$mlw_question->question_id."_".$mlw_answer_total."' value='".esc_attr($mlw_qmn_answer_each[0])."' /> <label for='question".$mlw_question->question_id."_".$mlw_answer_total."'>".htmlspecialchars_decode($mlw_qmn_answer_each[0], ENT_QUOTES)." </label></span>";
|
573 |
+
}
|
574 |
+
}
|
575 |
+
}
|
576 |
+
}
|
577 |
+
elseif ($mlw_question->question_type == 1)
|
578 |
+
{
|
579 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
580 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
581 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
582 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
583 |
+
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
584 |
+
if (is_array($mlw_qmn_answer_array))
|
585 |
+
{
|
586 |
+
if ($mlw_quiz_options->randomness_order == 2)
|
587 |
+
{
|
588 |
+
shuffle($mlw_qmn_answer_array);
|
589 |
+
}
|
590 |
+
$mlw_answer_total = 0;
|
591 |
+
foreach($mlw_qmn_answer_array as $mlw_qmn_answer_each)
|
592 |
+
{
|
593 |
+
$mlw_answer_total++;
|
594 |
+
if ($mlw_qmn_answer_each[0] != "")
|
595 |
+
{
|
596 |
+
$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)." ";
|
597 |
+
}
|
598 |
+
}
|
599 |
+
$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' />";
|
600 |
+
}
|
601 |
+
else
|
602 |
+
{
|
603 |
+
if ($mlw_question->answer_one != "")
|
604 |
+
{
|
605 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='1' />".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES);
|
606 |
+
}
|
607 |
+
if ($mlw_question->answer_two != "")
|
608 |
+
{
|
609 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='2' />".htmlspecialchars_decode($mlw_question->answer_two, ENT_QUOTES);
|
610 |
+
}
|
611 |
+
if ($mlw_question->answer_three != "")
|
612 |
+
{
|
613 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='3' />".htmlspecialchars_decode($mlw_question->answer_three, ENT_QUOTES);
|
614 |
+
}
|
615 |
+
if ($mlw_question->answer_four != "")
|
616 |
+
{
|
617 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='4' />".htmlspecialchars_decode($mlw_question->answer_four, ENT_QUOTES);
|
618 |
+
}
|
619 |
+
if ($mlw_question->answer_five != "")
|
620 |
+
{
|
621 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='5' />".htmlspecialchars_decode($mlw_question->answer_five, ENT_QUOTES);
|
622 |
+
}
|
623 |
+
if ($mlw_question->answer_six != "")
|
624 |
+
{
|
625 |
+
$mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='6' />".htmlspecialchars_decode($mlw_question->answer_six, ENT_QUOTES);
|
626 |
+
}
|
627 |
+
}
|
628 |
+
$mlw_display .= "<br />";
|
629 |
+
}
|
630 |
+
elseif ($mlw_question->question_type == 2)
|
631 |
+
{
|
632 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
633 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
634 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
635 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
636 |
+
$mlw_display .= "<select name='question".$mlw_question->question_id."'>";
|
637 |
+
$mlw_qmn_answer_array = $mlw_qmn_answer_arrays[$mlw_question->question_id];
|
638 |
+
if (is_array($mlw_qmn_answer_array))
|
639 |
+
{
|
640 |
+
if ($mlw_quiz_options->randomness_order == 2)
|
641 |
+
{
|
642 |
+
shuffle($mlw_qmn_answer_array);
|
643 |
+
}
|
644 |
+
$mlw_answer_total = 0;
|
645 |
+
foreach($mlw_qmn_answer_array as $mlw_qmn_answer_each)
|
646 |
+
{
|
647 |
+
$mlw_answer_total++;
|
648 |
+
if ($mlw_qmn_answer_each[0] != "")
|
649 |
+
{
|
650 |
+
$mlw_display .= "<option value='".esc_attr($mlw_qmn_answer_each[0])."'>".htmlspecialchars_decode($mlw_qmn_answer_each[0], ENT_QUOTES)."</option>";
|
651 |
+
}
|
652 |
+
}
|
653 |
+
}
|
654 |
+
else
|
655 |
+
{
|
656 |
+
if ($mlw_question->answer_one != "")
|
657 |
+
{
|
658 |
+
$mlw_display .= "<option value='1'>".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES)."</option>";
|
659 |
+
}
|
660 |
+
if ($mlw_question->answer_two != "")
|
661 |
+
{
|
662 |
+
$mlw_display .= "<option value='2'>".htmlspecialchars_decode($mlw_question->answer_two, ENT_QUOTES)."</option>";
|
663 |
+
}
|
664 |
+
if ($mlw_question->answer_three != "")
|
665 |
+
{
|
666 |
+
$mlw_display .= "<option value='3'>".htmlspecialchars_decode($mlw_question->answer_three, ENT_QUOTES)."</option>";
|
667 |
+
}
|
668 |
+
if ($mlw_question->answer_four != "")
|
669 |
+
{
|
670 |
+
$mlw_display .= "<option value='4'>".htmlspecialchars_decode($mlw_question->answer_four, ENT_QUOTES)."</option>";
|
671 |
+
}
|
672 |
+
if ($mlw_question->answer_five != "")
|
673 |
+
{
|
674 |
+
$mlw_display .= "<option value='5'>".htmlspecialchars_decode($mlw_question->answer_five, ENT_QUOTES)."</option>";
|
675 |
+
}
|
676 |
+
if ($mlw_question->answer_six != "")
|
677 |
+
{
|
678 |
+
$mlw_display .= "<option value='6'>".htmlspecialchars_decode($mlw_question->answer_six, ENT_QUOTES)."</option>";
|
679 |
+
}
|
680 |
+
}
|
681 |
+
$mlw_display .= "</select>";
|
682 |
+
$mlw_display .= "<br />";
|
683 |
+
}
|
684 |
+
elseif ($mlw_question->question_type == 5)
|
685 |
+
{
|
686 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
687 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
688 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
689 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
690 |
+
if ($mlw_question_settings['required'] == 0) {$mlw_requireClass = "mlwRequiredText";} else {$mlw_requireClass = "";}
|
691 |
+
$mlw_display .= "<textarea class='mlw_answer_open_text $mlw_requireClass' cols='70' rows='5' name='question".$mlw_question->question_id."' /></textarea>";
|
692 |
+
$mlw_display .= "<br />";
|
693 |
+
}
|
694 |
+
elseif ($mlw_question->question_type == 6)
|
695 |
+
{
|
696 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES);
|
697 |
+
$mlw_display .= "<br />";
|
698 |
+
}
|
699 |
+
elseif ($mlw_question->question_type == 7)
|
700 |
+
{
|
701 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
702 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
703 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
704 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
705 |
+
if ($mlw_question_settings['required'] == 0) {$mlw_requireClass = "mlwRequiredNumber";} else {$mlw_requireClass = "";}
|
706 |
+
$mlw_display .= "<input type='number' class='mlw_answer_number $mlw_requireClass' name='question".$mlw_question->question_id."' />";
|
707 |
+
$mlw_display .= "<br />";
|
708 |
+
}
|
709 |
+
elseif ($mlw_question->question_type == 8)
|
710 |
+
{
|
711 |
+
if ($mlw_question_settings['required'] == 0) {$mlw_requireClass = "mlwRequiredCheck";} else {$mlw_requireClass = "";}
|
712 |
+
$mlw_display .= "<input type='checkbox' id='mlwAcceptance' class='$mlw_requireClass ' />";
|
713 |
+
$mlw_display .= "<label for='mlwAcceptance'><span class='mlw_qmn_question' style='font-weight:bold;'>".htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span></label>";
|
714 |
+
$mlw_display .= "<br />";
|
715 |
+
}
|
716 |
+
elseif ($mlw_question->question_type == 9)
|
717 |
+
{
|
718 |
+
if ($mlw_question_settings['required'] == 0) {$mlw_requireClass = "mlwRequiredCaptcha";} else {$mlw_requireClass = "";}
|
719 |
+
$mlw_display .= "<div class='mlw_captchaWrap'>";
|
720 |
+
$mlw_display .= "<canvas alt='' id='mlw_captcha' class='mlw_captcha' width='100' height='50'></canvas>";
|
721 |
+
$mlw_display .= "</div>";
|
722 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
723 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
724 |
+
$mlw_display .= "<input type='text' class='mlw_answer_open_text $mlw_requireClass' id='mlw_captcha_text' name='mlw_user_captcha'/>";
|
725 |
+
$mlw_display .= "<input type='hidden' name='mlw_code_captcha' id='mlw_code_captcha' value='none' />";
|
726 |
+
$mlw_display .= "<br />";
|
727 |
+
$mlw_display .= "<script>
|
728 |
+
var mlw_code = '';
|
729 |
+
var mlw_chars = '0123456789ABCDEFGHIJKL!@#$%^&*()MNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
730 |
+
var mlw_code_length = 5;
|
731 |
+
for (var i=0; i<mlw_code_length; i++) {
|
732 |
+
var rnum = Math.floor(Math.random() * mlw_chars.length);
|
733 |
+
mlw_code += mlw_chars.substring(rnum,rnum+1);
|
734 |
+
}
|
735 |
+
var mlw_captchaCTX = document.getElementById('mlw_captcha').getContext('2d');
|
736 |
+
mlw_captchaCTX.font = 'normal 24px Verdana';
|
737 |
+
mlw_captchaCTX.strokeStyle = '#000000';
|
738 |
+
mlw_captchaCTX.clearRect(0,0,100,50);
|
739 |
+
mlw_captchaCTX.strokeText(mlw_code,10,30,70);
|
740 |
+
mlw_captchaCTX.textBaseline = 'middle';
|
741 |
+
document.getElementById('mlw_code_captcha').value = mlw_code;
|
742 |
+
</script>
|
743 |
+
";
|
744 |
+
}
|
745 |
+
else
|
746 |
+
{
|
747 |
+
$mlw_display .= "<span class='mlw_qmn_question' style='font-weight:bold;'>";
|
748 |
+
$mlw_qmn_total_questions = $mlw_qmn_total_questions + 1;
|
749 |
+
if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; }
|
750 |
+
$mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."</span><br />";
|
751 |
+
if ($mlw_question_settings['required'] == 0) {$mlw_requireClass = "mlwRequiredText";} else {$mlw_requireClass = "";}
|
752 |
+
$mlw_display .= "<input type='text' class='mlw_answer_open_text $mlw_requireClass' name='question".$mlw_question->question_id."' />";
|
753 |
+
$mlw_display .= "<br />";
|
754 |
+
}
|
755 |
+
if ($mlw_question->comments == 0)
|
756 |
+
{
|
757 |
+
$mlw_display .= "<input type='text' class='mlw_qmn_question_comment' x-webkit-speech id='mlwComment".$mlw_question->question_id."' name='mlwComment".$mlw_question->question_id."' value='".esc_attr(htmlspecialchars_decode($mlw_quiz_options->comment_field_text, ENT_QUOTES))."' onclick='clear_field(this)'/>";
|
758 |
+
$mlw_display .= "<br />";
|
759 |
+
}
|
760 |
+
if ($mlw_question->comments == 2)
|
761 |
+
{
|
762 |
+
$mlw_display .= "<textarea cols='70' rows='5' class='mlw_qmn_question_comment' id='mlwComment".$mlw_question->question_id."' name='mlwComment".$mlw_question->question_id."' onclick='clear_field(this)'>".htmlspecialchars_decode($mlw_quiz_options->comment_field_text, ENT_QUOTES)."</textarea>";
|
763 |
+
$mlw_display .= "<br />";
|
764 |
+
}
|
765 |
+
if ($mlw_question->hints != "")
|
766 |
+
{
|
767 |
+
$mlw_display .= "<span title=\"".htmlspecialchars_decode($mlw_question->hints, ENT_QUOTES)."\" style=\"text-decoration:underline;color:rgb(0,0,255);\" class='mlw_qmn_hint_link'>Hint</span>";
|
768 |
+
$mlw_display .= "<br /><br />";
|
769 |
+
}
|
770 |
+
$mlw_display .= "</div>";
|
771 |
+
if ( $mlw_quiz_options->pagination == 0) { $mlw_display .= "<br />"; }
|
772 |
+
}
|
773 |
+
|
774 |
+
//Display comment box if needed
|
775 |
+
if ($mlw_quiz_options->comment_section == 0)
|
776 |
+
{
|
777 |
+
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
778 |
+
$mlw_display .= "<div class='quiz_section slide".$mlw_qmn_section_count."'>";
|
779 |
+
$mlw_message_comments = htmlspecialchars_decode($mlw_quiz_options->message_comment, ENT_QUOTES);
|
780 |
+
$mlw_message_comments = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_comments);
|
781 |
+
$mlw_message_comments = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message_comments);
|
782 |
+
$mlw_display .= "<label for='mlwQuizComments' class='mlw_qmn_comment_section_text' style='font-weight:bold;'>".$mlw_message_comments."</label><br />";
|
783 |
+
$mlw_display .= "<textarea cols='70' rows='15' id='mlwQuizComments' name='mlwQuizComments' ></textarea>";
|
784 |
+
$mlw_display .= "</div>";
|
785 |
+
if ( $mlw_quiz_options->pagination == 0) { $mlw_display .= "<br /><br />"; }
|
786 |
+
}
|
787 |
+
$mlw_display .= "<br />";
|
788 |
+
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
789 |
+
$mlw_display .= "<div class='quiz_section slide".$mlw_qmn_section_count." quiz_end'>";
|
790 |
+
if ($mlw_quiz_options->message_end_template != '')
|
791 |
+
{
|
792 |
+
$mlw_message_end = htmlspecialchars_decode($mlw_quiz_options->message_end_template, ENT_QUOTES);
|
793 |
+
$mlw_message_end = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_end);
|
794 |
+
$mlw_message_end = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message_end);
|
795 |
+
$mlw_display .= "<span class='mlw_qmn_message_end'>".$mlw_message_end."</span>";
|
796 |
+
$mlw_display .= "<br /><br />";
|
797 |
+
}
|
798 |
+
if ($mlw_quiz_options->contact_info_location == 1)
|
799 |
+
{
|
800 |
+
$mlw_display .= mlwDisplayContactInfo($mlw_quiz_options);
|
801 |
+
}
|
802 |
+
ob_start();
|
803 |
+
do_action('mlw_qmn_end_quiz_section');
|
804 |
+
$mlw_display .= ob_get_contents();
|
805 |
+
ob_end_clean();
|
806 |
+
$mlw_display .= "<span style='display: none;'>If you are human, leave this field blank or you will be considered spam:</span>";
|
807 |
+
$mlw_display .= "<input style='display: none;' type='text' name='email' id='email' />";
|
808 |
+
$mlw_display .= "<input type='hidden' name='total_questions' id='total_questions' value='".$mlw_qmn_total_questions."'/>";
|
809 |
+
$mlw_display .= "<input type='hidden' name='timer' id='timer' value='0'/>";
|
810 |
+
$mlw_display .= "<input type='hidden' name='complete_quiz' value='confirmation' />";
|
811 |
+
$mlw_display .= "<input type='submit' value='".esc_attr(htmlspecialchars_decode($mlw_quiz_options->submit_button_text, ENT_QUOTES))."' />";
|
812 |
+
$mlw_display .= "<span name='mlw_error_message_bottom' id='mlw_error_message_bottom' style='color: red;'></span><br />";
|
813 |
+
$mlw_display .= "</form>";
|
814 |
+
$mlw_display .= "</div>";
|
815 |
+
$mlw_display .= "</div>";
|
816 |
+
|
817 |
+
}
|
818 |
+
//Display Completion Screen
|
819 |
+
else
|
820 |
+
{
|
821 |
+
?>
|
822 |
+
<script type="text/javascript">
|
823 |
+
window.sessionStorage.setItem('mlw_time_quiz<?php echo $mlw_quiz_id; ?>', 'completed');
|
824 |
+
window.sessionStorage.setItem('mlw_started_quiz<?php echo $mlw_quiz_id; ?>', "no");
|
825 |
+
</script>
|
826 |
+
<?php
|
827 |
+
if (empty($mlw_spam_email) && $mlw_qmn_isAllowed && ((!isset($_POST["mlw_code_captcha"])) || isset($_POST["mlw_code_captcha"]) && $_POST["mlw_user_captcha"] == $_POST["mlw_code_captcha"]))
|
828 |
+
{
|
829 |
+
|
830 |
+
//Load questions
|
831 |
+
$sql = "SELECT * FROM " . $wpdb->prefix . "mlw_questions" . " WHERE quiz_id=".$mlw_quiz_id." AND deleted='0' ";
|
832 |
+
if ($mlw_quiz_options->randomness_order == 0)
|
833 |
+
{
|
834 |
+
$sql .= "ORDER BY question_order ASC";
|
835 |
+
}
|
836 |
+
if ($mlw_quiz_options->randomness_order == 1 || $mlw_quiz_options->randomness_order == 2)
|
837 |
+
{
|
838 |
+
$sql .= "ORDER BY rand()";
|
839 |
+
}
|
840 |
+
$mlw_questions = $wpdb->get_results($sql);
|
841 |
+
|
842 |
+
//Load and prepare answer arrays
|
843 |
+
$mlw_qmn_loaded_answer_arrays = array();
|
844 |
+
foreach($mlw_questions as $mlw_question_info) {
|
845 |
+
$mlw_qmn_answer_array_each = @unserialize($mlw_question_info->answer_array);
|
846 |
+
if ( !is_array($mlw_qmn_answer_array_each) )
|
847 |
+
{
|
848 |
+
$mlw_answer_array_correct = array(0, 0, 0, 0, 0, 0);
|
849 |
+
$mlw_answer_array_correct[$mlw_question_info->correct_answer-1] = 1;
|
850 |
+
$mlw_qmn_loaded_answer_arrays[$mlw_question_info->question_id] = array(
|
851 |
+
array($mlw_question_info->answer_one, $mlw_question_info->answer_one_points, $mlw_answer_array_correct[0]),
|
852 |
+
array($mlw_question_info->answer_two, $mlw_question_info->answer_two_points, $mlw_answer_array_correct[1]),
|
853 |
+
array($mlw_question_info->answer_three, $mlw_question_info->answer_three_points, $mlw_answer_array_correct[2]),
|
854 |
+
array($mlw_question_info->answer_four, $mlw_question_info->answer_four_points, $mlw_answer_array_correct[3]),
|
855 |
+
array($mlw_question_info->answer_five, $mlw_question_info->answer_five_points, $mlw_answer_array_correct[4]),
|
856 |
+
array($mlw_question_info->answer_six, $mlw_question_info->answer_six_points, $mlw_answer_array_correct[5]));
|
857 |
+
}
|
858 |
+
else
|
859 |
+
{
|
860 |
+
$mlw_qmn_loaded_answer_arrays[$mlw_question_info->question_id] = $mlw_qmn_answer_array_each;
|
861 |
+
}
|
862 |
+
}
|
863 |
+
|
864 |
+
//Variables needed for scoring
|
865 |
+
$mlw_points = 0;
|
866 |
+
$mlw_correct = 0;
|
867 |
+
$mlw_total_questions = 0;
|
868 |
+
$mlw_total_score = 0;
|
869 |
+
$mlw_question_answers = "";
|
870 |
+
isset($_POST["total_questions"]) ? $mlw_total_questions = intval($_POST["total_questions"]) : $mlw_total_questions = 0;
|
871 |
+
|
872 |
+
//Update the amount of times the quiz has been taken
|
873 |
+
$mlw_taken = $mlw_quiz_options->quiz_taken;
|
874 |
+
$mlw_taken += 1;
|
875 |
+
$update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET quiz_taken='".$mlw_taken."' WHERE quiz_id=".$mlw_quiz_id;
|
876 |
+
$results = $wpdb->query( $update );
|
877 |
+
|
878 |
+
//See which answers were correct and award points if necessary
|
879 |
+
$mlw_user_text = "";
|
880 |
+
$mlw_correct_text = "";
|
881 |
+
$mlw_qmn_answer_array = array();
|
882 |
+
foreach($mlw_questions as $mlw_question) {
|
883 |
+
$mlw_user_text = "";
|
884 |
+
$mlw_correct_text = "";
|
885 |
+
if ( isset($_POST["question".$mlw_question->question_id]) || isset($_POST["mlwComment".$mlw_question->question_id]) )
|
886 |
+
{
|
887 |
+
if ( $mlw_question->question_type == 0 || $mlw_question->question_type == 1 || $mlw_question->question_type == 2)
|
888 |
+
{
|
889 |
+
if (isset($_POST["question".$mlw_question->question_id]))
|
890 |
+
{
|
891 |
+
$mlw_user_answer = $_POST["question".$mlw_question->question_id];
|
892 |
+
}
|
893 |
+
else
|
894 |
+
{
|
895 |
+
$mlw_user_answer = " ";
|
896 |
+
}
|
897 |
+
$mlw_qmn_question_answers_array = $mlw_qmn_loaded_answer_arrays[$mlw_question->question_id];
|
898 |
+
foreach($mlw_qmn_question_answers_array as $mlw_qmn_question_answers_each)
|
899 |
+
{
|
900 |
+
if (htmlspecialchars(stripslashes($mlw_user_answer), ENT_QUOTES) == esc_attr($mlw_qmn_question_answers_each[0]))
|
901 |
+
{
|
902 |
+
$mlw_points += $mlw_qmn_question_answers_each[1];
|
903 |
+
$mlw_user_text .= strval(htmlspecialchars_decode($mlw_qmn_question_answers_each[0], ENT_QUOTES));
|
904 |
+
if ($mlw_qmn_question_answers_each[2] == 1)
|
905 |
+
{
|
906 |
+
$mlw_correct += 1;
|
907 |
+
}
|
908 |
+
}
|
909 |
+
if ($mlw_qmn_question_answers_each[2] == 1)
|
910 |
+
{
|
911 |
+
$mlw_correct_text .= htmlspecialchars_decode($mlw_qmn_question_answers_each[0], ENT_QUOTES);
|
912 |
+
}
|
913 |
+
}
|
914 |
+
}
|
915 |
+
elseif ( $mlw_question->question_type == 3 || $mlw_question->question_type == 5 || $mlw_question->question_type == 7)
|
916 |
+
{
|
917 |
+
if (isset($_POST["question".$mlw_question->question_id]))
|
918 |
+
{
|
919 |
+
$mlw_user_answer = $_POST["question".$mlw_question->question_id];
|
920 |
+
}
|
921 |
+
else
|
922 |
+
{
|
923 |
+
$mlw_user_answer = " ";
|
924 |
+
}
|
925 |
+
$mlw_user_text .= strval(stripslashes(htmlspecialchars_decode($mlw_user_answer, ENT_QUOTES)));
|
926 |
+
$mlw_qmn_question_answers_array = $mlw_qmn_loaded_answer_arrays[$mlw_question->question_id];
|
927 |
+
foreach($mlw_qmn_question_answers_array as $mlw_qmn_question_answers_each)
|
928 |
+
{
|
929 |
+
$mlw_correct_text = strval(htmlspecialchars_decode($mlw_qmn_question_answers_each[0], ENT_QUOTES));
|
930 |
+
if (strtoupper($mlw_user_text) == strtoupper($mlw_correct_text))
|
931 |
+
{
|
932 |
+
$mlw_correct += 1;
|
933 |
+
$mlw_points += $mlw_qmn_question_answers_each[1];
|
934 |
+
break;
|
935 |
+
}
|
936 |
+
}
|
937 |
+
}
|
938 |
+
elseif ( $mlw_question->question_type == 4 || $mlw_question->question_type == 10)
|
939 |
+
{
|
940 |
+
$mlw_qmn_user_correct_answers = 0;
|
941 |
+
$mlw_qmn_total_correct_answers = 0;
|
942 |
+
$mlw_qmn_question_answers_array = $mlw_qmn_loaded_answer_arrays[$mlw_question->question_id];
|
943 |
+
$mlw_qmn_total_answers = count($mlw_qmn_question_answers_array);
|
944 |
+
foreach($mlw_qmn_question_answers_array as $mlw_qmn_question_answers_each)
|
945 |
+
{
|
946 |
+
for ($i = 1; $i <= $mlw_qmn_total_answers; $i++) {
|
947 |
+
if (isset($_POST["question".$mlw_question->question_id."_".$i]) && htmlspecialchars(stripslashes($_POST["question".$mlw_question->question_id."_".$i]), ENT_QUOTES) == esc_attr($mlw_qmn_question_answers_each[0]))
|
948 |
+
{
|
949 |
+
$mlw_points += $mlw_qmn_question_answers_each[1];
|
950 |
+
$mlw_user_text .= strval(htmlspecialchars_decode($mlw_qmn_question_answers_each[0], ENT_QUOTES)).".";
|
951 |
+
if ($mlw_qmn_question_answers_each[2] == 1)
|
952 |
+
{
|
953 |
+
$mlw_qmn_user_correct_answers += 1;
|
954 |
+
}
|
955 |
+
else
|
956 |
+
{
|
957 |
+
$mlw_qmn_user_correct_answers = -1;
|
958 |
+
}
|
959 |
+
}
|
960 |
+
}
|
961 |
+
if ($mlw_qmn_question_answers_each[2] == 1)
|
962 |
+
{
|
963 |
+
$mlw_correct_text .= htmlspecialchars_decode($mlw_qmn_question_answers_each[0], ENT_QUOTES).".";
|
964 |
+
$mlw_qmn_total_correct_answers++;
|
965 |
+
}
|
966 |
+
}
|
967 |
+
if ($mlw_qmn_user_correct_answers == $mlw_qmn_total_correct_answers)
|
968 |
+
{
|
969 |
+
$mlw_correct += 1;
|
970 |
+
}
|
971 |
+
}
|
972 |
+
if (isset($_POST["mlwComment".$mlw_question->question_id]))
|
973 |
+
{
|
974 |
+
$mlw_qm_question_comment = $_POST["mlwComment".$mlw_question->question_id];
|
975 |
+
}
|
976 |
+
else
|
977 |
+
{
|
978 |
+
$mlw_qm_question_comment = "";
|
979 |
+
}
|
980 |
+
|
981 |
+
$mlw_question_answer_display = htmlspecialchars_decode($mlw_quiz_options->question_answer_template, ENT_QUOTES);
|
982 |
+
$mlw_question_answer_display = str_replace( "%QUESTION%" , htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES), $mlw_question_answer_display);
|
983 |
+
$mlw_question_answer_display = str_replace( "%USER_ANSWER%" , $mlw_user_text, $mlw_question_answer_display);
|
984 |
+
$mlw_question_answer_display = str_replace( "%CORRECT_ANSWER%" , $mlw_correct_text, $mlw_question_answer_display);
|
985 |
+
$mlw_question_answer_display = str_replace( "%USER_COMMENTS%" , $mlw_qm_question_comment, $mlw_question_answer_display);
|
986 |
+
$mlw_question_answer_display = str_replace( "%CORRECT_ANSWER_INFO%" , htmlspecialchars_decode($mlw_question->question_answer_info, ENT_QUOTES), $mlw_question_answer_display);
|
987 |
+
|
988 |
+
$mlw_qmn_answer_array[] = array($mlw_question->question_name, htmlspecialchars($mlw_user_text, ENT_QUOTES), htmlspecialchars($mlw_correct_text, ENT_QUOTES), htmlspecialchars(stripslashes($mlw_qm_question_comment), ENT_QUOTES));
|
989 |
+
|
990 |
+
$mlw_question_answers .= $mlw_question_answer_display;
|
991 |
+
$mlw_question_answers .= "<br />";
|
992 |
+
}
|
993 |
+
}
|
994 |
+
|
995 |
+
//Calculate Total Percent Score And Average Points Only If Total Questions Doesn't Equal Zero To Avoid Division By Zero Error
|
996 |
+
if ($mlw_total_questions != 0)
|
997 |
+
{
|
998 |
+
$mlw_total_score = round((($mlw_correct/$mlw_total_questions)*100), 2);
|
999 |
+
$mlw_average_points = round(($mlw_points/$mlw_total_questions), 2);
|
1000 |
+
}
|
1001 |
+
else
|
1002 |
+
{
|
1003 |
+
$mlw_total_score = 0;
|
1004 |
+
$mlw_average_points = 0;
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
//Prepare comment section if set
|
1008 |
+
if (isset($_POST["mlwQuizComments"]))
|
1009 |
+
{
|
1010 |
+
$mlw_qm_quiz_comments = $_POST["mlwQuizComments"];
|
1011 |
+
}
|
1012 |
+
else
|
1013 |
+
{
|
1014 |
+
$mlw_qm_quiz_comments = "";
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
|
1018 |
+
//Prepare Certificate
|
1019 |
+
$mlw_certificate_link = "";
|
1020 |
+
$mlw_certificate_options = unserialize($mlw_quiz_options->certificate_template);
|
1021 |
+
if (!is_array($mlw_certificate_options)) {
|
1022 |
+
// something went wrong, initialize to empty array
|
1023 |
+
$mlw_certificate_options = array('Enter title here', 'Enter text here', '', '', 1);
|
1024 |
+
}
|
1025 |
+
if ($mlw_certificate_options[4] == 0)
|
1026 |
+
{
|
1027 |
+
$mlw_message_certificate = $mlw_certificate_options[1];
|
1028 |
+
$mlw_message_certificate = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_certificate);
|
1029 |
+
$mlw_message_certificate = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message_certificate);
|
1030 |
+
$mlw_message_certificate = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message_certificate);
|
1031 |
+
$mlw_message_certificate = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message_certificate);
|
1032 |
+
$mlw_message_certificate = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message_certificate);
|
1033 |
+
$mlw_message_certificate = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_certificate);
|
1034 |
+
$mlw_message_certificate = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message_certificate);
|
1035 |
+
$mlw_message_certificate = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message_certificate);
|
1036 |
+
$mlw_message_certificate = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message_certificate);
|
1037 |
+
$mlw_message_certificate = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message_certificate);
|
1038 |
+
$mlw_message_certificate = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message_certificate);
|
1039 |
+
$mlw_message_certificate = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message_certificate);
|
1040 |
+
$mlw_message_certificate = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message_certificate);
|
1041 |
+
$mlw_message_certificate = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message_certificate);
|
1042 |
+
$mlw_message_certificate = str_replace( "\n" , "<br>", $mlw_message_certificate);
|
1043 |
+
$mlw_plugindirpath = plugin_dir_path( __FILE__ );
|
1044 |
+
$plugindirpath=plugin_dir_path( __FILE__ );
|
1045 |
+
$mlw_qmn_certificate_file=<<<EOC
|
1046 |
+
<?php
|
1047 |
+
include("$plugindirpath/WriteHTML.php");
|
1048 |
+
\$pdf=new PDF_HTML();
|
1049 |
+
\$pdf->AddPage('L');
|
1050 |
+
EOC;
|
1051 |
+
$mlw_qmn_certificate_file.=$mlw_certificate_options[3] != '' ? '$pdf->Image("'.$mlw_certificate_options[3].'",0,0,$pdf->w, $pdf->h);' : '';
|
1052 |
+
$mlw_qmn_certificate_file.=<<<EOC
|
1053 |
+
\$pdf->Ln(20);
|
1054 |
+
\$pdf->SetFont('Arial','B',24);
|
1055 |
+
\$pdf->MultiCell(280,20,'$mlw_certificate_options[0]',0,'C');
|
1056 |
+
\$pdf->Ln(15);
|
1057 |
+
\$pdf->SetFont('Arial','',16);
|
1058 |
+
\$pdf->WriteHTML("<p align='center'>$mlw_message_certificate</p>");
|
1059 |
+
EOC;
|
1060 |
+
$mlw_qmn_certificate_file.=$mlw_certificate_options[2] != '' ? '$pdf->Image("'.$mlw_certificate_options[2].'",110,130);' : '';
|
1061 |
+
$mlw_qmn_certificate_file.=<<<EOC
|
1062 |
+
\$pdf->Output('mlw_qmn_certificate.pdf','D');
|
1063 |
+
unlink(__FILE__);
|
1064 |
+
EOC;
|
1065 |
+
$mlw_qmn_certificate_filename = str_replace(home_url()."/", '', plugin_dir_url( __FILE__ ))."certificates/mlw_qmn_quiz".date("YmdHis").$mlw_qmn_timer.".php";
|
1066 |
+
file_put_contents($mlw_qmn_certificate_filename, $mlw_qmn_certificate_file);
|
1067 |
+
$mlw_qmn_certificate_filename = plugin_dir_url( __FILE__ )."certificates/mlw_qmn_quiz".date("YmdHis").$mlw_qmn_timer.".php";
|
1068 |
+
$mlw_certificate_link = "<a href='".$mlw_qmn_certificate_filename."' style='color: blue;'>Download Certificate</a>";
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
/*
|
1072 |
+
Prepare the landing page
|
1073 |
+
-First, unserialize message_after column
|
1074 |
+
-Second, check for array in case user has not updated
|
1075 |
+
Message array = (array( bottomvalue, topvalue, text),array( bottomvalue, topvalue, text), etc..., array(0,0,text))
|
1076 |
+
*/
|
1077 |
+
$mlw_message_after_array = @unserialize($mlw_quiz_options->message_after);
|
1078 |
+
if (is_array($mlw_message_after_array))
|
1079 |
+
{
|
1080 |
+
//Cycle through landing pages
|
1081 |
+
foreach($mlw_message_after_array as $mlw_each)
|
1082 |
+
{
|
1083 |
+
//Check to see if default
|
1084 |
+
if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
|
1085 |
+
{
|
1086 |
+
$mlw_message_after = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
|
1087 |
+
$mlw_message_after = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_after);
|
1088 |
+
$mlw_message_after = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message_after);
|
1089 |
+
$mlw_message_after = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message_after);
|
1090 |
+
$mlw_message_after = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message_after);
|
1091 |
+
$mlw_message_after = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message_after);
|
1092 |
+
$mlw_message_after = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_after);
|
1093 |
+
$mlw_message_after = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message_after);
|
1094 |
+
$mlw_message_after = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message_after);
|
1095 |
+
$mlw_message_after = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message_after);
|
1096 |
+
$mlw_message_after = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message_after);
|
1097 |
+
$mlw_message_after = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message_after);
|
1098 |
+
$mlw_message_after = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message_after);
|
1099 |
+
$mlw_message_after = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message_after);
|
1100 |
+
$mlw_message_after = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message_after);
|
1101 |
+
$mlw_message_after = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message_after);
|
1102 |
+
$mlw_message_after = str_replace( "\n" , "<br>", $mlw_message_after);
|
1103 |
+
$mlw_display .= $mlw_message_after;
|
1104 |
+
break;
|
1105 |
+
}
|
1106 |
+
else
|
1107 |
+
{
|
1108 |
+
//Check to see if points fall in correct range
|
1109 |
+
if ($mlw_quiz_options->system == 1 && $mlw_points >= $mlw_each[0] && $mlw_points <= $mlw_each[1])
|
1110 |
+
{
|
1111 |
+
$mlw_message_after = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
|
1112 |
+
$mlw_message_after = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_after);
|
1113 |
+
$mlw_message_after = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message_after);
|
1114 |
+
$mlw_message_after = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message_after);
|
1115 |
+
$mlw_message_after = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message_after);
|
1116 |
+
$mlw_message_after = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message_after);
|
1117 |
+
$mlw_message_after = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_after);
|
1118 |
+
$mlw_message_after = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message_after);
|
1119 |
+
$mlw_message_after = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message_after);
|
1120 |
+
$mlw_message_after = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message_after);
|
1121 |
+
$mlw_message_after = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message_after);
|
1122 |
+
$mlw_message_after = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message_after);
|
1123 |
+
$mlw_message_after = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message_after);
|
1124 |
+
$mlw_message_after = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message_after);
|
1125 |
+
$mlw_message_after = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message_after);
|
1126 |
+
$mlw_message_after = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message_after);
|
1127 |
+
$mlw_message_after = str_replace( "\n" , "<br>", $mlw_message_after);
|
1128 |
+
$mlw_display .= $mlw_message_after;
|
1129 |
+
break;
|
1130 |
+
}
|
1131 |
+
//Check to see if score fall in correct range
|
1132 |
+
if ($mlw_quiz_options->system == 0 && $mlw_total_score >= $mlw_each[0] && $mlw_total_score <= $mlw_each[1])
|
1133 |
+
{
|
1134 |
+
$mlw_message_after = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
|
1135 |
+
$mlw_message_after = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_after);
|
1136 |
+
$mlw_message_after = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message_after);
|
1137 |
+
$mlw_message_after = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message_after);
|
1138 |
+
$mlw_message_after = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message_after);
|
1139 |
+
$mlw_message_after = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message_after);
|
1140 |
+
$mlw_message_after = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_after);
|
1141 |
+
$mlw_message_after = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message_after);
|
1142 |
+
$mlw_message_after = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message_after);
|
1143 |
+
$mlw_message_after = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message_after);
|
1144 |
+
$mlw_message_after = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message_after);
|
1145 |
+
$mlw_message_after = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message_after);
|
1146 |
+
$mlw_message_after = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message_after);
|
1147 |
+
$mlw_message_after = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message_after);
|
1148 |
+
$mlw_message_after = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message_after);
|
1149 |
+
$mlw_message_after = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message_after);
|
1150 |
+
$mlw_message_after = str_replace( "\n" , "<br>", $mlw_message_after);
|
1151 |
+
$mlw_display .= $mlw_message_after;
|
1152 |
+
break;
|
1153 |
+
}
|
1154 |
+
}
|
1155 |
+
}
|
1156 |
+
}
|
1157 |
+
else
|
1158 |
+
{
|
1159 |
+
//Prepare the after quiz message
|
1160 |
+
$mlw_message_after = htmlspecialchars_decode($mlw_quiz_options->message_after, ENT_QUOTES);
|
1161 |
+
$mlw_message_after = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_after);
|
1162 |
+
$mlw_message_after = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message_after);
|
1163 |
+
$mlw_message_after = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message_after);
|
1164 |
+
$mlw_message_after = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message_after);
|
1165 |
+
$mlw_message_after = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message_after);
|
1166 |
+
$mlw_message_after = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_after);
|
1167 |
+
$mlw_message_after = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message_after);
|
1168 |
+
$mlw_message_after = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message_after);
|
1169 |
+
$mlw_message_after = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message_after);
|
1170 |
+
$mlw_message_after = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message_after);
|
1171 |
+
$mlw_message_after = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message_after);
|
1172 |
+
$mlw_message_after = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message_after);
|
1173 |
+
$mlw_message_after = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message_after);
|
1174 |
+
$mlw_message_after = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message_after);
|
1175 |
+
$mlw_message_after = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message_after);
|
1176 |
+
$mlw_message_after = str_replace( "\n" , "<br>", $mlw_message_after);
|
1177 |
+
$mlw_display .= $mlw_message_after;
|
1178 |
+
}
|
1179 |
+
|
1180 |
+
if ($mlw_quiz_options->social_media == 1)
|
1181 |
+
{
|
1182 |
+
?>
|
1183 |
+
<script>
|
1184 |
+
function mlw_qmn_share(network, mlw_qmn_social_text, mlw_qmn_title)
|
1185 |
+
{
|
1186 |
+
var sTop = window.screen.height/2-(218);
|
1187 |
+
var sLeft = window.screen.width/2-(313);
|
1188 |
+
var sqShareOptions = "height=400,width=580,toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=0,top=" + sTop + ",left=" + sLeft;
|
1189 |
+
var pageUrl = window.location.href;
|
1190 |
+
var pageUrlEncoded = encodeURIComponent(pageUrl);
|
1191 |
+
if (network == 1)
|
1192 |
+
{
|
1193 |
+
var Url = "https://www.facebook.com/dialog/feed?"
|
1194 |
+
+ "display=popup&"
|
1195 |
+
+ "app_id=483815031724529&"
|
1196 |
+
+ "link=" + pageUrlEncoded + "&"
|
1197 |
+
+ "name=" + encodeURIComponent(mlw_qmn_social_text) + "&"
|
1198 |
+
+ "description= &"
|
1199 |
+
+ "redirect_uri=http://www.mylocalwebstop.com/mlw_qmn_close.html";
|
1200 |
+
}
|
1201 |
+
if (network == 2)
|
1202 |
+
{
|
1203 |
+
var Url = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(mlw_qmn_social_text);
|
1204 |
+
}
|
1205 |
+
window.open(Url, "Share", sqShareOptions);
|
1206 |
+
return false;
|
1207 |
+
}
|
1208 |
+
</script>
|
1209 |
+
<?php
|
1210 |
+
$mlw_social_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_quiz_options->social_media_text);
|
1211 |
+
$mlw_social_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_social_message);
|
1212 |
+
$mlw_social_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_social_message);
|
1213 |
+
$mlw_social_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_social_message);
|
1214 |
+
$mlw_social_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_social_message);
|
1215 |
+
$mlw_social_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_social_message);
|
1216 |
+
$mlw_social_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_social_message);
|
1217 |
+
$mlw_social_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_social_message);
|
1218 |
+
$mlw_display .= "<br />
|
1219 |
+
<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>
|
1220 |
+
<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>
|
1221 |
+
<br />";
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
//Switch email type to HTML
|
1225 |
+
add_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
|
1226 |
+
|
1227 |
+
/*
|
1228 |
+
Prepare and send the user email
|
1229 |
+
- First, check to see if user_email_template is the newer array format, if not use it as the template
|
1230 |
+
- If it is an array, check to see if the score meets the parameter of one of the templates. If, not send the default
|
1231 |
+
*/
|
1232 |
+
$mlw_message = "";
|
1233 |
+
if ($mlw_quiz_options->send_user_email == "0")
|
1234 |
+
{
|
1235 |
+
if ($mlw_user_email != "")
|
1236 |
+
{
|
1237 |
+
$mlw_user_email_array = @unserialize($mlw_quiz_options->user_email_template);
|
1238 |
+
if (is_array($mlw_user_email_array))
|
1239 |
+
{
|
1240 |
+
//Cycle through landing pages
|
1241 |
+
foreach($mlw_user_email_array as $mlw_each)
|
1242 |
+
{
|
1243 |
+
|
1244 |
+
//Generate Email Subject
|
1245 |
+
if (!isset($mlw_each[3]))
|
1246 |
+
{
|
1247 |
+
$mlw_each[3] = "Quiz Results For %QUIZ_NAME";
|
1248 |
+
}
|
1249 |
+
$mlw_each[3] = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_each[3]);
|
1250 |
+
$mlw_each[3] = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_each[3]);
|
1251 |
+
$mlw_each[3] = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_each[3]);
|
1252 |
+
$mlw_each[3] = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_each[3]);
|
1253 |
+
$mlw_each[3] = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_each[3]);
|
1254 |
+
$mlw_each[3] = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_each[3]);
|
1255 |
+
$mlw_each[3] = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_each[3]);
|
1256 |
+
$mlw_each[3] = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_each[3]);
|
1257 |
+
$mlw_each[3] = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_each[3]);
|
1258 |
+
$mlw_each[3] = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_each[3]);
|
1259 |
+
$mlw_each[3] = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_each[3]);
|
1260 |
+
$mlw_each[3] = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_each[3]);
|
1261 |
+
|
1262 |
+
|
1263 |
+
//Check to see if default
|
1264 |
+
if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
|
1265 |
+
{
|
1266 |
+
$mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
|
1267 |
+
$mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
|
1268 |
+
$mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
|
1269 |
+
$mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
|
1270 |
+
$mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
|
1271 |
+
$mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
|
1272 |
+
$mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
|
1273 |
+
$mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
|
1274 |
+
$mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
|
1275 |
+
$mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
|
1276 |
+
$mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
|
1277 |
+
$mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
|
1278 |
+
$mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
|
1279 |
+
$mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
|
1280 |
+
$mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
|
1281 |
+
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
1282 |
+
$mlw_message = str_replace( "\n" , "<br>", $mlw_message);
|
1283 |
+
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1284 |
+
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1285 |
+
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1286 |
+
wp_mail($mlw_user_email, $mlw_each[3], $mlw_message, $mlw_headers);
|
1287 |
+
break;
|
1288 |
+
}
|
1289 |
+
else
|
1290 |
+
{
|
1291 |
+
//Check to see if points fall in correct range
|
1292 |
+
if ($mlw_quiz_options->system == 1 && $mlw_points >= $mlw_each[0] && $mlw_points <= $mlw_each[1])
|
1293 |
+
{
|
1294 |
+
$mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
|
1295 |
+
$mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
|
1296 |
+
$mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
|
1297 |
+
$mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
|
1298 |
+
$mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
|
1299 |
+
$mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
|
1300 |
+
$mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
|
1301 |
+
$mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
|
1302 |
+
$mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
|
1303 |
+
$mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
|
1304 |
+
$mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
|
1305 |
+
$mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
|
1306 |
+
$mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
|
1307 |
+
$mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
|
1308 |
+
$mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
|
1309 |
+
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
1310 |
+
$mlw_message = str_replace( "\n" , "<br>", $mlw_message);
|
1311 |
+
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1312 |
+
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1313 |
+
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1314 |
+
wp_mail($mlw_user_email, $mlw_each[3], $mlw_message, $mlw_headers);
|
1315 |
+
break;
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
//Check to see if score fall in correct range
|
1319 |
+
if ($mlw_quiz_options->system == 0 && $mlw_total_score >= $mlw_each[0] && $mlw_total_score <= $mlw_each[1])
|
1320 |
+
{
|
1321 |
+
$mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
|
1322 |
+
$mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
|
1323 |
+
$mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
|
1324 |
+
$mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
|
1325 |
+
$mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
|
1326 |
+
$mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
|
1327 |
+
$mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
|
1328 |
+
$mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
|
1329 |
+
$mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
|
1330 |
+
$mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
|
1331 |
+
$mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
|
1332 |
+
$mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
|
1333 |
+
$mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
|
1334 |
+
$mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
|
1335 |
+
$mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
|
1336 |
+
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
1337 |
+
$mlw_message = str_replace( "\n" , "<br>", $mlw_message);
|
1338 |
+
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1339 |
+
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1340 |
+
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1341 |
+
wp_mail($mlw_user_email, $mlw_each[3], $mlw_message, $mlw_headers);
|
1342 |
+
break;
|
1343 |
+
}
|
1344 |
+
}
|
1345 |
+
}
|
1346 |
+
}
|
1347 |
+
else
|
1348 |
+
{
|
1349 |
+
$mlw_message = htmlspecialchars_decode($mlw_quiz_options->user_email_template, ENT_QUOTES);
|
1350 |
+
$mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
|
1351 |
+
$mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
|
1352 |
+
$mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
|
1353 |
+
$mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
|
1354 |
+
$mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
|
1355 |
+
$mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
|
1356 |
+
$mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
|
1357 |
+
$mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
|
1358 |
+
$mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
|
1359 |
+
$mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
|
1360 |
+
$mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
|
1361 |
+
$mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
|
1362 |
+
$mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
|
1363 |
+
$mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
|
1364 |
+
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
1365 |
+
$mlw_message = str_replace( "\n" , "<br>", $mlw_message);
|
1366 |
+
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1367 |
+
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1368 |
+
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1369 |
+
wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
|
1370 |
+
}
|
1371 |
+
}
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
//Prepare and send the admin email
|
1375 |
+
$mlw_message = "";
|
1376 |
+
if ($mlw_quiz_options->send_admin_email == "0")
|
1377 |
+
{
|
1378 |
+
$mlw_message = htmlspecialchars_decode($mlw_quiz_options->admin_email_template, ENT_QUOTES);
|
1379 |
+
$mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
|
1380 |
+
$mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
|
1381 |
+
$mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
|
1382 |
+
$mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
|
1383 |
+
$mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
|
1384 |
+
$mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
|
1385 |
+
$mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
|
1386 |
+
$mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
|
1387 |
+
$mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
|
1388 |
+
$mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
|
1389 |
+
$mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
|
1390 |
+
$mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
|
1391 |
+
$mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
|
1392 |
+
$mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
|
1393 |
+
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
1394 |
+
if ( get_option('mlw_advert_shows') == 'true' ) {$mlw_message .= "<br>This email was generated by the Quiz Master Next script by Frank Corso";}
|
1395 |
+
$mlw_message = str_replace( "\n" , "<br>", $mlw_message);
|
1396 |
+
$mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
|
1397 |
+
$mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
|
1398 |
+
$mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
|
1399 |
+
$mlw_qmn_admin_emails = explode(",", $mlw_quiz_options->admin_email);
|
1400 |
+
foreach($mlw_qmn_admin_emails as $admin_email)
|
1401 |
+
{
|
1402 |
+
wp_mail($admin_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
|
1403 |
+
}
|
1404 |
+
}
|
1405 |
+
|
1406 |
+
//Remove HTML type for emails
|
1407 |
+
remove_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
|
1408 |
+
|
1409 |
+
//Save the results into database
|
1410 |
+
$mlw_quiz_results_array = array( intval($mlw_qmn_timer), $mlw_qmn_answer_array, htmlspecialchars(stripslashes($mlw_qm_quiz_comments), ENT_QUOTES));
|
1411 |
+
$mlw_quiz_results = serialize($mlw_quiz_results_array);
|
1412 |
+
|
1413 |
+
global $wpdb;
|
1414 |
+
$table_name = $wpdb->prefix . "mlw_results";
|
1415 |
+
$results = $wpdb->query( $wpdb->prepare( "INSERT INTO " . $table_name . " (result_id, quiz_id, quiz_name, quiz_system, point_score, correct_score, correct, total, name, business, email, phone, user, time_taken, time_taken_real, quiz_results, deleted) VALUES (NULL, %d, '%s', %d, %d, %d, %d, %d, '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', 0)", $mlw_quiz_id, $mlw_quiz_options->quiz_name, $mlw_quiz_options->system, $mlw_points, $mlw_total_score, $mlw_correct, $mlw_total_questions, $mlw_user_name, $mlw_user_comp, $mlw_user_email, $mlw_user_phone, get_current_user_id(), date("h:i:s A m/d/Y"), date("Y-m-d H:i:s"), $mlw_quiz_results) );
|
1416 |
+
|
1417 |
+
//Integration Action
|
1418 |
+
do_action('mlw_qmn_load_results_page');
|
1419 |
+
}
|
1420 |
+
else
|
1421 |
+
{
|
1422 |
+
if (!$mlw_qmn_isAllowed)
|
1423 |
+
{
|
1424 |
+
$current_user = wp_get_current_user();
|
1425 |
+
$mlw_message = htmlspecialchars_decode($mlw_quiz_options->total_user_tries_text, ENT_QUOTES);
|
1426 |
+
$mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
|
1427 |
+
$mlw_message = str_replace( "%USER_NAME%" , $current_user->display_name, $mlw_message);
|
1428 |
+
$mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
|
1429 |
+
$mlw_display .= $mlw_message;
|
1430 |
+
}
|
1431 |
+
elseif (isset($_POST["mlw_code_captcha"]) && $_POST["mlw_user_captcha"] != $_POST["mlw_code_captcha"])
|
1432 |
+
{
|
1433 |
+
$mlw_display .= "There was an issue with the captcha verification. Please try again.";
|
1434 |
+
}
|
1435 |
+
else { $mlw_display .= "Thank you."; }
|
1436 |
+
}
|
1437 |
+
}
|
1438 |
+
return $mlw_display;
|
1439 |
+
}
|
1440 |
+
|
1441 |
+
|
1442 |
+
/*
|
1443 |
+
This function displays fields to ask for contact information
|
1444 |
+
*/
|
1445 |
+
function mlwDisplayContactInfo($mlw_quiz_options)
|
1446 |
+
{
|
1447 |
+
$mlw_contact_display = "";
|
1448 |
+
//Check to see if user is logged in, then ask for contact if not
|
1449 |
+
if ( is_user_logged_in() )
|
1450 |
+
{
|
1451 |
+
//If this quiz does not let user edit contact information we hide this section
|
1452 |
+
if ($mlw_quiz_options->loggedin_user_contact == 1)
|
1453 |
+
{
|
1454 |
+
$mlw_contact_display .= "<div style='display:none;'>";
|
1455 |
+
}
|
1456 |
+
|
1457 |
+
//Retrieve current user information and save into text fields for contact information
|
1458 |
+
$current_user = wp_get_current_user();
|
1459 |
+
if ($mlw_quiz_options->user_name != 2)
|
1460 |
+
{
|
1461 |
+
$mlw_contact_class = "class=\"\"";
|
1462 |
+
if ($mlw_quiz_options->user_name == 1)
|
1463 |
+
{
|
1464 |
+
$mlw_contact_class = "class=\"mlwRequiredText\"";
|
1465 |
+
}
|
1466 |
+
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->name_field_text, ENT_QUOTES)."</span><br />";
|
1467 |
+
$mlw_contact_display .= "<input type='text' $mlw_contact_class x-webkit-speech name='mlwUserName' value='".$current_user->display_name."' />";
|
1468 |
+
$mlw_contact_display .= "<br /><br />";
|
1469 |
+
|
1470 |
+
}
|
1471 |
+
if ($mlw_quiz_options->user_comp != 2)
|
1472 |
+
{
|
1473 |
+
$mlw_contact_class = "class=\"\"";
|
1474 |
+
if ($mlw_quiz_options->user_comp == 1)
|
1475 |
+
{
|
1476 |
+
$mlw_contact_class = "class=\"mlwRequiredText\"";
|
1477 |
+
}
|
1478 |
+
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->business_field_text, ENT_QUOTES)."</span><br />";
|
1479 |
+
$mlw_contact_display .= "<input type='text' $mlw_contact_class x-webkit-speech name='mlwUserComp' value='' />";
|
1480 |
+
$mlw_contact_display .= "<br /><br />";
|
1481 |
+
}
|
1482 |
+
if ($mlw_quiz_options->user_email != 2)
|
1483 |
+
{
|
1484 |
+
$mlw_contact_class = "class=\"\"";
|
1485 |
+
if ($mlw_quiz_options->user_email == 1)
|
1486 |
+
{
|
1487 |
+
$mlw_contact_class = "class=\"mlwRequiredText\"";
|
1488 |
+
}
|
1489 |
+
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->email_field_text, ENT_QUOTES)."</span><br />";
|
1490 |
+
$mlw_contact_display .= "<input type='text' $mlw_contact_class x-webkit-speech name='mlwUserEmail' value='".$current_user->user_email."' />";
|
1491 |
+
$mlw_contact_display .= "<br /><br />";
|
1492 |
+
}
|
1493 |
+
if ($mlw_quiz_options->user_phone != 2)
|
1494 |
+
{
|
1495 |
+
$mlw_contact_class = "class=\"\"";
|
1496 |
+
if ($mlw_quiz_options->user_phone == 1)
|
1497 |
+
{
|
1498 |
+
$mlw_contact_class = "class=\"mlwRequiredText\"";
|
1499 |
+
}
|
1500 |
+
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->phone_field_text, ENT_QUOTES)."</span><br />";
|
1501 |
+
$mlw_contact_display .= "<input type='text' $mlw_contact_class x-webkit-speech name='mlwUserPhone' value='' />";
|
1502 |
+
$mlw_contact_display .= "<br /><br />";
|
1503 |
+
}
|
1504 |
+
|
1505 |
+
//End of hidden section div
|
1506 |
+
if ($mlw_quiz_options->loggedin_user_contact == 1)
|
1507 |
+
{
|
1508 |
+
$mlw_contact_display .= "</div>";
|
1509 |
+
}
|
1510 |
+
}
|
1511 |
+
else
|
1512 |
+
{
|
1513 |
+
//See if the site wants to ask for any contact information, then ask for it
|
1514 |
+
if ($mlw_quiz_options->user_name != 2)
|
1515 |
+
{
|
1516 |
+
$mlw_contact_class = "class=\"\"";
|
1517 |
+
if ($mlw_quiz_options->user_name == 1)
|
1518 |
+
{
|
1519 |
+
$mlw_contact_class = "class=\"mlwRequiredText\"";
|
1520 |
+
}
|
1521 |
+
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->name_field_text, ENT_QUOTES)."</span><br />";
|
1522 |
+
$mlw_contact_display .= "<input type='text' $mlw_contact_class x-webkit-speech name='mlwUserName' value='' />";
|
1523 |
+
$mlw_contact_display .= "<br /><br />";
|
1524 |
+
}
|
1525 |
+
if ($mlw_quiz_options->user_comp != 2)
|
1526 |
+
{
|
1527 |
+
$mlw_contact_class = "class=\"\"";
|
1528 |
+
if ($mlw_quiz_options->user_comp == 1)
|
1529 |
+
{
|
1530 |
+
$mlw_contact_class = "class=\"mlwRequiredText\"";
|
1531 |
+
}
|
1532 |
+
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->business_field_text, ENT_QUOTES)."</span><br />";
|
1533 |
+
$mlw_contact_display .= "<input type='text' $mlw_contact_class x-webkit-speech name='mlwUserComp' value='' />";
|
1534 |
+
$mlw_contact_display .= "<br /><br />";
|
1535 |
+
}
|
1536 |
+
if ($mlw_quiz_options->user_email != 2)
|
1537 |
+
{
|
1538 |
+
$mlw_contact_class = "class=\"\"";
|
1539 |
+
if ($mlw_quiz_options->user_email == 1)
|
1540 |
+
{
|
1541 |
+
$mlw_contact_class = "class=\"mlwRequiredText\"";
|
1542 |
+
}
|
1543 |
+
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->email_field_text, ENT_QUOTES)."</span><br />";
|
1544 |
+
$mlw_contact_display .= "<input type='text' $mlw_contact_class x-webkit-speech name='mlwUserEmail' value='' />";
|
1545 |
+
$mlw_contact_display .= "<br /><br />";
|
1546 |
+
}
|
1547 |
+
if ($mlw_quiz_options->user_phone != 2)
|
1548 |
+
{
|
1549 |
+
$mlw_contact_class = "class=\"\"";
|
1550 |
+
if ($mlw_quiz_options->user_phone == 1)
|
1551 |
+
{
|
1552 |
+
$mlw_contact_class = "class=\"mlwRequiredText\"";
|
1553 |
+
}
|
1554 |
+
$mlw_contact_display .= "<span style='font-weight:bold;';>".htmlspecialchars_decode($mlw_quiz_options->phone_field_text, ENT_QUOTES)."</span><br />";
|
1555 |
+
$mlw_contact_display .= "<input type='text' $mlw_contact_class x-webkit-speech name='mlwUserPhone' value='' />";
|
1556 |
+
$mlw_contact_display .= "<br /><br />";
|
1557 |
+
}
|
1558 |
+
}
|
1559 |
+
return $mlw_contact_display;
|
1560 |
+
}
|
1561 |
+
|
1562 |
+
/*
|
1563 |
+
This function helps set the email type to HTML
|
1564 |
+
*/
|
1565 |
+
function mlw_qmn_set_html_content_type() {
|
1566 |
+
|
1567 |
+
return 'text/html';
|
1568 |
+
}
|
|
|
1569 |
?>
|
mlw_quizmaster2.php
CHANGED
@@ -1,190 +1,193 @@
|
|
1 |
-
<?php
|
2 |
-
|
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.3.
|
7 |
-
Author: Frank Corso
|
8 |
-
Author URI: http://www.mylocalwebstop.com/
|
9 |
-
Plugin URI: http://www.mylocalwebstop.com/
|
10 |
-
*/
|
11 |
-
|
12 |
-
/*
|
13 |
-
Copyright 2014, My Local Webstop (email : fpcorso@mylocalwebstop.com)
|
14 |
-
|
15 |
-
Disclaimer of Warranties.
|
16 |
-
|
17 |
-
The plugin is provided "as is". My Local Webstop and its suppliers and licensors hereby disclaim all warranties of any kind,
|
18 |
-
express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose and non-infringement.
|
19 |
-
Neither My Local Webstop nor its suppliers and licensors, makes any warranty that the plugin will be error free or that access thereto will be continuous or uninterrupted.
|
20 |
-
You understand that you install, operate, and unistall the plugin at your own discretion and risk.
|
21 |
-
*/
|
22 |
-
|
23 |
-
|
24 |
-
///Files to Include
|
25 |
-
include("includes/mlw_quiz.php");
|
26 |
-
include("includes/mlw_dashboard.php");
|
27 |
-
include("includes/mlw_quiz_admin.php");
|
28 |
-
include("includes/mlw_quiz_options.php");
|
29 |
-
include("includes/mlw_quiz_install.php");
|
30 |
-
include("includes/mlw_results.php");
|
31 |
-
include("includes/mlw_results_details.php");
|
32 |
-
include("includes/mlw_tools.php");
|
33 |
-
include("includes/mlw_leaderboard.php");
|
34 |
-
include("includes/mlw_update.php");
|
35 |
-
include("includes/mlw_qmn_widgets.php");
|
36 |
-
include("includes/mlw_qmn_credits.php");
|
37 |
-
|
38 |
-
|
39 |
-
///Activation Actions
|
40 |
-
add_action('admin_menu', 'mlw_add_menu');
|
41 |
-
add_action('admin_init', 'mlw_quiz_update');
|
42 |
-
add_action('widgets_init', create_function('', 'return register_widget("Mlw_Qmn_Leaderboard_Widget");'));
|
43 |
-
add_shortcode('mlw_quizmaster', 'mlw_quiz_shortcode');
|
44 |
-
add_shortcode('mlw_quizmaster_leaderboard', 'mlw_quiz_leaderboard_shortcode');
|
45 |
-
register_activation_hook( __FILE__, 'mlw_quiz_activate');
|
46 |
-
register_deactivation_hook( __FILE__, 'mlw_quiz_deactivate');
|
47 |
-
|
48 |
-
//Setup Translations
|
49 |
-
function mlw_qmn_translation_setup() {
|
50 |
-
load_plugin_textdomain( 'mlw_qmn_text_domain', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
51 |
-
}
|
52 |
-
add_action('plugins_loaded', 'mlw_qmn_translation_setup');
|
53 |
-
|
54 |
-
|
55 |
-
///Create Admin Pages
|
56 |
-
function mlw_add_menu()
|
57 |
-
{
|
58 |
-
if (function_exists('add_menu_page'))
|
59 |
-
{
|
60 |
-
add_menu_page('Quiz Master Next', 'Quiz Dashboard', 'moderate_comments', __FILE__, 'mlw_generate_quiz_dashboard', 'dashicons-feedback');
|
61 |
-
add_submenu_page(__FILE__, 'Quizzes', 'Quizzes', 'moderate_comments', 'mlw_quiz_admin', 'mlw_generate_quiz_admin');
|
62 |
-
add_submenu_page(__FILE__, 'Quiz Settings', 'Quiz Settings', 'moderate_comments', 'mlw_quiz_options', 'mlw_generate_quiz_options');
|
63 |
-
add_submenu_page(__FILE__, 'Quiz Results', 'Quiz Results', 'moderate_comments', 'mlw_quiz_results', 'mlw_generate_quiz_results');
|
64 |
-
add_submenu_page(__FILE__, 'Quiz Result Details', 'Quiz Result Details', 'moderate_comments', 'mlw_quiz_result_details', 'mlw_generate_result_details');
|
65 |
-
add_submenu_page(__FILE__, 'Tools', 'Tools', 'manage_options', 'mlw_quiz_tools', 'mlw_generate_quiz_tools');
|
66 |
-
add_submenu_page(__FILE__, 'QMN About', 'QMN About', 'manage_options', 'mlw_qmn_about', 'mlw_generate_about_page');
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
//Admin Notice
|
72 |
-
add_action('admin_notices', 'mlw_qmn_notice');
|
73 |
-
function mlw_qmn_notice() {
|
74 |
-
if ( get_option('mlw_qmn_review_notice') == 1 && current_user_can( 'manage_options' ) )
|
75 |
-
{
|
76 |
-
echo "
|
77 |
-
<style>
|
78 |
-
div.help_decide
|
79 |
-
{
|
80 |
-
display: block;
|
81 |
-
text-align:center;
|
82 |
-
letter-spacing: 1px;
|
83 |
-
margin: auto;
|
84 |
-
text-shadow: 0 1px 1px #000000;
|
85 |
-
background: #0d97d8;
|
86 |
-
border: 5px solid #106daa;
|
87 |
-
-moz-border-radius: 20px;
|
88 |
-
-webkit-border-radius: 20px;
|
89 |
-
-khtml-border-radius: 20px;
|
90 |
-
border-radius: 20px;
|
91 |
-
color: #FFFFFF;
|
92 |
-
}
|
93 |
-
div.help_decide a
|
94 |
-
{
|
95 |
-
color: yellow;
|
96 |
-
}
|
97 |
-
</style>";
|
98 |
-
echo '<div class="help_decide"><p>';
|
99 |
-
printf(__('You have been using the Quiz Master Next plugin for a while now! Thanks for choosing to use this plugin. If it has benefited your website, please consider purchasing an <a href="http://mylocalwebstop.com/shop/">add-on</a>, giving a <a href="http://wordpress.org/support/view/plugin-reviews/quiz-master-next">review</a>, or taking this <a href="http://mylocalwebstop.com/sample-survey/" target="_blank">survey</a>. | <a href="%1$s">Hide Notice</a>'), '?page=quiz-master-next/mlw_quizmaster2.php&&mlw_qmn_ignore_notice=0');
|
100 |
-
echo "</p></div>";
|
101 |
-
}
|
102 |
-
}
|
103 |
-
//Check to see if notices should be shown or dismissed
|
104 |
-
add_action('admin_init', 'mlw_qmn_notice_ignore');
|
105 |
-
function mlw_qmn_notice_ignore() {
|
106 |
-
global $wpdb;
|
107 |
-
if ( ! get_option('mlw_qmn_review_notice'))
|
108 |
-
{
|
109 |
-
add_option('mlw_qmn_review_notice' , '0');
|
110 |
-
}
|
111 |
-
if ($wpdb->get_var( "SELECT COUNT(*) FROM ".$wpdb->prefix."mlw_results" ) >= 20 && get_option('mlw_qmn_review_notice') == 0)
|
112 |
-
{
|
113 |
-
update_option('mlw_qmn_review_notice' , '1');
|
114 |
-
}
|
115 |
-
if ( isset($_GET['mlw_qmn_ignore_notice']) && '0' == $_GET['mlw_qmn_ignore_notice'] ) {
|
116 |
-
update_option('mlw_qmn_review_notice' , '2');
|
117 |
-
}
|
118 |
-
}
|
119 |
-
function mlw_qmn_show_adverts()
|
120 |
-
{
|
121 |
-
$mlw_advert = "";
|
122 |
-
$mlw_advert_text = "";
|
123 |
-
if ( get_option('mlw_advert_shows') == 'true' )
|
124 |
-
{
|
125 |
-
$mlw_random_int = rand(0,
|
126 |
-
switch ($mlw_random_int) {
|
127 |
-
case 0:
|
128 |
-
$mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for details!";
|
129 |
-
break;
|
130 |
-
case 1:
|
131 |
-
$mlw_advert_text = "Is Quiz Master Next beneficial to your website? Please help by giving us a review on WordPress.org by going <a href=\"http://wordpress.org/support/view/plugin-reviews/quiz-master-next\">here</a>!";
|
132 |
-
break;
|
133 |
-
case 2:
|
134 |
-
$mlw_advert_text = "Want help installing and configuring one of our plugins? Check out our Plugin Installation services. Visit our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for details!";
|
135 |
-
break;
|
136 |
-
case 3:
|
137 |
-
$mlw_advert_text = "Would you like to support this plugin but do not need or want premium support? Please consider our inexpensive 'Advertisements Be Gone' add-on which will get rid of these ads. Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
|
138 |
-
break;
|
139 |
-
case 4:
|
140 |
-
$mlw_advert_text = "Need to be able to export the results of your quizzes? Be sure to check out our new Export Results add-on in our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a>!";
|
141 |
-
break;
|
142 |
-
case 5:
|
143 |
-
$mlw_advert_text = "Need help keeping your plugins, themes, and WordPress up to date? Want around the clock security monitoring and off-site back-ups? How about WordPress training videos, a monthly status report, and support/consultation? Check out our <a href=\"http://mylocalwebstop.com/wordpress-maintenance-services/\">WordPress Maintenance Services</a> for more details!";
|
144 |
-
break;
|
145 |
-
case 6:
|
146 |
-
$mlw_advert_text = "Setting up a new site? Let us take care of the set-up so you back to running your business. Check out our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for more details!";
|
147 |
-
break;
|
148 |
-
case 7:
|
149 |
-
$mlw_advert_text = "Need a page so your users can see their results from all the quizzes they have taken? Try our new User Dashboard add-on. Check out our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for more details!";
|
150 |
-
break;
|
151 |
-
|
152 |
-
$mlw_advert_text = "
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
text-
|
163 |
-
|
164 |
-
|
165 |
-
-
|
166 |
-
|
167 |
-
|
168 |
-
border-radius: 20px;
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
|
|
|
|
|
|
190 |
?>
|
1 |
+
<?php
|
2 |
+
|
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.3.3
|
7 |
+
Author: Frank Corso
|
8 |
+
Author URI: http://www.mylocalwebstop.com/
|
9 |
+
Plugin URI: http://www.mylocalwebstop.com/
|
10 |
+
*/
|
11 |
+
|
12 |
+
/*
|
13 |
+
Copyright 2014, My Local Webstop (email : fpcorso@mylocalwebstop.com)
|
14 |
+
|
15 |
+
Disclaimer of Warranties.
|
16 |
+
|
17 |
+
The plugin is provided "as is". My Local Webstop and its suppliers and licensors hereby disclaim all warranties of any kind,
|
18 |
+
express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose and non-infringement.
|
19 |
+
Neither My Local Webstop nor its suppliers and licensors, makes any warranty that the plugin will be error free or that access thereto will be continuous or uninterrupted.
|
20 |
+
You understand that you install, operate, and unistall the plugin at your own discretion and risk.
|
21 |
+
*/
|
22 |
+
|
23 |
+
|
24 |
+
///Files to Include
|
25 |
+
include("includes/mlw_quiz.php");
|
26 |
+
include("includes/mlw_dashboard.php");
|
27 |
+
include("includes/mlw_quiz_admin.php");
|
28 |
+
include("includes/mlw_quiz_options.php");
|
29 |
+
include("includes/mlw_quiz_install.php");
|
30 |
+
include("includes/mlw_results.php");
|
31 |
+
include("includes/mlw_results_details.php");
|
32 |
+
include("includes/mlw_tools.php");
|
33 |
+
include("includes/mlw_leaderboard.php");
|
34 |
+
include("includes/mlw_update.php");
|
35 |
+
include("includes/mlw_qmn_widgets.php");
|
36 |
+
include("includes/mlw_qmn_credits.php");
|
37 |
+
|
38 |
+
|
39 |
+
///Activation Actions
|
40 |
+
add_action('admin_menu', 'mlw_add_menu');
|
41 |
+
add_action('admin_init', 'mlw_quiz_update');
|
42 |
+
add_action('widgets_init', create_function('', 'return register_widget("Mlw_Qmn_Leaderboard_Widget");'));
|
43 |
+
add_shortcode('mlw_quizmaster', 'mlw_quiz_shortcode');
|
44 |
+
add_shortcode('mlw_quizmaster_leaderboard', 'mlw_quiz_leaderboard_shortcode');
|
45 |
+
register_activation_hook( __FILE__, 'mlw_quiz_activate');
|
46 |
+
register_deactivation_hook( __FILE__, 'mlw_quiz_deactivate');
|
47 |
+
|
48 |
+
//Setup Translations
|
49 |
+
function mlw_qmn_translation_setup() {
|
50 |
+
load_plugin_textdomain( 'mlw_qmn_text_domain', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
51 |
+
}
|
52 |
+
add_action('plugins_loaded', 'mlw_qmn_translation_setup');
|
53 |
+
|
54 |
+
|
55 |
+
///Create Admin Pages
|
56 |
+
function mlw_add_menu()
|
57 |
+
{
|
58 |
+
if (function_exists('add_menu_page'))
|
59 |
+
{
|
60 |
+
add_menu_page('Quiz Master Next', 'Quiz Dashboard', 'moderate_comments', __FILE__, 'mlw_generate_quiz_dashboard', 'dashicons-feedback');
|
61 |
+
add_submenu_page(__FILE__, 'Quizzes', 'Quizzes', 'moderate_comments', 'mlw_quiz_admin', 'mlw_generate_quiz_admin');
|
62 |
+
add_submenu_page(__FILE__, 'Quiz Settings', 'Quiz Settings', 'moderate_comments', 'mlw_quiz_options', 'mlw_generate_quiz_options');
|
63 |
+
add_submenu_page(__FILE__, 'Quiz Results', 'Quiz Results', 'moderate_comments', 'mlw_quiz_results', 'mlw_generate_quiz_results');
|
64 |
+
add_submenu_page(__FILE__, 'Quiz Result Details', 'Quiz Result Details', 'moderate_comments', 'mlw_quiz_result_details', 'mlw_generate_result_details');
|
65 |
+
add_submenu_page(__FILE__, 'Tools', 'Tools', 'manage_options', 'mlw_quiz_tools', 'mlw_generate_quiz_tools');
|
66 |
+
add_submenu_page(__FILE__, 'QMN About', 'QMN About', 'manage_options', 'mlw_qmn_about', 'mlw_generate_about_page');
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
//Admin Notice
|
72 |
+
add_action('admin_notices', 'mlw_qmn_notice');
|
73 |
+
function mlw_qmn_notice() {
|
74 |
+
if ( get_option('mlw_qmn_review_notice') == 1 && current_user_can( 'manage_options' ) )
|
75 |
+
{
|
76 |
+
echo "
|
77 |
+
<style>
|
78 |
+
div.help_decide
|
79 |
+
{
|
80 |
+
display: block;
|
81 |
+
text-align:center;
|
82 |
+
letter-spacing: 1px;
|
83 |
+
margin: auto;
|
84 |
+
text-shadow: 0 1px 1px #000000;
|
85 |
+
background: #0d97d8;
|
86 |
+
border: 5px solid #106daa;
|
87 |
+
-moz-border-radius: 20px;
|
88 |
+
-webkit-border-radius: 20px;
|
89 |
+
-khtml-border-radius: 20px;
|
90 |
+
border-radius: 20px;
|
91 |
+
color: #FFFFFF;
|
92 |
+
}
|
93 |
+
div.help_decide a
|
94 |
+
{
|
95 |
+
color: yellow;
|
96 |
+
}
|
97 |
+
</style>";
|
98 |
+
echo '<div class="help_decide"><p>';
|
99 |
+
printf(__('You have been using the Quiz Master Next plugin for a while now! Thanks for choosing to use this plugin. If it has benefited your website, please consider purchasing an <a href="http://mylocalwebstop.com/shop/">add-on</a>, giving a <a href="http://wordpress.org/support/view/plugin-reviews/quiz-master-next">review</a>, or taking this <a href="http://mylocalwebstop.com/sample-survey/" target="_blank">survey</a>. | <a href="%1$s">Hide Notice</a>'), '?page=quiz-master-next/mlw_quizmaster2.php&&mlw_qmn_ignore_notice=0');
|
100 |
+
echo "</p></div>";
|
101 |
+
}
|
102 |
+
}
|
103 |
+
//Check to see if notices should be shown or dismissed
|
104 |
+
add_action('admin_init', 'mlw_qmn_notice_ignore');
|
105 |
+
function mlw_qmn_notice_ignore() {
|
106 |
+
global $wpdb;
|
107 |
+
if ( ! get_option('mlw_qmn_review_notice'))
|
108 |
+
{
|
109 |
+
add_option('mlw_qmn_review_notice' , '0');
|
110 |
+
}
|
111 |
+
if ($wpdb->get_var( "SELECT COUNT(*) FROM ".$wpdb->prefix."mlw_results" ) >= 20 && get_option('mlw_qmn_review_notice') == 0)
|
112 |
+
{
|
113 |
+
update_option('mlw_qmn_review_notice' , '1');
|
114 |
+
}
|
115 |
+
if ( isset($_GET['mlw_qmn_ignore_notice']) && '0' == $_GET['mlw_qmn_ignore_notice'] ) {
|
116 |
+
update_option('mlw_qmn_review_notice' , '2');
|
117 |
+
}
|
118 |
+
}
|
119 |
+
function mlw_qmn_show_adverts()
|
120 |
+
{
|
121 |
+
$mlw_advert = "";
|
122 |
+
$mlw_advert_text = "";
|
123 |
+
if ( get_option('mlw_advert_shows') == 'true' )
|
124 |
+
{
|
125 |
+
$mlw_random_int = rand(0, 8);
|
126 |
+
switch ($mlw_random_int) {
|
127 |
+
case 0:
|
128 |
+
$mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for details!";
|
129 |
+
break;
|
130 |
+
case 1:
|
131 |
+
$mlw_advert_text = "Is Quiz Master Next beneficial to your website? Please help by giving us a review on WordPress.org by going <a href=\"http://wordpress.org/support/view/plugin-reviews/quiz-master-next\">here</a>!";
|
132 |
+
break;
|
133 |
+
case 2:
|
134 |
+
$mlw_advert_text = "Want help installing and configuring one of our plugins? Check out our Plugin Installation services. Visit our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for details!";
|
135 |
+
break;
|
136 |
+
case 3:
|
137 |
+
$mlw_advert_text = "Would you like to support this plugin but do not need or want premium support? Please consider our inexpensive 'Advertisements Be Gone' add-on which will get rid of these ads. Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
|
138 |
+
break;
|
139 |
+
case 4:
|
140 |
+
$mlw_advert_text = "Need to be able to export the results of your quizzes? Be sure to check out our new Export Results add-on in our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a>!";
|
141 |
+
break;
|
142 |
+
case 5:
|
143 |
+
$mlw_advert_text = "Need help keeping your plugins, themes, and WordPress up to date? Want around the clock security monitoring and off-site back-ups? How about WordPress training videos, a monthly status report, and support/consultation? Check out our <a href=\"http://mylocalwebstop.com/wordpress-maintenance-services/\">WordPress Maintenance Services</a> for more details!";
|
144 |
+
break;
|
145 |
+
case 6:
|
146 |
+
$mlw_advert_text = "Setting up a new site? Let us take care of the set-up so you back to running your business. Check out our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for more details!";
|
147 |
+
break;
|
148 |
+
case 7:
|
149 |
+
$mlw_advert_text = "Need a page so your users can see their results from all the quizzes they have taken? Try our new User Dashboard add-on. Check out our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for more details!";
|
150 |
+
break;
|
151 |
+
case 8:
|
152 |
+
$mlw_advert_text = "Our new Popular Add-On Pack is now only $45 for 6 add-ons! Now is the time to save almost 50%! Visit our <a href=\"http://mylocalwebstop.com/shop/\">WordPress Store</a> for details.";
|
153 |
+
break;
|
154 |
+
default:
|
155 |
+
$mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
|
156 |
+
}
|
157 |
+
$mlw_advert .= "
|
158 |
+
<style>
|
159 |
+
div.help_decide
|
160 |
+
{
|
161 |
+
display: block;
|
162 |
+
text-align:center;
|
163 |
+
letter-spacing: 1px;
|
164 |
+
margin: auto;
|
165 |
+
text-shadow: 0 1px 1px #000000;
|
166 |
+
background: #0d97d8;
|
167 |
+
border: 5px solid #106daa;
|
168 |
+
-moz-border-radius: 20px;
|
169 |
+
-webkit-border-radius: 20px;
|
170 |
+
-khtml-border-radius: 20px;
|
171 |
+
border-radius: 20px;
|
172 |
+
color: #FFFFFF;
|
173 |
+
}
|
174 |
+
div.help_decide a
|
175 |
+
{
|
176 |
+
color: yellow;
|
177 |
+
}
|
178 |
+
</style>";
|
179 |
+
$mlw_advert .= "
|
180 |
+
<div class=\"help_decide\">
|
181 |
+
<p>$mlw_advert_text</p>
|
182 |
+
</div>";
|
183 |
+
}
|
184 |
+
return $mlw_advert;
|
185 |
+
}
|
186 |
+
|
187 |
+
|
188 |
+
|
189 |
+
/*
|
190 |
+
|
191 |
+
|
192 |
+
*/
|
193 |
?>
|
readme.txt
CHANGED
@@ -1,709 +1,717 @@
|
|
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.8.1
|
6 |
-
Tested up to: 4.0
|
7 |
-
Stable tag: 3.3.
|
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.
|
18 |
-
|
19 |
-
= Customize Your Text =
|
20 |
-
All the text your users see can be **customized**. Everything from the text blocks throughout the quiz to the submit button.
|
21 |
-
|
22 |
-
= Different Types Of Questions =
|
23 |
-
You can have **multiple choice** (radio buttons), **true and false**, **open answer** question, **drop down**, **multiple response** (checkboxes), **number**, **captcha**, and **accept**. More types are being supported in future updates!
|
24 |
-
|
25 |
-
= Mulitple Landing Pages For Each Quiz =
|
26 |
-
Each quiz can have **unlimited** results pages that can be customized with your text. Show different results pages based on the users score!
|
27 |
-
|
28 |
-
= Emails After Completion Of Quiz =
|
29 |
-
After the user takes a quiz, you can have the plugin email you and the user with results. This too can be customized with your own text.
|
30 |
-
|
31 |
-
= Very Flexible =
|
32 |
-
Your quiz can be graded with an incorrect/correct system or a points-based system. Or not at all. You ask for contact information at the beginning or the end and you decide which contact fields are required. You can decide to use all the questions or only a select few chosen at random. You can also set the number of questions per page or have all the questions on one page.
|
33 |
-
|
34 |
-
= Useful For Businesses =
|
35 |
-
The plugin features useful **statistics** that show how many times each quiz has been viewed and taken and plots the data on several different **graphs** so you can see how the quizzes are doing at a glance. Also, the plugin includes an **audit trail** that logs every action done on the admin side so you can keep up with who is doing what!
|
36 |
-
|
37 |
-
= Saves The Results For Later Use =
|
38 |
-
The plugin will **save** the results, the user's answers, the user's comments, and more!
|
39 |
-
|
40 |
-
= Other Useful Features =
|
41 |
-
|
42 |
-
* Allow the user to share the results on *social networks*
|
43 |
-
* Show all questions on one page or have only one question per page
|
44 |
-
* Allows for you to create **certificates** for the user
|
45 |
-
* Can set amount of tries a user has to take the quiz
|
46 |
-
* Can enable **comment boxes** for each question and/or comment section at the end of the quiz
|
47 |
-
* Can enable **hints** for questions
|
48 |
-
* Can show user why the answer is the correct answer
|
49 |
-
* Questions can be in predetermined order or random
|
50 |
-
* **Leaderboards** for every quiz which can be used as shortcode or in included widget
|
51 |
-
* Keep track how long a user takes on the quiz
|
52 |
-
* Able to set up time limits on the quiz
|
53 |
-
* And **Much** More...
|
54 |
-
|
55 |
-
= Quiz Master Next Add-ons =
|
56 |
-
While Quiz Master Next is fully functional and is packed full of features that will meet the needs of most, we do offer vaious extra features and support available in our [Wordpress Store](http://mylocalwebstop.com/shop/)
|
57 |
-
|
58 |
-
|
59 |
-
== Installation ==
|
60 |
-
|
61 |
-
We now offer an installation service to assist you in this process. We will install any or all of our plugins and spend up to 2 hours with you for consultaion and training. Visit our website for details.
|
62 |
-
[My Local Webstop Plugin Installation](http://mylocalwebstop.com/product/plugin-installation/)
|
63 |
-
|
64 |
-
**Or**
|
65 |
-
|
66 |
-
* Navigate to Add New Plugin page within your WordPress
|
67 |
-
* Search for Quiz Master Next
|
68 |
-
* Click Install Now link on the plugin and follow the prompts
|
69 |
-
* Activate the plugin through the 'Plugins' menu in WordPress
|
70 |
-
|
71 |
-
**Or**
|
72 |
-
|
73 |
-
* Upload plugin dir to the `/wp-content/plugins/` directory
|
74 |
-
* Activate the plugin through the 'Plugins' menu in WordPress
|
75 |
-
|
76 |
-
|
77 |
-
== Frequently Asked Questions ==
|
78 |
-
|
79 |
-
= What does the option do on that page? =
|
80 |
-
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.
|
81 |
-
|
82 |
-
= How do you use that feature? =
|
83 |
-
We have begun creating documentation for the plugin. You can view the documentation here: [Documentation](http://mylocalwebstop.com/plugin-documentation/) If you still have any trouble, feel free to use the widget on the quiz dashboard within the plugin to contact me and I will help you.
|
84 |
-
|
85 |
-
= I need a lot of help setting up my quiz, what can you do to help? =
|
86 |
-
We now offer a premium support plan that offers priority response, priority feature requests, and 1-on-1 training! For details, visit our services page: [My Local Webstop Services](http://mylocalwebstop.com/product/plugin-premium-support/)
|
87 |
-
|
88 |
-
= Do you offer any 1-on-1 training to assist me in using this plugin? =
|
89 |
-
We now offer an installation service that includes 1-on-1 training as well as a premium support that offers 1-on-1 training. For details, visit our [Wordpress Store](http://mylocalwebstop.com/shop/)
|
90 |
-
|
91 |
-
= I have an idea, how do I contact you? =
|
92 |
-
Feel free to use the widget on the quiz dashboard within the plugin or from the contact page at mylocalwebstop.com.
|
93 |
-
|
94 |
-
== Screenshots ==
|
95 |
-
|
96 |
-
1. Quiz Admin Page (With Advertisement Be Gone Add-On)
|
97 |
-
2. Quiz Options Page (With Advertisement Be Gone Add-On)
|
98 |
-
3. Quiz Dashboard Page (With Advertisement Be Gone Add-On)
|
99 |
-
4. Example Quiz
|
100 |
-
5. Example Survey
|
101 |
-
6. Quiz Results Page
|
102 |
-
7. Example Contact Form
|
103 |
-
8. Example Quiz With Styling
|
104 |
-
|
105 |
-
== Changelog ==
|
106 |
-
|
107 |
-
= 3.3.
|
108 |
-
* Minor
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
*
|
114 |
-
|
115 |
-
|
116 |
-
*
|
117 |
-
*
|
118 |
-
|
119 |
-
|
120 |
-
*
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
*
|
126 |
-
|
127 |
-
= 3.
|
128 |
-
* Added
|
129 |
-
*
|
130 |
-
*
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
* Added
|
135 |
-
* Added
|
136 |
-
* Added
|
137 |
-
|
138 |
-
|
139 |
-
*
|
140 |
-
*
|
141 |
-
|
142 |
-
|
143 |
-
*
|
144 |
-
*
|
145 |
-
*
|
146 |
-
|
147 |
-
|
148 |
-
*
|
149 |
-
*
|
150 |
-
|
151 |
-
|
152 |
-
*
|
153 |
-
*
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
*
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
*
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
* Fixed
|
181 |
-
* Fixed
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
* Bug
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
* Added
|
200 |
-
*
|
201 |
-
|
202 |
-
|
203 |
-
*
|
204 |
-
|
205 |
-
|
206 |
-
* Added New
|
207 |
-
* Added Ability To Send
|
208 |
-
*
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
* Added Ability To
|
213 |
-
*
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
*
|
222 |
-
|
223 |
-
|
224 |
-
*
|
225 |
-
|
226 |
-
|
227 |
-
*
|
228 |
-
*
|
229 |
-
*
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
*
|
234 |
-
*
|
235 |
-
*
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
*
|
240 |
-
* Fixed
|
241 |
-
*
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
* Fixed Bug
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
*
|
257 |
-
|
258 |
-
|
259 |
-
* Added
|
260 |
-
|
261 |
-
|
262 |
-
*
|
263 |
-
*
|
264 |
-
* Added
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
*
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
*
|
275 |
-
|
276 |
-
|
277 |
-
*
|
278 |
-
*
|
279 |
-
*
|
280 |
-
*
|
281 |
-
*
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
*
|
286 |
-
*
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
*
|
293 |
-
*
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
*
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
*
|
302 |
-
*
|
303 |
-
|
304 |
-
|
305 |
-
*
|
306 |
-
|
307 |
-
|
308 |
-
*
|
309 |
-
* Fixed
|
310 |
-
*
|
311 |
-
|
312 |
-
|
313 |
-
*
|
314 |
-
|
315 |
-
|
316 |
-
* Fixed
|
317 |
-
*
|
318 |
-
*
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
*
|
323 |
-
*
|
324 |
-
* Minor
|
325 |
-
|
326 |
-
= 1.
|
327 |
-
*
|
328 |
-
*
|
329 |
-
*
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
* Fixed
|
334 |
-
*
|
335 |
-
* Added
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
*
|
340 |
-
* Added
|
341 |
-
* Added
|
342 |
-
|
343 |
-
|
344 |
-
*
|
345 |
-
|
346 |
-
|
347 |
-
*
|
348 |
-
* Fixed
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
*
|
353 |
-
*
|
354 |
-
|
355 |
-
= 0
|
356 |
-
*
|
357 |
-
*
|
358 |
-
*
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
* Added
|
363 |
-
* Added Ability To
|
364 |
-
*
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
*
|
370 |
-
*
|
371 |
-
*
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
*
|
376 |
-
*
|
377 |
-
*
|
378 |
-
|
379 |
-
|
380 |
-
*
|
381 |
-
*
|
382 |
-
|
383 |
-
|
384 |
-
*
|
385 |
-
*
|
386 |
-
* Minor Design Changes
|
387 |
-
|
388 |
-
= 0.9.
|
389 |
-
* Added Ability To
|
390 |
-
*
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
*
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
*
|
399 |
-
*
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
*
|
404 |
-
*
|
405 |
-
*
|
406 |
-
|
407 |
-
= 0.9 (January
|
408 |
-
*
|
409 |
-
*
|
410 |
-
* Added
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
*
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
* Bug Fixes
|
421 |
-
|
422 |
-
= 0.8.
|
423 |
-
* New
|
424 |
-
*
|
425 |
-
* Bug Fixes
|
426 |
-
|
427 |
-
= 0.8.
|
428 |
-
*
|
429 |
-
*
|
430 |
-
*
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
*
|
435 |
-
*
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
*
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
*
|
448 |
-
* Added New Section On How-To Page
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
*
|
453 |
-
* Added New
|
454 |
-
|
455 |
-
= 0.7 (November
|
456 |
-
*
|
457 |
-
*
|
458 |
-
*
|
459 |
-
|
460 |
-
= 0.
|
461 |
-
* Bug Fixes
|
462 |
-
*
|
463 |
-
*
|
464 |
-
|
465 |
-
= 0.6.
|
466 |
-
* Bug Fixes
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
*
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
*
|
476 |
-
*
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
* Added
|
488 |
-
*
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
*
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
*
|
509 |
-
*
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
*
|
514 |
-
* Added
|
515 |
-
*
|
516 |
-
|
517 |
-
|
518 |
-
*
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
Initial Version
|
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.8.1
|
6 |
+
Tested up to: 4.0
|
7 |
+
Stable tag: 3.3.3
|
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.
|
18 |
+
|
19 |
+
= Customize Your Text =
|
20 |
+
All the text your users see can be **customized**. Everything from the text blocks throughout the quiz to the submit button.
|
21 |
+
|
22 |
+
= Different Types Of Questions =
|
23 |
+
You can have **multiple choice** (radio buttons), **true and false**, **open answer** question, **drop down**, **multiple response** (checkboxes), **number**, **captcha**, and **accept**. More types are being supported in future updates!
|
24 |
+
|
25 |
+
= Mulitple Landing Pages For Each Quiz =
|
26 |
+
Each quiz can have **unlimited** results pages that can be customized with your text. Show different results pages based on the users score!
|
27 |
+
|
28 |
+
= Emails After Completion Of Quiz =
|
29 |
+
After the user takes a quiz, you can have the plugin email you and the user with results. This too can be customized with your own text.
|
30 |
+
|
31 |
+
= Very Flexible =
|
32 |
+
Your quiz can be graded with an incorrect/correct system or a points-based system. Or not at all. You ask for contact information at the beginning or the end and you decide which contact fields are required. You can decide to use all the questions or only a select few chosen at random. You can also set the number of questions per page or have all the questions on one page.
|
33 |
+
|
34 |
+
= Useful For Businesses =
|
35 |
+
The plugin features useful **statistics** that show how many times each quiz has been viewed and taken and plots the data on several different **graphs** so you can see how the quizzes are doing at a glance. Also, the plugin includes an **audit trail** that logs every action done on the admin side so you can keep up with who is doing what!
|
36 |
+
|
37 |
+
= Saves The Results For Later Use =
|
38 |
+
The plugin will **save** the results, the user's answers, the user's comments, and more!
|
39 |
+
|
40 |
+
= Other Useful Features =
|
41 |
+
|
42 |
+
* Allow the user to share the results on *social networks*
|
43 |
+
* Show all questions on one page or have only one question per page
|
44 |
+
* Allows for you to create **certificates** for the user
|
45 |
+
* Can set amount of tries a user has to take the quiz
|
46 |
+
* Can enable **comment boxes** for each question and/or comment section at the end of the quiz
|
47 |
+
* Can enable **hints** for questions
|
48 |
+
* Can show user why the answer is the correct answer
|
49 |
+
* Questions can be in predetermined order or random
|
50 |
+
* **Leaderboards** for every quiz which can be used as shortcode or in included widget
|
51 |
+
* Keep track how long a user takes on the quiz
|
52 |
+
* Able to set up time limits on the quiz
|
53 |
+
* And **Much** More...
|
54 |
+
|
55 |
+
= Quiz Master Next Add-ons =
|
56 |
+
While Quiz Master Next is fully functional and is packed full of features that will meet the needs of most, we do offer vaious extra features and support available in our [Wordpress Store](http://mylocalwebstop.com/shop/)
|
57 |
+
|
58 |
+
|
59 |
+
== Installation ==
|
60 |
+
|
61 |
+
We now offer an installation service to assist you in this process. We will install any or all of our plugins and spend up to 2 hours with you for consultaion and training. Visit our website for details.
|
62 |
+
[My Local Webstop Plugin Installation](http://mylocalwebstop.com/product/plugin-installation/)
|
63 |
+
|
64 |
+
**Or**
|
65 |
+
|
66 |
+
* Navigate to Add New Plugin page within your WordPress
|
67 |
+
* Search for Quiz Master Next
|
68 |
+
* Click Install Now link on the plugin and follow the prompts
|
69 |
+
* Activate the plugin through the 'Plugins' menu in WordPress
|
70 |
+
|
71 |
+
**Or**
|
72 |
+
|
73 |
+
* Upload plugin dir to the `/wp-content/plugins/` directory
|
74 |
+
* Activate the plugin through the 'Plugins' menu in WordPress
|
75 |
+
|
76 |
+
|
77 |
+
== Frequently Asked Questions ==
|
78 |
+
|
79 |
+
= What does the option do on that page? =
|
80 |
+
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.
|
81 |
+
|
82 |
+
= How do you use that feature? =
|
83 |
+
We have begun creating documentation for the plugin. You can view the documentation here: [Documentation](http://mylocalwebstop.com/plugin-documentation/) If you still have any trouble, feel free to use the widget on the quiz dashboard within the plugin to contact me and I will help you.
|
84 |
+
|
85 |
+
= I need a lot of help setting up my quiz, what can you do to help? =
|
86 |
+
We now offer a premium support plan that offers priority response, priority feature requests, and 1-on-1 training! For details, visit our services page: [My Local Webstop Services](http://mylocalwebstop.com/product/plugin-premium-support/)
|
87 |
+
|
88 |
+
= Do you offer any 1-on-1 training to assist me in using this plugin? =
|
89 |
+
We now offer an installation service that includes 1-on-1 training as well as a premium support that offers 1-on-1 training. For details, visit our [Wordpress Store](http://mylocalwebstop.com/shop/)
|
90 |
+
|
91 |
+
= I have an idea, how do I contact you? =
|
92 |
+
Feel free to use the widget on the quiz dashboard within the plugin or from the contact page at mylocalwebstop.com.
|
93 |
+
|
94 |
+
== Screenshots ==
|
95 |
+
|
96 |
+
1. Quiz Admin Page (With Advertisement Be Gone Add-On)
|
97 |
+
2. Quiz Options Page (With Advertisement Be Gone Add-On)
|
98 |
+
3. Quiz Dashboard Page (With Advertisement Be Gone Add-On)
|
99 |
+
4. Example Quiz
|
100 |
+
5. Example Survey
|
101 |
+
6. Quiz Results Page
|
102 |
+
7. Example Contact Form
|
103 |
+
8. Example Quiz With Styling
|
104 |
+
|
105 |
+
== Changelog ==
|
106 |
+
|
107 |
+
= 3.3.3 (November 14, 2014) =
|
108 |
+
* Minor Backend Change To Quiz Validation
|
109 |
+
* Disabled Enter Key On Quiz
|
110 |
+
* Minor Bug Fixes
|
111 |
+
|
112 |
+
= 3.3.2 (October 26, 2014) =
|
113 |
+
* Minor Design Change To Quiz Options
|
114 |
+
|
115 |
+
= 3.3.1 (October 15, 2014) =
|
116 |
+
* Added Horizontal Multiple Response Question Type
|
117 |
+
* Added Ability To Duplicate Questions When Duplicate Quizzes
|
118 |
+
* Added Last Modified Column To Table On Quizzes Page
|
119 |
+
* Fixed Number Question Type Grading Bug
|
120 |
+
* Fixed Missing theme_selected Column Installation Bug
|
121 |
+
* Fixed Missing theme_selected Column Duplication Bug
|
122 |
+
* Fixed Numerous Small Bugs
|
123 |
+
|
124 |
+
= 3.2.2 (October 4, 2014) =
|
125 |
+
* Minor Bug Fixes
|
126 |
+
|
127 |
+
= 3.2.1 (October 2, 2014) =
|
128 |
+
* Added New Captcha Question Type
|
129 |
+
* Fixed Number Question Type Validation Bug
|
130 |
+
* Fixed Validation Wrong Border Bug
|
131 |
+
|
132 |
+
= 3.1.1 (September 15, 2014) =
|
133 |
+
* Added Ability To Duplicate Individual Questions
|
134 |
+
* Added Ability To Require Accept, Number, And Open Answer Question Types
|
135 |
+
* Added Number Question Type
|
136 |
+
* Added Accept Non-Question Type
|
137 |
+
|
138 |
+
= 3.0.1 (August 28, 2014) =
|
139 |
+
* Added New Style Manager
|
140 |
+
* Added Ability For Non-Question Question Types
|
141 |
+
* Added New Text Block Question Type
|
142 |
+
* Added Question Type Column To Question List
|
143 |
+
* Minor Design Changes To Quiz Questions Tab
|
144 |
+
* Fixed Results Delete Link Not Working Bug
|
145 |
+
* Fixed Quiz Name Showing Escaped Values Bug
|
146 |
+
|
147 |
+
= 2.9.1 (August 11, 2014) =
|
148 |
+
* Added Facebook Sharing
|
149 |
+
* Added Ability To Edit Email Subject
|
150 |
+
* Added Large Open Answer Question Type
|
151 |
+
* Added Ability For Points To Have Decimal Values
|
152 |
+
* Fixed Not All Questions Showing In Results Bug
|
153 |
+
* Fixed Not Valid Email On Non-Required Email Bug
|
154 |
+
* Fixed Special Character Not Grading Properly In Open Answer Bug
|
155 |
+
|
156 |
+
= 2.8.5 (August 9, 2014) =
|
157 |
+
* Minor Bug Fixes
|
158 |
+
* Minor Design Tweaks To About Page
|
159 |
+
|
160 |
+
= 2.8.4 (August 3, 2014) =
|
161 |
+
* Minor Bug Fixes
|
162 |
+
|
163 |
+
= 2.8.3 (June 8, 2014) =
|
164 |
+
* Next/Previous Buttons Now Scroll Page To Top Of Quiz
|
165 |
+
* Minor Bug Fixes
|
166 |
+
|
167 |
+
= 2.8.2 (May 28, 2014) =
|
168 |
+
* Minor Bug Fixes
|
169 |
+
|
170 |
+
= 2.8.1 (May 26, 2014) =
|
171 |
+
* Took Out Help Related Tool Tips
|
172 |
+
* Design Changes To Quiz Text Tab For Easier Navigation
|
173 |
+
* Deleted How-To Page, Please Use Documentation On Our Website
|
174 |
+
* Renamed Quiz Options Page As Quiz Settings To Avoid Confusion With Quiz Options Tab
|
175 |
+
|
176 |
+
= 2.7.3 (May 19, 2014) =
|
177 |
+
* Fixed Open Answer Not Showing Correct Answer Bug
|
178 |
+
|
179 |
+
= 2.7.2 (May 18, 2014) =
|
180 |
+
* Fixed Timer Not Restarting Bug
|
181 |
+
* Fixed Tooltip Affecting Whole Page Bug
|
182 |
+
|
183 |
+
= 2.7.1 (May 16, 2014) =
|
184 |
+
* Added Ability To Set Number Of Question Per Page
|
185 |
+
* Fixed HTML Not Showing On Results Page Bug
|
186 |
+
* Fixed Timer Not Disabling New Fields Bug
|
187 |
+
* Fixed Timer Submitting Disabled Fields Bug
|
188 |
+
|
189 |
+
= 2.6.4 (May 12, 2014) =
|
190 |
+
* Bug Fixes
|
191 |
+
|
192 |
+
= 2.6.3 (May 9, 2014) =
|
193 |
+
* Bug Fixes
|
194 |
+
|
195 |
+
= 2.6.2 (May 8, 2014) =
|
196 |
+
* Bug Fixes
|
197 |
+
|
198 |
+
= 2.6.1 (May 7, 2014) =
|
199 |
+
* Added UTF-8 Support For Special Characters And Non-Latin Languages
|
200 |
+
* Fixed Question Bank Showing All Answers Bug
|
201 |
+
|
202 |
+
= 2.5.1 (May 3, 2014) =
|
203 |
+
* Rebuilt Answer System
|
204 |
+
* Added Ability To Have Unlimited Answers
|
205 |
+
* Added Ability To Randomize Answers
|
206 |
+
* Added New Question Type - Multiple Response (Checkboxes)
|
207 |
+
* Added Ability To Send Admin Email To Multiple Users
|
208 |
+
* Minor Design Changes To Quiz Options Page
|
209 |
+
|
210 |
+
= 2.4.1 (April 20, 2014) =
|
211 |
+
* Added New Quiz Emails Tab
|
212 |
+
* Added Ability To Send Different Emails To Users Based On Score
|
213 |
+
* Fixed Required Question Bug
|
214 |
+
* Fixed Landing Page Bug
|
215 |
+
|
216 |
+
= 2.3.1 (April 6, 2014) =
|
217 |
+
* Added Ability To Have Graded Open Answer Questions
|
218 |
+
* Minor Design Changes
|
219 |
+
|
220 |
+
= 2.2.2 (March 30, 2014) =
|
221 |
+
* Reverted To Previous Pagination Javascript
|
222 |
+
|
223 |
+
= 2.2.1 (March 30, 2014) =
|
224 |
+
* Added Ability To Show Question Numbers
|
225 |
+
* Added More CSS Classes To Quiz Page For Better Styling Options
|
226 |
+
* Changed Timer To Disable Fields Instead Of Submit Form When Time Is Up
|
227 |
+
* Fixed Pagination Javascript Bug
|
228 |
+
* Minor Design Change To Quiz
|
229 |
+
* Minor Design Change To Quiz Options Page
|
230 |
+
|
231 |
+
= 2.1.1 (March 26, 2014) =
|
232 |
+
* Added Ability To Edit Style For Each Quiz
|
233 |
+
* Fixed Tried Quiz Too Many Times Text Bug
|
234 |
+
* Fixed Dashboard Quartely Widget Bug
|
235 |
+
* Minor Design Changes To Quiz Options Page
|
236 |
+
|
237 |
+
= 2.0.1 (March 22, 2014) =
|
238 |
+
* Added Pagination On Quiz Results Page
|
239 |
+
* Redesigned Results Detail Page
|
240 |
+
* Fixed PHP Notice On Quizzes Page
|
241 |
+
* Allow HTML/CSS in Landing Pages
|
242 |
+
|
243 |
+
= 1.9.6 (March 19, 2014) =
|
244 |
+
* Fixed Duplicate Quiz Bug
|
245 |
+
* Fixed Uneditable Question Bug
|
246 |
+
* Fixed Parse Bug
|
247 |
+
* Made Email Now Send As HTML
|
248 |
+
|
249 |
+
= 1.9.5 (March 18, 2014) =
|
250 |
+
* Fixed Bug
|
251 |
+
|
252 |
+
= 1.9.4 (March 18, 2014) =
|
253 |
+
* Fixed Bug
|
254 |
+
|
255 |
+
= 1.9.3 (March 17, 2014) =
|
256 |
+
* Fixed Bug: Unexpected T_CONSTANT_ENCAPSED_STRING When Activating
|
257 |
+
|
258 |
+
= 1.9.2 (March 17, 2014) =
|
259 |
+
* Added Ability To Delete Landing Pages
|
260 |
+
* Added Ability To Have HTML In Correct Answer Info Field
|
261 |
+
* Added Previous Question Button To Paginated Quiz
|
262 |
+
* Minor Design Changes To Quiz
|
263 |
+
* Add Timer To Title Bar
|
264 |
+
* Added %CURRENT_DATE% field
|
265 |
+
|
266 |
+
= 1.9.1 (March 13, 2014) =
|
267 |
+
* Added Ability To Show One Question At A Time Instead Of All At Once
|
268 |
+
* Added Ability To Allow Users To Share Results On Twitter
|
269 |
+
* Added Ability To Set Time Limits On Quiz
|
270 |
+
* Minor Design Changes To Quiz
|
271 |
+
* Minor Bug Fixes
|
272 |
+
|
273 |
+
= 1.8.2 (March 11, 2014) =
|
274 |
+
* Minor Bug Fixes
|
275 |
+
|
276 |
+
= 1.8.1 (March 10, 2014) =
|
277 |
+
* Added Customizable Text Section At End Of Quiz
|
278 |
+
* Added Ability To Set Up Different Landing Pages Based On Score
|
279 |
+
* Added Ability To Give Certificate After Quiz
|
280 |
+
* Enhanced Quiz Total Stats Widget
|
281 |
+
* Minor Design Changes To Quiz
|
282 |
+
* Fixed Session_Start Bug
|
283 |
+
* Fixed Division By Zero Bug
|
284 |
+
* Fixed Total Stats Deleted Bug
|
285 |
+
* Fixed Dashboard Rounding Bug
|
286 |
+
* Fixed Notice Unknown Company Field Bug
|
287 |
+
|
288 |
+
|
289 |
+
= 1.7.1 (March 6, 2014) =
|
290 |
+
* Added Several New Widgets To Quiz Dashboard
|
291 |
+
* Added A Timer Mechanism To Track How Long User Takes On Quiz
|
292 |
+
* Added New About Update Page
|
293 |
+
* Fixed Saving Results Bug
|
294 |
+
* Fixed Random Number On Quiz Options Page Bug
|
295 |
+
|
296 |
+
= 1.6.3 (March 5, 2014) =
|
297 |
+
* Fixed Duplicated Shortcode Bug
|
298 |
+
* Quiz Dashboard Design Changes
|
299 |
+
|
300 |
+
= 1.6.2 (March 4, 2014) =
|
301 |
+
* Minor Bug Fixes
|
302 |
+
* Minor Design Changes
|
303 |
+
|
304 |
+
= 1.6.1 (March 2, 2014) =
|
305 |
+
* Added Ability To Limit Amount User Tries Certain Quizzes
|
306 |
+
* Fixed Internet Explorer Quiz Adding Bug
|
307 |
+
* Fixed Results Link On Quizzes Page Bug
|
308 |
+
* Fixed Points Number Check Bug
|
309 |
+
* Fixed Limited Question Grading Bug
|
310 |
+
* Minor Design Changes To Admin Pages
|
311 |
+
|
312 |
+
= 1.5.1 (February 26, 2014) =
|
313 |
+
* Added Ability To Load Only Set Amount Of Questions From Total Questions
|
314 |
+
* Fixed PHP Notices On Quizzes Page
|
315 |
+
* Fixed PHP Notices On Quiz Options Page
|
316 |
+
* Fixed PHP Notices On Quiz Results Page
|
317 |
+
* Fixed PHP Notices On Quiz
|
318 |
+
* Fixed Hidden Pop-Up Bug
|
319 |
+
|
320 |
+
= 1.4.2 (February 22, 2014) =
|
321 |
+
* Fixed Capability Bug
|
322 |
+
* Minor Design Changes To Question Form
|
323 |
+
* Hint Bubble Is Now Wider For Longer Hints
|
324 |
+
* Minor Design Change To Quiz
|
325 |
+
|
326 |
+
= 1.4.1 (February 20, 2014) =
|
327 |
+
* Enhanced Plugins Compatibility With Other Plugins
|
328 |
+
* Hints Are Now Hidden By Default
|
329 |
+
* Minor Bug Fixes
|
330 |
+
|
331 |
+
= 1.3.1 (February 18, 2014) =
|
332 |
+
* Added Ability To Choose Whether Logged-in Users Can Enter Contact Info
|
333 |
+
* Fixed Editing Hint Field Error
|
334 |
+
* Added Ability To Have Media In Answers
|
335 |
+
* Added Ability To Have HTML In Questions And Answers
|
336 |
+
|
337 |
+
= 1.2.1 (February 11, 2014) =
|
338 |
+
* Fixed Quiz Results Details Bug
|
339 |
+
* Continued Working On New Error Code System
|
340 |
+
* Added Pagination To Tools Page, Quizzes Page And List Of Questions On Quiz Options Page
|
341 |
+
* Added Ability To Create A Duplicate Of A Quiz
|
342 |
+
|
343 |
+
= 1.1.1 (February 6, 2014) =
|
344 |
+
* Added %AVERAGE_POINT% Variable That Calculates Average Points Per Question
|
345 |
+
* Added Field For Reason Why Answer Is Correct
|
346 |
+
* Added %CORRECT_ANSWER_INFO% To Display Why Answer Is Correct
|
347 |
+
* Begun Creating New Error Code System
|
348 |
+
* Fixed Edit Quiz Name Bug
|
349 |
+
* Fixed New Quiz Bug
|
350 |
+
|
351 |
+
= 1.0.1 (February 4, 2014) =
|
352 |
+
* Fixed Saving Results Bug
|
353 |
+
* Fixed Leaderboard Bug
|
354 |
+
|
355 |
+
= 1.0 (February 1, 2014) =
|
356 |
+
* Added Ability To Customize From Name For User And Admin Emails
|
357 |
+
* Changed Question Editor
|
358 |
+
* Minor Change To Help System
|
359 |
+
|
360 |
+
= 0.9.9 (January 30, 2014) =
|
361 |
+
* Begun Creating New Advanced Help System
|
362 |
+
* Added New Question Editor
|
363 |
+
* Added Ability To Have Media In Questions
|
364 |
+
* Minor Design Changes To Quiz Options
|
365 |
+
|
366 |
+
= 0.9.8 (January 25, 2014) =
|
367 |
+
* Added Leaderboard Widget
|
368 |
+
* Added Ability To Reset Quiz Stats On Each Quiz
|
369 |
+
* Added Ability To Delete Results
|
370 |
+
* Minor Design Changes
|
371 |
+
* Minor Bug Fixes
|
372 |
+
|
373 |
+
= 0.9.7 (January 24, 2014) =
|
374 |
+
* Started Setting Plugin Up For Translations
|
375 |
+
* Relocated Widgets From Help Page To Quiz Dashboard Page
|
376 |
+
* Updated Several Of The Help Sections Through Plugin
|
377 |
+
* Minor Bug Fixes
|
378 |
+
|
379 |
+
= 0.9.6 (January 21, 2014) =
|
380 |
+
* Added Ability To Edit Question Order When Adding Questions
|
381 |
+
* Added Ability To Choose Whether Contact Info Is Asked For At Beginning Or End Of Quiz
|
382 |
+
* Defaulted Question Comment Field To None On New Questions
|
383 |
+
* Fixed Double Quote Bug
|
384 |
+
* Enhanced Monthly Stat Widget
|
385 |
+
* Minor Design Change To Quiz Total Stats Widget
|
386 |
+
* Minor Design Changes To Quiz Options Page
|
387 |
+
|
388 |
+
= 0.9.5 (January 19, 2014) =
|
389 |
+
* Added Ability To Edit %QUESTIONS_ANSWERS% Template
|
390 |
+
* Changed Name Of Support Page To Help Page
|
391 |
+
* Minor Design Changes On Quiz Options Page
|
392 |
+
|
393 |
+
= 0.9.4 (January 16, 2014) =
|
394 |
+
* Added Ability To Randomly Order Questions
|
395 |
+
* Updated Monthly Stat Widget
|
396 |
+
|
397 |
+
= 0.9.3 (January 14, 2014) =
|
398 |
+
* Logged-In Users Now See Contact Information
|
399 |
+
* Minor Bug Fixes
|
400 |
+
|
401 |
+
= 0.9.2 (January 12, 2014) =
|
402 |
+
* Updated Weekly Stat Widget
|
403 |
+
* Begun Work On Monthly Stat Widget
|
404 |
+
* Added Ability To Edit Leaderboard Template
|
405 |
+
* Bug Fixes
|
406 |
+
|
407 |
+
= 0.9.1 (January 8, 2014) =
|
408 |
+
* Fixed Leaderboard Design Bug
|
409 |
+
* Fixed Contact Information Design Bug
|
410 |
+
* Added Ability To Not Need Contact Info For Logged In Users
|
411 |
+
|
412 |
+
= 0.9 (January 5, 2014) =
|
413 |
+
* Added Ability To Edit Quiz Name
|
414 |
+
* Added Ability To Display Question As Drop Down
|
415 |
+
* Added Quiz Name To Completion Email's Subject
|
416 |
+
* Minor Design Changes To Quiz Options Page
|
417 |
+
* Design Changes To Quiz
|
418 |
+
|
419 |
+
= 0.8.6 (January 2, 2014) =
|
420 |
+
* Bug Fixes
|
421 |
+
|
422 |
+
= 0.8.5 (January 1, 2014) =
|
423 |
+
* New Screenshots Added
|
424 |
+
* Minor Design Changes
|
425 |
+
* Bug Fixes
|
426 |
+
|
427 |
+
= 0.8.4 (December 22, 2013) =
|
428 |
+
* New Option To Change Size Of Comment Field
|
429 |
+
* Enhanced Weekly Stat Chart
|
430 |
+
* Bug Fixes
|
431 |
+
|
432 |
+
= 0.8.3 (December 14, 2013) =
|
433 |
+
* Fixed Leaderboard Bug
|
434 |
+
* Started Work On Weekly Stat Widget
|
435 |
+
* Tweaked Some Design Throughout Admin Side
|
436 |
+
* Minor Bug Fixes
|
437 |
+
|
438 |
+
= 0.8.2 (December 10, 2013) =
|
439 |
+
* Fixed Disappearing Question Bug Completely
|
440 |
+
* Updated Update Process
|
441 |
+
|
442 |
+
= 0.8.1 (December 9, 2013) =
|
443 |
+
* Fixed Disappearing Question Bug
|
444 |
+
|
445 |
+
= 0.8 (December 1, 2013) =
|
446 |
+
* Added Spam Prevention Techniques To Backend
|
447 |
+
* Added Ability To Reorder Questions
|
448 |
+
* Added New Section On How-To Page
|
449 |
+
* Bug Fixes
|
450 |
+
|
451 |
+
= 0.7.2 (November 24, 2013) =
|
452 |
+
* Bug Fixes
|
453 |
+
* Added New Section On How-To Page
|
454 |
+
|
455 |
+
= 0.7.1 (November 19, 2013) =
|
456 |
+
* Changed Design For How-To Page
|
457 |
+
* Added New Section In How-To Page
|
458 |
+
* Added New Widget On Plugin Dashboard For Daily Stats
|
459 |
+
|
460 |
+
= 0.7 (November 15, 2013) =
|
461 |
+
* Bug Fixes
|
462 |
+
* Begun Work On New How-To Page
|
463 |
+
* Continued Redesigning Plugin Dashboard
|
464 |
+
|
465 |
+
= 0.6.2 (November 10, 2013) =
|
466 |
+
* Bug Fixes
|
467 |
+
* Added More Stats
|
468 |
+
* Started Redesigning Plugin Dashboard
|
469 |
+
|
470 |
+
= 0.6.1 (November 2, 2013) =
|
471 |
+
* Bug Fixes
|
472 |
+
|
473 |
+
= 0.6 (October 19, 2013) =
|
474 |
+
* Started Developing Quiz Leaderboards
|
475 |
+
* Added Ability To Save User Answers And Comments
|
476 |
+
* Added More Statistics To Quiz Dashboard
|
477 |
+
* Bug Fixes
|
478 |
+
|
479 |
+
= 0.5.3 (October 11, 2013) =
|
480 |
+
* Bug Fixes
|
481 |
+
* Started Redesigning Quiz Look
|
482 |
+
|
483 |
+
= 0.5.2 (September 29, 2013) =
|
484 |
+
* Bug Fixes
|
485 |
+
|
486 |
+
= 0.5.1 (September 22, 2013) =
|
487 |
+
* Added More Statistics To Quiz Dashboard
|
488 |
+
* Bug Fixes
|
489 |
+
|
490 |
+
= 0.5 (September 18, 2013) =
|
491 |
+
* Created New Tools Page And Moved Audit Trail To It
|
492 |
+
* Added Ability For Comment Section At End Of Quiz
|
493 |
+
* Added Ability To Have Hints
|
494 |
+
* Added Option To Have Comment Boxes On Questions
|
495 |
+
* Added More Statistics To Main Page
|
496 |
+
|
497 |
+
= 0.4.1 (September 15, 2013) =
|
498 |
+
* Bug Fixes
|
499 |
+
|
500 |
+
= 0.4 (September 13, 2013) =
|
501 |
+
* Add The Ability To Require Contact Information
|
502 |
+
* Add Email Validating To Email Field
|
503 |
+
|
504 |
+
= 0.3.1 (September 13, 2013) =
|
505 |
+
* Bug Fixes
|
506 |
+
|
507 |
+
= 0.3 (September 12, 2013) =
|
508 |
+
* Increased Scoring Systems To Three: Correct, Points, Or Not Graded
|
509 |
+
* Error Fixes
|
510 |
+
|
511 |
+
= 0.2 (September 9, 2013) =
|
512 |
+
* Added New Quiz Dashboard Page
|
513 |
+
* Created Audit Trail
|
514 |
+
* Added Ability to Add Questions/Answers to Templates
|
515 |
+
* Minor Spelling/Grammer Fixes
|
516 |
+
|
517 |
+
= 0.1 (September 1, 2013) =
|
518 |
+
* Begun Development
|
519 |
+
* Added ability to create/edit/delete quizzes
|
520 |
+
* Added ability to create/edit/delete questions
|
521 |
+
* Added quiz admin page
|
522 |
+
* Added questions admin page
|
523 |
+
* Added results page
|
524 |
+
|
525 |
+
== Upgrade Notice ==
|
526 |
+
|
527 |
+
= 3.3.3 =
|
528 |
+
Upgrade for minor bug fixes.
|
529 |
+
|
530 |
+
= 3.3.1 =
|
531 |
+
Upgrade for new Horizontal Multiple Response question type and to be able to duplicate questions when duplicating quizzes. Also, fixes several major and minor bugs.
|
532 |
+
|
533 |
+
= 3.2.1 =
|
534 |
+
Upgrade for new Captcha question types!
|
535 |
+
|
536 |
+
= 3.1.1 =
|
537 |
+
Upgrade for new Accept and Number question types. Also, now you have the ability to duplicate individual questions!
|
538 |
+
|
539 |
+
= 3.0.1 =
|
540 |
+
Upgrade for new style manager, new non-question types, text block question type, and various design/bug fixes!
|
541 |
+
|
542 |
+
= 2.9.1 =
|
543 |
+
Upgrade for facebook sharing, a new question type, the ability to edit the email's subject, and much more!
|
544 |
+
|
545 |
+
= 2.8.5 =
|
546 |
+
Upgrade for minor bug fixes.
|
547 |
+
|
548 |
+
= 2.8.3 =
|
549 |
+
Upgrade for minor bug fixes.
|
550 |
+
|
551 |
+
= 2.8.2 =
|
552 |
+
Upgrade for minor bug fixes.
|
553 |
+
|
554 |
+
= 2.7.3 =
|
555 |
+
Upgrade for bug fixes.
|
556 |
+
|
557 |
+
= 2.7.2 =
|
558 |
+
Upgrade for bug fixes.
|
559 |
+
|
560 |
+
= 2.7.1 =
|
561 |
+
Upgrade to have the ability to set number of questions per page and more bug fixes.
|
562 |
+
|
563 |
+
= 2.6.4 =
|
564 |
+
Upgrade for bug fixes.
|
565 |
+
|
566 |
+
= 2.6.3 =
|
567 |
+
Upgrade for bug fixes.
|
568 |
+
|
569 |
+
= 2.6.2 =
|
570 |
+
Upgrade for bug fixes.
|
571 |
+
|
572 |
+
= 2.6.1 =
|
573 |
+
Upgrade to be able to support special characters and non-latin based languages.
|
574 |
+
|
575 |
+
= 2.5.1 =
|
576 |
+
Upgrade for many new features including unlimited answers, random answers, new question type, and more!
|
577 |
+
|
578 |
+
= 2.4.1 =
|
579 |
+
Upgrade to be able to send different emails based on user's score. Also, minor bug fixes included.
|
580 |
+
|
581 |
+
= 2.1.1 =
|
582 |
+
Upgrade to have the ability to edit the css styles for each quiz! Plus minor bugs fixes.
|
583 |
+
|
584 |
+
= 2.0.1 =
|
585 |
+
Upgrade to fix minor bugs and enable pagination on results page.
|
586 |
+
|
587 |
+
= 1.9.2 =
|
588 |
+
Upgrade to have the ability to delete landing pages, allow users to go back when paginating questions, and have HTML in the correct answer info field!
|
589 |
+
|
590 |
+
= 1.9.1 =
|
591 |
+
Upgrade to 1.9.1 to get the ability for pagination on the quiz and to allow your users to share their results on Twitter.
|
592 |
+
|
593 |
+
= 1.8.1 =
|
594 |
+
Upgrade to 1.8.1 to get the ability to have different landing pages based on the user's score, give users certificates, and an additional customizable text section at the end of quiz. Plus minor design changes to quiz and Quiz Dashboard and lots of bug fixes.
|
595 |
+
|
596 |
+
= 1.7.1 =
|
597 |
+
This update adds new widgets to Quiz Dashboard, adds a timer mechanism, and fixes several minor bugs.
|
598 |
+
|
599 |
+
= 1.6.3 =
|
600 |
+
This update fixes minor bugs and adds minor design changes.
|
601 |
+
|
602 |
+
= 1.6.2 =
|
603 |
+
This update fixes minor bugs and adds minor design changes.
|
604 |
+
|
605 |
+
= 1.6.1 =
|
606 |
+
This update allows you to set the amount of tries a user has for cetain quizzes. Also fixes several bugs.
|
607 |
+
|
608 |
+
= 1.5.1 =
|
609 |
+
This update allows you to have the quiz only load a set number of questions from your total question bank. Also fixes several minor bugs.
|
610 |
+
|
611 |
+
= 1.4.2 =
|
612 |
+
This update brings many minor design changes and minor bug fixes.
|
613 |
+
|
614 |
+
= 1.4.1 =
|
615 |
+
This update helps plugin work better with other plugins. The hints for the quiz are now hidden by default.
|
616 |
+
|
617 |
+
= 1.2.1 =
|
618 |
+
This update adds pagination to the quizzes, audit trail, and question tables to make using the admin side easier. It also adds the ability to duplicate a quiz. Fixes various minor bugs.
|
619 |
+
|
620 |
+
= 1.1.1 =
|
621 |
+
This update adds the ability to show the user the reason why an answer is correct. Also, added new variable for templates that calculates average points per question. Minor bug fixes.
|
622 |
+
|
623 |
+
= 1.0.1 =
|
624 |
+
This update fixes minor bugs.
|
625 |
+
|
626 |
+
= 1.0 =
|
627 |
+
This update finally brings this plugin out of beta! This update brings the ability to edit the From Name part of the email sent to users and admin. Minor bug fixes.
|
628 |
+
|
629 |
+
= 0.9.9 =
|
630 |
+
Upgrade to be able to include media in your questions! Also, fixed minor bugs and made minor design changes.
|
631 |
+
|
632 |
+
= 0.9.8 =
|
633 |
+
Upgrade to use new leaderboard widet! Also, added ability to reset stats for quizzes from Quiz Options page. Added ability to delete results as well. Minor design changes and bug fixes.
|
634 |
+
|
635 |
+
= 0.9.7 =
|
636 |
+
Upgrade to see widgets relocated from help page to quiz dashboard page. Also, began setting plugin up for translations. Updated many help sections throughout plugin. Minor bug fixes.
|
637 |
+
|
638 |
+
= 0.9.6 =
|
639 |
+
Upgrade to be able to choose whether contact information is asked for at beginning or end of the quiz. Also, added ability to edit question order when adding new questions. Several minor design changes on admin side. Fixed double quote bug.
|
640 |
+
|
641 |
+
= 0.9.5 =
|
642 |
+
Upgrade to be able to edit the %QUESTIONS_ANSWERS% template. Also, minor design changes on Quiz Options page.
|
643 |
+
|
644 |
+
= 0.9.4 =
|
645 |
+
Upgrade to set up your quizzes to randomize the questions
|
646 |
+
|
647 |
+
= 0.9.3 =
|
648 |
+
Upgrade for minor bug fixes.
|
649 |
+
|
650 |
+
= 0.9.2 =
|
651 |
+
Upgrade for several enhanced stat widgets and the ability to edit leaderboard templates!
|
652 |
+
|
653 |
+
= 0.9.1 =
|
654 |
+
Upgrade for several bug fixes and new ability to have logged in users not have to enter contact information
|
655 |
+
|
656 |
+
= 0.9 =
|
657 |
+
Upgrade for several new features and bug fixes
|
658 |
+
|
659 |
+
= 0.8.6 =
|
660 |
+
Upgrade to fix minor bugs
|
661 |
+
|
662 |
+
= 0.8.5 =
|
663 |
+
Upgrade to fix minor bugs
|
664 |
+
|
665 |
+
= 0.8.4 =
|
666 |
+
Upgrade to enjoy small tweaks throughout admin side
|
667 |
+
|
668 |
+
= 0.8.3 =
|
669 |
+
Upgrade to enjoy small tweaks throughout admin side
|
670 |
+
|
671 |
+
= 0.8.2 =
|
672 |
+
Upgrade to fix bug that made questions vanish.
|
673 |
+
|
674 |
+
= 0.8.1 =
|
675 |
+
Upgrade to fix bug that made questions vanish.
|
676 |
+
|
677 |
+
= 0.8 =
|
678 |
+
Upgrade to enjoy several new features and minor bug fixes.
|
679 |
+
|
680 |
+
= 0.7.2 =
|
681 |
+
Upgrade to fix minor bugs and view new section on how-to page.
|
682 |
+
|
683 |
+
= 0.7.1 =
|
684 |
+
Upgrade to fix minor bugs, view new section how-to page, and new stats on main page.
|
685 |
+
|
686 |
+
= 0.7 =
|
687 |
+
Upgrade to fix minor bugs, view new how-to page, and new stats on main page.
|
688 |
+
|
689 |
+
= 0.6.2 =
|
690 |
+
Upgrade to fix some minor bug fixes.
|
691 |
+
|
692 |
+
= 0.6 =
|
693 |
+
Upgrade to enjoy several new features including saved results and leaderboards!
|
694 |
+
|
695 |
+
= 0.5.3 =
|
696 |
+
Upgrade to fix some minor bug fixes.
|
697 |
+
|
698 |
+
= 0.5.2 =
|
699 |
+
Upgrade to fix some minor bug fixes.
|
700 |
+
|
701 |
+
= 0.5.1 =
|
702 |
+
Upgrade to fix some minor bug fixes.
|
703 |
+
|
704 |
+
= 0.5 =
|
705 |
+
Upgrade to enjoy several new features including surveys!
|
706 |
+
|
707 |
+
= 0.4 =
|
708 |
+
Upgrade to enjoy being able to require contact information.
|
709 |
+
|
710 |
+
= 0.3 =
|
711 |
+
Upgrade to enjoy the new Not Graded scoring system and some error fixes!
|
712 |
+
|
713 |
+
= 0.2 =
|
714 |
+
Upgrade to enjoy three new features and some minor fixes!
|
715 |
+
|
716 |
+
= 0.1 =
|
717 |
Initial Version
|