From 38d19fef6e4aded07fdc4b2e4c912a753f5a2519 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:33:31 -0500 Subject: [PATCH 01/34] Created Initial Quiz js --- includes/qmn_quiz.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 includes/qmn_quiz.js diff --git a/includes/qmn_quiz.js b/includes/qmn_quiz.js new file mode 100644 index 000000000..2dbec96a3 --- /dev/null +++ b/includes/qmn_quiz.js @@ -0,0 +1,17 @@ +setTimeout(function(){ + var $j = jQuery.noConflict(); + // increase the default animation speed to exaggerate the effect + $j.fx.speeds._default = 1000; + $j(function() { + $j( ".mlw_qmn_quiz" ).tooltip(); + }); +}, 100); +setTimeout(function() +{ + var $j = jQuery.noConflict(); + $j('.mlw_qmn_quiz input').on('keypress', function (e) { + if (e.which === 13) { + e.preventDefault(); + } + }); +}, 100); From fee616b36698d0c09c7d0d4167e0e1bc7b3e719b Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:36:00 -0500 Subject: [PATCH 02/34] Moved JS From Quiz PHP File --- includes/qmn_quiz.js | 72 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/includes/qmn_quiz.js b/includes/qmn_quiz.js index 2dbec96a3..be81c310e 100644 --- a/includes/qmn_quiz.js +++ b/includes/qmn_quiz.js @@ -15,3 +15,75 @@ setTimeout(function() } }); }, 100); +var myVar=setInterval("mlwQmnTimer();",1000); +function mlwQmnTimer() +{ + var x = +document.getElementById("timer").value; + x = x + 1; + document.getElementById("timer").value = x; +} +function clear_field(field) +{ + if (field.defaultValue == field.value) field.value = ''; +} + +function mlw_validateForm() +{ + mlw_validateResult = true; + + jQuery('#quizForm *').filter(':input').each(function(){ + jQuery(this).css("outline", ""); + if (jQuery(this).attr('class')) + { + if(jQuery(this).attr('class').indexOf('mlwEmail') > -1 && this.value != "") + { + var x=this.value; + var atpos=x.indexOf('@'); + var dotpos=x.lastIndexOf('.'); + if (atpos<1 || dotpos=x.length) + { + document.getElementById('mlw_error_message').innerHTML = '**Not a valid e-mail address!**'; + document.getElementById('mlw_error_message_bottom').innerHTML = '**Not a valid e-mail address!**'; + mlw_validateResult = false; + jQuery(this).css("outline", "2px solid red"); + } + } + if(jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value == "" && +this.value != NaN) + { + document.getElementById('mlw_error_message').innerHTML = '**This field must be a number!**'; + document.getElementById('mlw_error_message_bottom').innerHTML = '**This field must be a number!**'; + jQuery(this).css("outline", "2px solid red"); + mlw_validateResult = false; + } + if(jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && this.value == "") + { + document.getElementById('mlw_error_message').innerHTML = '**Please complete all required fields!**'; + document.getElementById('mlw_error_message_bottom').innerHTML = '**Please complete all required fields!**'; + jQuery(this).css("outline", "2px solid red"); + mlw_validateResult = false; + } + if(jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code) + { + document.getElementById('mlw_error_message').innerHTML = '**The entered text is not correct!**'; + document.getElementById('mlw_error_message_bottom').innerHTML = '**The entered text is not correct!**'; + jQuery(this).css("outline", "2px solid red"); + mlw_validateResult = false; + } + if(jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1 && !this.checked) + { + document.getElementById('mlw_error_message').innerHTML = '**Please complete all required fields!**'; + document.getElementById('mlw_error_message_bottom').innerHTML = '**Please complete all required fields!**'; + jQuery(this).css("outline", "2px solid red"); + mlw_validateResult = false; + } + } + }); + + if (!mlw_validateResult) {return mlw_validateResult;} + + jQuery( '.mlw_qmn_quiz input:radio' ).attr('disabled',false); + jQuery( '.mlw_qmn_quiz input:checkbox' ).attr('disabled',false); + jQuery( '.mlw_qmn_quiz select' ).attr('disabled',false); + jQuery( '.mlw_qmn_question_comment' ).attr('disabled',false); + jQuery( '.mlw_answer_open_text' ).attr('disabled',false); +} From 04291d72854a5c8746d7650e177e3042331393f9 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:40:24 -0500 Subject: [PATCH 03/34] Moved JS To New Quiz JS File Moved the quiz js to the newly created qmn_quiz.js file and enqueued it in. --- includes/mlw_quiz.php | 107 +----------------------------------------- 1 file changed, 2 insertions(+), 105 deletions(-) diff --git a/includes/mlw_quiz.php b/includes/mlw_quiz.php index 8a41a81c2..a8ebd921e 100644 --- a/includes/mlw_quiz.php +++ b/includes/mlw_quiz.php @@ -143,31 +143,11 @@ function mlw_quiz_shortcode($atts) wp_enqueue_script( 'jquery-ui-accordion' ); wp_enqueue_script( 'jquery-ui-tooltip' ); wp_enqueue_script( 'jquery-ui-tabs' ); + wp_enqueue_script( 'qmn_quiz', plugins_url( 'qmn_quiz.js' , __FILE__ ) ); + wp_enqueue_script( 'math_jax', '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' ); ?> - - "; } //Begin the quiz From 7fc9df8e63a9ad60e2b9529d72a4d5ba924b1bc1 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:41:53 -0500 Subject: [PATCH 04/34] Created Initial Pagination JS File --- includes/qmn_pagination.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 includes/qmn_pagination.js diff --git a/includes/qmn_pagination.js b/includes/qmn_pagination.js new file mode 100644 index 000000000..8d1c8b69c --- /dev/null +++ b/includes/qmn_pagination.js @@ -0,0 +1 @@ + From 78823fd35572a41e04acf47b3c346da2e65bbcb2 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:46:29 -0500 Subject: [PATCH 05/34] Moved Pagination JS From Quiz PHP File --- includes/qmn_pagination.js | 96 +++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/includes/qmn_pagination.js b/includes/qmn_pagination.js index 8d1c8b69c..a8acdb540 100644 --- a/includes/qmn_pagination.js +++ b/includes/qmn_pagination.js @@ -1 +1,95 @@ - +setTimeout(function(){ + var $j = jQuery.noConflict(); + $j( ".quiz_section" ).hide(); + $j( ".quiz_section" ).append( "
" ); + $j( ".mlw_qmn_quiz" ).append( ""+qmn_pagination_previous_text+"" ); + $j( ".mlw_qmn_quiz" ).append( ""+qmn_pagination_next_text+"" ); + window.mlw_quiz_slide = 0; + window.mlw_previous = 0; + window.mlw_quiz_total_slides = qmn_section_limit; + nextSlide(1, 0); +}, 100); +function nextSlide(mlw_pagination, mlw_goto_top) +{ + jQuery( ".quiz_section" ).hide(); + for (var i = 0; i < mlw_pagination; i++) + { + if (i == 0 && window.mlw_previous == 1 && window.mlw_quiz_slide > 1) + { + window.mlw_quiz_slide = window.mlw_quiz_slide + mlw_pagination; + } + else + { + window.mlw_quiz_slide++; + } + if (window.mlw_quiz_slide < 1) + { + window.mlw_quiz_slide = 1; + } + if (window.mlw_quiz_slide == 1) + { + jQuery( ".mlw_qmn_quiz_link.mlw_previous" ).hide(); + } + if (window.mlw_quiz_slide > 1) + { + jQuery( ".mlw_qmn_quiz_link.mlw_previous" ).show(); + } + if (window.mlw_quiz_slide == window.mlw_quiz_total_slides) + { + jQuery( ".mlw_qmn_quiz_link.mlw_next" ).hide(); + } + if (window.mlw_quiz_slide < window.mlw_quiz_total_slides) + { + jQuery( ".mlw_qmn_quiz_link.mlw_next" ).show(); + } + jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show(); + } + window.mlw_previous = 0; + if (mlw_goto_top == 1) + { + window.location.hash = "mlw_does_not_exist"; + window.location.hash = "mlw_top_of_quiz"; + } +} +function prevSlide(mlw_pagination, mlw_goto_top) +{ + jQuery( ".quiz_section" ).hide(); + for (var i = 0; i < mlw_pagination; i++) + { + if (i == 0 && window.mlw_previous == 0) + { + window.mlw_quiz_slide = window.mlw_quiz_slide - mlw_pagination; + } + else + { + window.mlw_quiz_slide--; + } + if (window.mlw_quiz_slide < 1) + { + window.mlw_quiz_slide = 1; + } + if (window.mlw_quiz_slide == 1) + { + jQuery( ".mlw_qmn_quiz_link.mlw_previous" ).hide(); + } + if (window.mlw_quiz_slide > 1) + { + jQuery( ".mlw_qmn_quiz_link.mlw_previous" ).show(); + } + if (window.mlw_quiz_slide == window.mlw_quiz_total_slides) + { + jQuery( ".mlw_qmn_quiz_link.mlw_next" ).hide(); + } + if (window.mlw_quiz_slide < window.mlw_quiz_total_slides) + { + jQuery( ".mlw_qmn_quiz_link.mlw_next" ).show(); + } + jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show(); + } + window.mlw_previous = 1; + if (mlw_goto_top == 1) + { + window.location.hash = "mlw_does_not_exist"; + window.location.hash = "mlw_top_of_quiz"; + } +} From 1cfb39997da047506801f940a607eb887925f7a7 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:49:38 -0500 Subject: [PATCH 06/34] Moved Pagination Js To New Pagination JS File --- includes/mlw_quiz.php | 101 +++--------------------------------------- 1 file changed, 5 insertions(+), 96 deletions(-) diff --git a/includes/mlw_quiz.php b/includes/mlw_quiz.php index a8ebd921e..67528e782 100644 --- a/includes/mlw_quiz.php +++ b/includes/mlw_quiz.php @@ -222,104 +222,13 @@ function mlw_quiz_shortcode($atts) } ?> timer_limit != 0) { From 342363a5f270415fc72f955ee172452d244097fe Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:50:04 -0500 Subject: [PATCH 07/34] Created Initial Timer JS --- includes/qmn_timer.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 includes/qmn_timer.js diff --git a/includes/qmn_timer.js b/includes/qmn_timer.js new file mode 100644 index 000000000..8d1c8b69c --- /dev/null +++ b/includes/qmn_timer.js @@ -0,0 +1 @@ + From 1db46a7e48e9089a2e2be765bda87d8a243a3f54 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:53:08 -0500 Subject: [PATCH 08/34] Moved Timer JS From Quiz PHP File --- includes/qmn_timer.js | 83 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/includes/qmn_timer.js b/includes/qmn_timer.js index 8d1c8b69c..9fc2b9277 100644 --- a/includes/qmn_timer.js +++ b/includes/qmn_timer.js @@ -1 +1,82 @@ - +setTimeout(function(){ + var minutes = 0; + if (window.sessionStorage.getItem('mlw_started_quiz'+qmn_quiz_id) == "yes" && window.sessionStorage.getItem('mlw_time_quiz'+qmn_quiz_id) >= 0) + { + minutes = window.sessionStorage.getItem('mlw_time_quiz'+qmn_quiz_id); + } + else + { + minutes = qmn_timer_limit; + } + window.amount = (minutes*60); + window.titleText = window.document.title; + document.getElementById("mlw_qmn_timer").innerHTML = minToSec(window.amount); + window.counter=setInterval(timer, 1000); +}, 100); +function timer() +{ + window.amount=window.amount-1; + if (window.amount < 0) + { + window.amount = 0; + } + window.sessionStorage.setItem('mlw_time_quiz', window.amount/60); + window.sessionStorage.setItem('mlw_started_quiz', "yes"); + document.getElementById("mlw_qmn_timer").innerHTML = minToSec(window.amount); + window.document.title = minToSec(window.amount) + " " + window.titleText; + if (window.amount <= 0) + { + clearInterval(window.counter); + jQuery( ".mlw_qmn_quiz input:radio" ).attr('disabled',true); + jQuery( ".mlw_qmn_quiz input:checkbox" ).attr('disabled',true); + jQuery( ".mlw_qmn_quiz select" ).attr('disabled',true); + jQuery( ".mlw_qmn_question_comment" ).attr('disabled',true); + jQuery( ".mlw_answer_open_text" ).attr('disabled',true); + //document.quizForm.submit(); + return; + } +} +function minToSec(amount) +{ + var timer_display = ''; + var hours = Math.floor(amount/3600); + if (hours == '0') + { + timer_display = timer_display +"00:"; + } + else if (hours < 10) + { + timer_display = timer_display + '0' + hours + ":"; + } + else + { + timer_display = timer_display + hours + ":"; + } + var minutes = Math.floor((amount % 3600)/60); + if (minutes == '0') + { + timer_display = timer_display +"00:"; + } + else if (minutes < 10) + { + timer_display = timer_display + '0' + minutes + ":"; + } + else + { + timer_display = timer_display + minutes + ":"; + } + var seconds = Math.floor(amount % 60); + if (seconds == '0') + { + timer_display = timer_display +"00"; + } + else if (seconds < 10) + { + timer_display = timer_display +'0' + seconds; + } + else + { + timer_display = timer_display + seconds; + } + return timer_display; +} From 9f939b4f1909bf4655fd8003ebc0f4d98c9a6dc3 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:54:53 -0500 Subject: [PATCH 09/34] Removed Missing PHP --- includes/qmn_timer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/qmn_timer.js b/includes/qmn_timer.js index 9fc2b9277..4f2617057 100644 --- a/includes/qmn_timer.js +++ b/includes/qmn_timer.js @@ -20,8 +20,8 @@ function timer() { window.amount = 0; } - window.sessionStorage.setItem('mlw_time_quiz', window.amount/60); - window.sessionStorage.setItem('mlw_started_quiz', "yes"); + window.sessionStorage.setItem('mlw_time_quiz'+qmn_quiz_id, window.amount/60); + window.sessionStorage.setItem('mlw_started_quiz'+qmn_quiz_id, "yes"); document.getElementById("mlw_qmn_timer").innerHTML = minToSec(window.amount); window.document.title = minToSec(window.amount) + " " + window.titleText; if (window.amount <= 0) From dfb7be551d9096d6d391c7f4d04ba6465a4eb3db Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 18:56:12 -0500 Subject: [PATCH 10/34] Moved Timer JS To New Timer JS File --- includes/mlw_quiz.php | 103 +++++------------------------------------- 1 file changed, 12 insertions(+), 91 deletions(-) diff --git a/includes/mlw_quiz.php b/includes/mlw_quiz.php index 67528e782..d4922deba 100644 --- a/includes/mlw_quiz.php +++ b/includes/mlw_quiz.php @@ -161,15 +161,15 @@ function mlw_quiz_shortcode($atts) } - theme_selected == "default") - { - echo ""; - } - else - { - echo "theme_selected)."' rel='stylesheet' />"; - } + theme_selected == "default") + { + echo ""; + } + else + { + echo "theme_selected)."' rel='stylesheet' />"; + } /* The following code is for displaying the quiz and completion screen @@ -235,90 +235,11 @@ function mlw_quiz_shortcode($atts) ?>
Date: Fri, 26 Dec 2014 18:58:40 -0500 Subject: [PATCH 11/34] Created Initial Social Share JS File --- includes/qmn_social_share.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 includes/qmn_social_share.js diff --git a/includes/qmn_social_share.js b/includes/qmn_social_share.js new file mode 100644 index 000000000..c94891f0a --- /dev/null +++ b/includes/qmn_social_share.js @@ -0,0 +1,24 @@ +function mlw_qmn_share(network, mlw_qmn_social_text, mlw_qmn_title) +{ + var sTop = window.screen.height/2-(218); + var sLeft = window.screen.width/2-(313); + var sqShareOptions = "height=400,width=580,toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=0,top=" + sTop + ",left=" + sLeft; + var pageUrl = window.location.href; + var pageUrlEncoded = encodeURIComponent(pageUrl); + if (network == 'facebook') + { + var Url = "https://www.facebook.com/dialog/feed?" + + "display=popup&" + + "app_id=483815031724529&" + + "link=" + pageUrlEncoded + "&" + + "name=" + encodeURIComponent(mlw_qmn_social_text) + "&" + + "description= &" + + "redirect_uri=http://www.mylocalwebstop.com/mlw_qmn_close.html"; + } + if (network == 'twitter') + { + var Url = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(mlw_qmn_social_text); + } + window.open(Url, "Share", sqShareOptions); + return false; +} From 0e8e783c3c0178c80b61103611310d94d71b635b Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:00:04 -0500 Subject: [PATCH 12/34] Moved Social Share JS To New Social Share JS File --- includes/mlw_quiz.php | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/includes/mlw_quiz.php b/includes/mlw_quiz.php index d4922deba..2d859a0ef 100644 --- a/includes/mlw_quiz.php +++ b/includes/mlw_quiz.php @@ -953,34 +953,8 @@ function mlw_quiz_shortcode($atts) if ($mlw_quiz_options->social_media == 1) { - ?> - - social_media_text) && is_array(@unserialize($mlw_quiz_options->social_media_text))) From eb22e3b4e581554377af48ced910422d80f896a8 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:03:13 -0500 Subject: [PATCH 13/34] Created Initial Quiz CSS --- includes/qmn_quiz.css | 1 + 1 file changed, 1 insertion(+) create mode 100644 includes/qmn_quiz.css diff --git a/includes/qmn_quiz.css b/includes/qmn_quiz.css new file mode 100644 index 000000000..8d1c8b69c --- /dev/null +++ b/includes/qmn_quiz.css @@ -0,0 +1 @@ + From 2490b48c7c19c8254d3fab688c7af3b5db2fa3d8 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:08:03 -0500 Subject: [PATCH 14/34] Minor Update To Default Font --- includes/mlw_quiz_creator.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/mlw_quiz_creator.php b/includes/mlw_quiz_creator.php index 5dee7b414..50899caaa 100644 --- a/includes/mlw_quiz_creator.php +++ b/includes/mlw_quiz_creator.php @@ -203,6 +203,10 @@ public function create_quiz($quiz_name) display: inline-block; padding: 5px 5px 5px 5px; margin: auto; + } + .mlw_qmn_question + { + font-weight: bold; }"; $mlw_question_answer_default = "%QUESTION%
Answer Provided: %USER_ANSWER%
Correct Answer: %CORRECT_ANSWER%
Comments Entered: %USER_COMMENTS%
"; $results = $wpdb->insert( From 1feace0c03b5232c8033cfa933d4ecc178995ca7 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:16:18 -0500 Subject: [PATCH 15/34] Updated Default Style --- includes/mlw_quiz_creator.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/mlw_quiz_creator.php b/includes/mlw_quiz_creator.php index 50899caaa..1392aa8ca 100644 --- a/includes/mlw_quiz_creator.php +++ b/includes/mlw_quiz_creator.php @@ -207,6 +207,10 @@ public function create_quiz($quiz_name) .mlw_qmn_question { font-weight: bold; + } + .mlw_qmn_comment_section_text + { + font-weight: bold; }"; $mlw_question_answer_default = "%QUESTION%
Answer Provided: %USER_ANSWER%
Correct Answer: %CORRECT_ANSWER%
Comments Entered: %USER_COMMENTS%
"; $results = $wpdb->insert( From 171745cc469190b833aa58bd610c2d1c3cd44113 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:16:31 -0500 Subject: [PATCH 16/34] Moved CSS From Quiz PHP File --- includes/qmn_quiz.css | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/includes/qmn_quiz.css b/includes/qmn_quiz.css index 8d1c8b69c..6903320e2 100644 --- a/includes/qmn_quiz.css +++ b/includes/qmn_quiz.css @@ -1 +1,24 @@ - +.ui-tooltip +{ + max-width: 500px !important; +} +.ui-tooltip-content +{ + max-width: 500px !important; +} +.qmn_error +{ + color: red; +} +.mlw_qmn_hint_link +{ + text-decoration:underline;color:rgb(0,0,255); +} +.qmn_social_buttons +{ + display: inline; + vertical-align:top !important; + font-weight: bold; + cursor: pointer; + text-decoration: none; +} From d52527e4e522d5bdebf4937b3e1925a45aa983b9 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:16:48 -0500 Subject: [PATCH 17/34] Moved CSS To New CSS File --- includes/mlw_quiz.php | 71 +++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 43 deletions(-) diff --git a/includes/mlw_quiz.php b/includes/mlw_quiz.php index 2d859a0ef..30a79aa0d 100644 --- a/includes/mlw_quiz.php +++ b/includes/mlw_quiz.php @@ -140,28 +140,13 @@ function mlw_quiz_shortcode($atts) wp_enqueue_script( 'jquery-effects-slide' ); wp_enqueue_script( 'jquery-ui-dialog' ); wp_enqueue_script( 'jquery-ui-button' ); - wp_enqueue_script( 'jquery-ui-accordion' ); wp_enqueue_script( 'jquery-ui-tooltip' ); - wp_enqueue_script( 'jquery-ui-tabs' ); + wp_enqueue_style( 'qmn_jquery_redmond_theme', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css' ); + wp_enqueue_script( 'qmn_quiz', plugins_url( 'qmn_quiz.js' , __FILE__ ) ); + wp_enqueue_style( 'qmn_quiz_style', plugins_url( 'qmn_quiz.css' , __FILE__ ) ); wp_enqueue_script( 'math_jax', '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' ); - ?> - - - - theme_selected == "default") { echo ""; @@ -258,7 +243,7 @@ function mlw_quiz_shortcode($atts) $mlw_message_before = htmlspecialchars_decode($mlw_quiz_options->message_before, ENT_QUOTES); $mlw_message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', $mlw_message_before, $mlw_qmn_quiz_options_array); $mlw_display .= "".$mlw_message_before."
"; - $mlw_display .= "
"; + $mlw_display .= "
"; if ($mlw_quiz_options->contact_info_location == 0) { @@ -285,7 +270,7 @@ function mlw_quiz_shortcode($atts) $mlw_display .= "
"; if ($mlw_question->question_type == 0) { - $mlw_display .= ""; + $mlw_display .= ""; $mlw_qmn_total_questions = $mlw_qmn_total_questions + 1; if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; } $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; @@ -344,7 +329,7 @@ function mlw_quiz_shortcode($atts) } elseif ($mlw_question->question_type == 4) { - $mlw_display .= ""; + $mlw_display .= ""; $mlw_qmn_total_questions = $mlw_qmn_total_questions + 1; if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; } $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; @@ -370,7 +355,7 @@ function mlw_quiz_shortcode($atts) } elseif ($mlw_question->question_type == 10) { - $mlw_display .= ""; + $mlw_display .= ""; $mlw_qmn_total_questions = $mlw_qmn_total_questions + 1; if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; } $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; @@ -395,7 +380,7 @@ function mlw_quiz_shortcode($atts) } elseif ($mlw_question->question_type == 1) { - $mlw_display .= ""; + $mlw_display .= ""; $mlw_qmn_total_questions = $mlw_qmn_total_questions + 1; if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; } $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; @@ -448,7 +433,7 @@ function mlw_quiz_shortcode($atts) } elseif ($mlw_question->question_type == 2) { - $mlw_display .= ""; + $mlw_display .= ""; $mlw_qmn_total_questions = $mlw_qmn_total_questions + 1; if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; } $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; @@ -502,7 +487,7 @@ function mlw_quiz_shortcode($atts) } elseif ($mlw_question->question_type == 5) { - $mlw_display .= ""; + $mlw_display .= ""; $mlw_qmn_total_questions = $mlw_qmn_total_questions + 1; if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; } $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; @@ -517,7 +502,7 @@ function mlw_quiz_shortcode($atts) } elseif ($mlw_question->question_type == 7) { - $mlw_display .= ""; + $mlw_display .= ""; $mlw_qmn_total_questions = $mlw_qmn_total_questions + 1; if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; } $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; @@ -529,7 +514,7 @@ function mlw_quiz_shortcode($atts) { if ($mlw_question_settings['required'] == 0) {$mlw_requireClass = "mlwRequiredCheck";} else {$mlw_requireClass = "";} $mlw_display .= ""; - $mlw_display .= ""; + $mlw_display .= ""; $mlw_display .= "
"; } elseif ($mlw_question->question_type == 9) @@ -538,7 +523,7 @@ function mlw_quiz_shortcode($atts) $mlw_display .= "
"; $mlw_display .= ""; $mlw_display .= "
"; - $mlw_display .= ""; + $mlw_display .= ""; $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; $mlw_display .= ""; $mlw_display .= ""; @@ -563,7 +548,7 @@ function mlw_quiz_shortcode($atts) } else { - $mlw_display .= ""; + $mlw_display .= ""; $mlw_qmn_total_questions = $mlw_qmn_total_questions + 1; if ($mlw_quiz_options->question_numbering == 1) { $mlw_display .= $mlw_qmn_total_questions.") "; } $mlw_display .= htmlspecialchars_decode($mlw_question->question_name, ENT_QUOTES)."
"; @@ -583,7 +568,7 @@ function mlw_quiz_shortcode($atts) } if ($mlw_question->hints != "") { - $mlw_display .= "hints, ENT_QUOTES)."\" style=\"text-decoration:underline;color:rgb(0,0,255);\" class='mlw_qmn_hint_link'>Hint"; + $mlw_display .= "hints, ENT_QUOTES)."\" class='mlw_qmn_hint_link'>Hint"; $mlw_display .= "

"; } $mlw_display .= "
"; @@ -597,7 +582,7 @@ function mlw_quiz_shortcode($atts) $mlw_display .= "
"; $mlw_message_comments = htmlspecialchars_decode($mlw_quiz_options->message_comment, ENT_QUOTES); $mlw_message_comments = apply_filters( 'mlw_qmn_template_variable_quiz_page', $mlw_message_comments, $mlw_qmn_quiz_options_array); - $mlw_display .= "
"; + $mlw_display .= "
"; $mlw_display .= ""; $mlw_display .= "
"; if ( $mlw_quiz_options->pagination == 0) { $mlw_display .= "

"; } @@ -626,7 +611,7 @@ function mlw_quiz_shortcode($atts) $mlw_display .= ""; $mlw_display .= ""; $mlw_display .= ""; - $mlw_display .= "
"; + $mlw_display .= "
"; $mlw_display .= ""; $mlw_display .= ""; $mlw_display .= ""; @@ -895,7 +880,7 @@ function mlw_quiz_shortcode($atts) $mlw_qmn_certificate_filename = str_replace(home_url()."/", '', plugin_dir_url( __FILE__ ))."certificates/mlw_qmn_quiz".date("YmdHis").$mlw_qmn_timer.".php"; file_put_contents($mlw_qmn_certificate_filename, $mlw_qmn_certificate_file); $mlw_qmn_certificate_filename = plugin_dir_url( __FILE__ )."certificates/mlw_qmn_quiz".date("YmdHis").$mlw_qmn_timer.".php"; - $mlw_qmn_result_array["certificate_link"] = "Download Certificate"; + $mlw_qmn_result_array["certificate_link"] = "Download Certificate"; } /* @@ -971,8 +956,8 @@ function mlw_quiz_shortcode($atts) $qmn_social_media_text["twitter"] = apply_filters( 'mlw_qmn_template_variable_results_page', $qmn_social_media_text["twitter"], $mlw_qmn_result_array); $qmn_social_media_text["facebook"] = apply_filters( 'mlw_qmn_template_variable_results_page', $qmn_social_media_text["facebook"], $mlw_qmn_result_array); $mlw_display .= "
- quiz_name)."');\">Facebook - quiz_name)."');\">Twitter + quiz_name)."');\">Facebook + quiz_name)."');\">Twitter
"; } @@ -1198,7 +1183,7 @@ function mlwDisplayContactInfo($mlw_quiz_options) { $mlw_contact_class = "class=\"mlwRequiredText\""; } - $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->name_field_text, ENT_QUOTES)."
"; + $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->name_field_text, ENT_QUOTES)."
"; $mlw_contact_display .= ""; $mlw_contact_display .= "

"; @@ -1210,7 +1195,7 @@ function mlwDisplayContactInfo($mlw_quiz_options) { $mlw_contact_class = "class=\"mlwRequiredText\""; } - $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->business_field_text, ENT_QUOTES)."
"; + $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->business_field_text, ENT_QUOTES)."
"; $mlw_contact_display .= ""; $mlw_contact_display .= "

"; } @@ -1221,7 +1206,7 @@ function mlwDisplayContactInfo($mlw_quiz_options) { $mlw_contact_class = "class=\"mlwEmail mlwRequiredText\""; } - $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->email_field_text, ENT_QUOTES)."
"; + $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->email_field_text, ENT_QUOTES)."
"; $mlw_contact_display .= ""; $mlw_contact_display .= "

"; } @@ -1232,7 +1217,7 @@ function mlwDisplayContactInfo($mlw_quiz_options) { $mlw_contact_class = "class=\"mlwRequiredText\""; } - $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->phone_field_text, ENT_QUOTES)."
"; + $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->phone_field_text, ENT_QUOTES)."
"; $mlw_contact_display .= ""; $mlw_contact_display .= "

"; } @@ -1253,7 +1238,7 @@ function mlwDisplayContactInfo($mlw_quiz_options) { $mlw_contact_class = "class=\"mlwRequiredText\""; } - $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->name_field_text, ENT_QUOTES)."
"; + $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->name_field_text, ENT_QUOTES)."
"; $mlw_contact_display .= ""; $mlw_contact_display .= "

"; } @@ -1264,7 +1249,7 @@ function mlwDisplayContactInfo($mlw_quiz_options) { $mlw_contact_class = "class=\"mlwRequiredText\""; } - $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->business_field_text, ENT_QUOTES)."
"; + $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->business_field_text, ENT_QUOTES)."
"; $mlw_contact_display .= ""; $mlw_contact_display .= "

"; } @@ -1275,7 +1260,7 @@ function mlwDisplayContactInfo($mlw_quiz_options) { $mlw_contact_class = "class=\"mlwEmail mlwRequiredText\""; } - $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->email_field_text, ENT_QUOTES)."
"; + $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->email_field_text, ENT_QUOTES)."
"; $mlw_contact_display .= ""; $mlw_contact_display .= "

"; } @@ -1286,7 +1271,7 @@ function mlwDisplayContactInfo($mlw_quiz_options) { $mlw_contact_class = "class=\"mlwRequiredText\""; } - $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->phone_field_text, ENT_QUOTES)."
"; + $mlw_contact_display .= "".htmlspecialchars_decode($mlw_quiz_options->phone_field_text, ENT_QUOTES)."
"; $mlw_contact_display .= ""; $mlw_contact_display .= "

"; } From 48cb7e0ca677f48fcb4f0809aa9af7120d54b6a3 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:18:34 -0500 Subject: [PATCH 18/34] Minor Spacing Change --- includes/qmn_quiz.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/qmn_quiz.css b/includes/qmn_quiz.css index 6903320e2..b9ea6df73 100644 --- a/includes/qmn_quiz.css +++ b/includes/qmn_quiz.css @@ -12,7 +12,8 @@ } .mlw_qmn_hint_link { - text-decoration:underline;color:rgb(0,0,255); + text-decoration:underline; + color:rgb(0,0,255); } .qmn_social_buttons { From f51348e67ed68a493c57186e68c95982f9199adf Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:21:05 -0500 Subject: [PATCH 19/34] Deleted Duplicate Class --- includes/mlw_quiz.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/mlw_quiz.php b/includes/mlw_quiz.php index 30a79aa0d..7bf738c62 100644 --- a/includes/mlw_quiz.php +++ b/includes/mlw_quiz.php @@ -956,8 +956,8 @@ function mlw_quiz_shortcode($atts) $qmn_social_media_text["twitter"] = apply_filters( 'mlw_qmn_template_variable_results_page', $qmn_social_media_text["twitter"], $mlw_qmn_result_array); $qmn_social_media_text["facebook"] = apply_filters( 'mlw_qmn_template_variable_results_page', $qmn_social_media_text["facebook"], $mlw_qmn_result_array); $mlw_display .= "
- quiz_name)."');\">Facebook - quiz_name)."');\">Twitter + quiz_name)."');\">Facebook + quiz_name)."');\">Twitter
"; } From d41afac1d4d67177f6bdf66cbd55f0ea57f2ceb1 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:22:11 -0500 Subject: [PATCH 20/34] Changed CSS Class Name --- includes/qmn_quiz.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/qmn_quiz.css b/includes/qmn_quiz.css index b9ea6df73..aa67b5c1d 100644 --- a/includes/qmn_quiz.css +++ b/includes/qmn_quiz.css @@ -15,11 +15,9 @@ text-decoration:underline; color:rgb(0,0,255); } -.qmn_social_buttons +.mlw_qmn_quiz_link { display: inline; vertical-align:top !important; - font-weight: bold; - cursor: pointer; text-decoration: none; } From b60bdb97278ab5f5227c9ba3b4cd89cd5bea4c8b Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:22:23 -0500 Subject: [PATCH 21/34] Updated Default Style --- includes/mlw_quiz_creator.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/includes/mlw_quiz_creator.php b/includes/mlw_quiz_creator.php index 1392aa8ca..10c00467f 100644 --- a/includes/mlw_quiz_creator.php +++ b/includes/mlw_quiz_creator.php @@ -192,17 +192,19 @@ public function create_quiz($quiz_name) div.mlw_qmn_quiz input[type=submit], a.mlw_qmn_quiz_link { - border-radius: 4px; - position: relative; - background-image: linear-gradient(#fff,#dedede); - background-color: #eee; - border: #ccc solid 1px; - color: #333; - text-shadow: 0 1px 0 rgba(255,255,255,.5); - box-sizing: border-box; - display: inline-block; - padding: 5px 5px 5px 5px; - margin: auto; + border-radius: 4px; + position: relative; + background-image: linear-gradient(#fff,#dedede); + background-color: #eee; + border: #ccc solid 1px; + color: #333; + text-shadow: 0 1px 0 rgba(255,255,255,.5); + box-sizing: border-box; + display: inline-block; + padding: 5px 5px 5px 5px; + margin: auto; + font-weight: bold; + cursor: pointer; } .mlw_qmn_question { From afc0984e549674cfcef7a4d491e3d23cdecf457c Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Fri, 26 Dec 2014 19:39:32 -0500 Subject: [PATCH 22/34] Fixed Undefined String JS --- includes/mlw_quiz.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/mlw_quiz.php b/includes/mlw_quiz.php index 7bf738c62..ceb78c6c9 100644 --- a/includes/mlw_quiz.php +++ b/includes/mlw_quiz.php @@ -209,8 +209,8 @@ function mlw_quiz_shortcode($atts) Date: Fri, 26 Dec 2014 19:49:34 -0500 Subject: [PATCH 23/34] Updated New Question Order Default Value Used existing variable $mlw_qmn_question_count to calculate next question order number. --- includes/mlw_quiz_options.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/mlw_quiz_options.php b/includes/mlw_quiz_options.php index 057ba7d8c..a3ade4a05 100644 --- a/includes/mlw_quiz_options.php +++ b/includes/mlw_quiz_options.php @@ -869,7 +869,7 @@ function mlw_add_answer_to_new_question() Question Order - From d56fb0ee5932bf2f25a44686de971f83fc3a9164 Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Mon, 29 Dec 2014 15:59:59 -0500 Subject: [PATCH 24/34] Moved Email Settings To Email Tab To make more logical groupings, I decided to move the email settings over to the email tab. I also got rid of the accordion so we can continue moving away from relying on 3rd party js. --- includes/mlw_quiz_options.php | 394 +++++++++++++++++----------------- 1 file changed, 197 insertions(+), 197 deletions(-) diff --git a/includes/mlw_quiz_options.php b/includes/mlw_quiz_options.php index a3ade4a05..91ceef680 100644 --- a/includes/mlw_quiz_options.php +++ b/includes/mlw_quiz_options.php @@ -30,7 +30,6 @@ function mlw_generate_quiz_options() wp_enqueue_script( 'jquery-ui-dialog' ); wp_enqueue_script( 'jquery-ui-button' ); wp_enqueue_script( 'jquery-ui-datepicker' ); - wp_enqueue_script( 'jquery-ui-accordion' ); wp_enqueue_script( 'jquery-ui-tooltip' ); wp_enqueue_script( 'jquery-ui-tabs' ); wp_enqueue_script( 'jquery-effects-blind' ); @@ -1251,20 +1250,17 @@ function mlw_options_option_tab_content() $mlw_total_user_tries = intval($_POST["total_user_tries"]); $mlw_require_log_in = $_POST["require_log_in"]; $mlw_limit_total_entries = $_POST["limit_total_entries"]; - $mlw_send_user_email = $_POST["sendUserEmail"]; - $mlw_send_admin_email = $_POST["sendAdminEmail"]; $mlw_contact_location = $_POST["contact_info_location"]; $mlw_user_name = $_POST["userName"]; $mlw_user_comp = $_POST["userComp"]; $mlw_user_email = $_POST["userEmail"]; $mlw_user_phone = $_POST["userPhone"]; - $mlw_admin_email = $_POST["adminEmail"]; $mlw_comment_section = $_POST["commentSection"]; $mlw_qmn_loggedin_contact = $_POST["loggedin_user_contact"]; $qmn_scheduled_timeframe = serialize(array("start" => $_POST["scheduled_time_start"], "end" => $_POST["scheduled_time_end"])); $quiz_id = $_POST["quiz_id"]; - $update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET system='".$mlw_system."', send_user_email='".$mlw_send_user_email."', send_admin_email='".$mlw_send_admin_email."', loggedin_user_contact='".$mlw_qmn_loggedin_contact."', contact_info_location=".$mlw_contact_location.", user_name='".$mlw_user_name."', user_comp='".$mlw_user_comp."', user_email='".$mlw_user_email."', user_phone='".$mlw_user_phone."', admin_email='".$mlw_admin_email."', comment_section='".$mlw_comment_section."', randomness_order='".$mlw_randomness_order."', question_from_total=".$mlw_qmn_questions_from_total.", total_user_tries=".$mlw_total_user_tries.", social_media=".$mlw_qmn_social_media.", pagination=".$mlw_qmn_pagination.", timer_limit=".$mlw_qmn_timer.", question_numbering=".$mlw_qmn_question_numbering.", require_log_in=".$mlw_require_log_in.", limit_total_entries=".$mlw_limit_total_entries.", last_activity='".date("Y-m-d H:i:s")."', scheduled_timeframe='".$qmn_scheduled_timeframe."' WHERE quiz_id=".$quiz_id; + $update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET system='".$mlw_system."', loggedin_user_contact='".$mlw_qmn_loggedin_contact."', contact_info_location=".$mlw_contact_location.", user_name='".$mlw_user_name."', user_comp='".$mlw_user_comp."', user_email='".$mlw_user_email."', user_phone='".$mlw_user_phone."', comment_section='".$mlw_comment_section."', randomness_order='".$mlw_randomness_order."', question_from_total=".$mlw_qmn_questions_from_total.", total_user_tries=".$mlw_total_user_tries.", social_media=".$mlw_qmn_social_media.", pagination=".$mlw_qmn_pagination.", timer_limit=".$mlw_qmn_timer.", question_numbering=".$mlw_qmn_question_numbering.", require_log_in=".$mlw_require_log_in.", limit_total_entries=".$mlw_limit_total_entries.", last_activity='".date("Y-m-d H:i:s")."', scheduled_timeframe='".$qmn_scheduled_timeframe."' WHERE quiz_id=".$quiz_id; $results = $wpdb->query( $update ); if ($results != false) { @@ -1431,24 +1427,6 @@ function mlw_options_option_tab_content() comment_section == 1) {echo 'checked="checked"';} ?> value='1' /> - - -
- send_user_email == 0) {echo 'checked="checked"';} ?> value='0' /> - send_user_email == 1) {echo 'checked="checked"';} ?> value='1' /> -
- - - -
- send_admin_email == 0) {echo 'checked="checked"';} ?> value='0' /> - send_admin_email == 1) {echo 'checked="checked"';} ?> value='1' /> -
- - - - -
@@ -1814,6 +1792,9 @@ function mlw_options_emails_tab_content() $mlw_qmn_email_id = intval($_POST["mlw_email_quiz_id"]); $mlw_qmn_email_template_total = intval($_POST["mlw_email_template_total"]); $mlw_qmn_email_admin_total = intval($_POST["mlw_email_admin_total"]); + $mlw_send_user_email = $_POST["sendUserEmail"]; + $mlw_send_admin_email = $_POST["sendAdminEmail"]; + $mlw_admin_email = $_POST["adminEmail"]; //Create new array $i = 1; @@ -1847,7 +1828,7 @@ function mlw_options_emails_tab_content() } $mlw_qmn_new_email_array = serialize($mlw_qmn_new_email_array); $mlw_qmn_new_admin_array = serialize($mlw_qmn_new_admin_array); - $mlw_new_email_results = $wpdb->query( $wpdb->prepare( "UPDATE ".$wpdb->prefix."mlw_quizzes SET user_email_template='%s', admin_email_template='%s', last_activity='".date("Y-m-d H:i:s")."' WHERE quiz_id=%d", $mlw_qmn_new_email_array, $mlw_qmn_new_admin_array, $mlw_qmn_email_id ) ); + $mlw_new_email_results = $wpdb->query( $wpdb->prepare( "UPDATE ".$wpdb->prefix."mlw_quizzes SET send_user_email='%s', send_admin_email='%s', admin_email='%s', user_email_template='%s', admin_email_template='%s', last_activity='".date("Y-m-d H:i:s")."' WHERE quiz_id=%d", $mlw_send_user_email, $mlw_send_admin_email, $mlw_admin_email, $mlw_qmn_new_email_array, $mlw_qmn_new_admin_array, $mlw_qmn_email_id ) ); if ($mlw_new_email_results != false) { $mlwQuizMasterNext->alertManager->newAlert('The email has been updated successfully.', 'success'); @@ -1904,11 +1885,6 @@ function mlw_options_emails_tab_content() $j(function() { $j("#new_email_button_top, #new_email_button_bottom, #new_admin_email_button_top, #new_admin_email_button_bottom").button(); }); - jQuery(function() { - jQuery("#email_accordion").accordion({ - heightStyle: "content" - }); - }); function delete_email(id) { document.getElementById('user_email_'+id).value = "Delete"; @@ -1956,6 +1932,8 @@ function delete_admin_email(id) %TIMER% - The amount of time user spent of quiz +
+
@@ -1964,180 +1942,202 @@ function delete_admin_email(id)
- +
-
-

Email Sent To User

-
- Add New Email - - - - - - - - - - - - + + + + + + + + + + + + +
IDScore Greater Than Or Equal ToScore Less Than Or Equal ToSubjectEmail To Send
+ send_user_email == 0) {echo 'checked="checked"';} ?> value='0' /> + send_user_email == 1) {echo 'checked="checked"';} ?> value='1' /> +
+ send_admin_email == 0) {echo 'checked="checked"';} ?> value='0' /> + send_admin_email == 1) {echo 'checked="checked"';} ?> value='1' /> +
+
+
+

Email Sent To User

+ Add New User Email + + + + + + + + + + + + "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - break; - } - else - { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } + $mlw_each[3] = "Quiz Results For %QUIZ_NAME%"; } - ?> - - - - - - - - - - -
IDScore Greater Than Or Equal ToScore Less Than Or Equal ToSubjectEmail To Send
"; - echo "Default"; - echo ""; - echo "-"; - echo ""; - echo "-"; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
"; - echo $mlw_each_count."
Are you sure?
Yes|No
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
IDScore Greater Than Or Equal ToScore Less Than Or Equal ToSubjectEmail To Send
- Add New Email - - - -
-

Email Sent To Admin

-
- Add New Email - - - - - - - - - - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - break; - } - else - { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + break; } - ?> - - - - - - - - - - -
IDScore Greater Than Or Equal ToScore Less Than Or Equal ToSubjectEmail To Send
"; - echo "Default"; - echo ""; - echo "-"; - echo ""; - echo "-"; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
"; - echo $mlw_admin_count."
Are you sure?
Yes|No
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
"; + echo "Default"; + echo ""; + echo "-"; + echo ""; + echo "-"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
IDScore Greater Than Or Equal ToScore Less Than Or Equal ToSubjectEmail To Send
- Add New Email - -
-
+ else + { + echo ""; + echo ""; + echo $mlw_each_count."
Are you sure?
Yes|No
"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + } + ?> + + + + ID + Score Greater Than Or Equal To + Score Less Than Or Equal To + Subject + Email To Send + + + + Add New User Email + + + +
+
+
+
+

Email Sent To Admin

+ Add New Admin Email + + + + + + + + + + + + "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + break; + } + else + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + } + ?> + + + + + + + + + + +
IDScore Greater Than Or Equal ToScore Less Than Or Equal ToSubjectEmail To Send
"; + echo "Default"; + echo ""; + echo "-"; + echo ""; + echo "-"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
"; + echo $mlw_admin_count."
Are you sure?
Yes|No
"; + echo "
"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
IDScore Greater Than Or Equal ToScore Less Than Or Equal ToSubjectEmail To Send
+ Add New Admin Email + - +
+
+
Date: Mon, 29 Dec 2014 16:22:47 -0500 Subject: [PATCH 25/34] Changed All Textareas On Text To WP Editor --- includes/mlw_quiz_options.php | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/includes/mlw_quiz_options.php b/includes/mlw_quiz_options.php index 91ceef680..2ab2ae600 100644 --- a/includes/mlw_quiz_options.php +++ b/includes/mlw_quiz_options.php @@ -1068,8 +1068,7 @@ function mlw_options_text_tab_content()

- %QUIZ_NAME%

- %CURRENT_DATE%

- - + message_before, ENT_QUOTES), 'mlw_quiz_before_message' ); ?> @@ -1079,8 +1078,7 @@ function mlw_options_text_tab_content()

- %QUIZ_NAME%

- %CURRENT_DATE%

- - + message_comment, ENT_QUOTES), 'mlw_quiz_before_comments' ); ?> @@ -1090,8 +1088,7 @@ function mlw_options_text_tab_content()

- %QUIZ_NAME%

- %CURRENT_DATE%

- - + message_end_template, ENT_QUOTES), 'message_end_template' ); ?> @@ -1101,8 +1098,7 @@ function mlw_options_text_tab_content()

- %QUIZ_NAME%

- %CURRENT_DATE%

- - + total_user_tries_text, ENT_QUOTES), 'mlw_quiz_total_user_tries_text' ); ?> @@ -1112,8 +1108,7 @@ function mlw_options_text_tab_content()

- %QUIZ_NAME%

- %CURRENT_DATE%

- - + require_log_in_text, ENT_QUOTES), 'mlw_require_log_in_text' ); ?> @@ -1123,8 +1118,7 @@ function mlw_options_text_tab_content()

- %QUIZ_NAME%

- %CURRENT_DATE%

- - + scheduled_timeframe_text, ENT_QUOTES), 'mlw_scheduled_timeframe_text' ); ?> @@ -1134,8 +1128,7 @@ function mlw_options_text_tab_content()

- %QUIZ_NAME%

- %CURRENT_DATE%

- - + limit_total_entries_text, ENT_QUOTES), 'mlw_limit_total_entries_text' ); ?> @@ -1148,8 +1141,7 @@ function mlw_options_text_tab_content()

- %USER_COMMENTS%

- %CORRECT_ANSWER_INFO%

- - + question_answer_template, ENT_QUOTES), 'mlw_quiz_question_answer_template' ); ?> @@ -1165,7 +1157,7 @@ function mlw_options_text_tab_content()

- %TIMER%

- %CURRENT_DATE%

- + @@ -1182,8 +1174,7 @@ function mlw_options_text_tab_content()

- %TIMER%

- %CURRENT_DATE%

- - +

Other Templates

From 2e28e31794467b57c5413ccf398872ab6d6fe2cc Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Mon, 29 Dec 2014 16:47:14 -0500 Subject: [PATCH 26/34] Replaced jQuery Buttons With WordPress Class --- includes/mlw_quiz_options.php | 61 +++++++++++++++-------------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/includes/mlw_quiz_options.php b/includes/mlw_quiz_options.php index 2ab2ae600..2df925ba8 100644 --- a/includes/mlw_quiz_options.php +++ b/includes/mlw_quiz_options.php @@ -30,7 +30,6 @@ function mlw_generate_quiz_options() wp_enqueue_script( 'jquery-ui-dialog' ); wp_enqueue_script( 'jquery-ui-button' ); wp_enqueue_script( 'jquery-ui-datepicker' ); - wp_enqueue_script( 'jquery-ui-tooltip' ); wp_enqueue_script( 'jquery-ui-tabs' ); wp_enqueue_script( 'jquery-effects-blind' ); wp_enqueue_script( 'jquery-effects-explode' ); @@ -40,7 +39,6 @@ function mlw_generate_quiz_options() // increase the default animation speed to exaggerate the effect $j.fx.speeds._default = 1000; $j(function() { - $j("button").button(); $j( "#tabs" ).tabs(); }); @@ -440,10 +438,6 @@ function mlw_options_questions_tab_content() ?>
- + "; echo ""; @@ -1433,7 +1427,7 @@ function mlw_options_option_tab_content()
- + "; ?> %QUIZ_NAME% - The name of the quiz - + "; echo ""; @@ -1537,7 +1531,7 @@ function mlw_options_leaderboard_tab_content() - + Quiz Certificate (Beta)

Enter in your text here to fill in the certificate for this quiz. Be sure to enter in the link variable into the templates on the Quiz Text tab so the user can access the certificate.

These fields cannot contain HTML.

- + "; echo ""; @@ -1662,7 +1656,7 @@ function mlw_options_certificate_tab_content() - +

- +

Custom Theme CSS

Entire quiz is a div with class 'mlw_qmn_quiz'

@@ -2465,7 +2456,7 @@ function mlw_qmn_theme(theme)

Each button shown for pagination (i.e Next/Previous) is wrapped in class 'mlw_qmn_quiz_link'

Timer is wrapped in class 'mlw_qmn_timer'

Each horizontal multiple response is wrapped in a span with class 'mlw_horizontal_multiple'

- + @@ -2517,7 +2508,7 @@ function mlw_qmn_theme(theme)
- +

Use this button to reset all the stats collected for this quiz (Quiz Views and Times Quiz Has Been Taken).

- + -

*Required currently only works on open answer, number, and captcha question types

+

*Required currently only works on open answer, number, accept, and captcha question types

"; From a0dcd94cca652e97105b078a5a25eff8e6a8fb3d Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Mon, 29 Dec 2014 19:09:05 -0500 Subject: [PATCH 34/34] Prepare Credits File For Release --- includes/mlw_qmn_credits.php | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/includes/mlw_qmn_credits.php b/includes/mlw_qmn_credits.php index 2fc7db770..77d13de93 100644 --- a/includes/mlw_qmn_credits.php +++ b/includes/mlw_qmn_credits.php @@ -87,24 +87,15 @@ function mlw_qmn_setTab(tab) {
Version
-

Ability To Send Different Admin Emails Based On Score

-

You can now set up different admin emails based on score similarly to the user emails. You can also now customize the admin email's seubject.

-
-

New Dashboard Widget

-

We added a new dashboard widget that shows a snapshot of how your quizzes are doing. Includes daily total, most popular quiz, and more.

-
-

New Help Page

-

There is now a new page in the menu titled "Help". This page now has the support widget on it and a link to the documentation. We also added a system info widget on this page to better assist when trying to solve errors.

-
-

For Developers:

-

We added 4 new hooks in the Quiz Creator class. You can now hook into when a quiz is created, duplicated, deleted, or its name is changed. We also begun work on a few quiz settings helper functions in the class as well.

+

New Text Editors On Text Tab

+

When editing text on the text tab, you will now being using the WordPress editor. You will be able to easily style your text as well as add media.


Please Take Our Survey To Better Improve This Plugin

When you have a moment, please take our survey for this plugin. By filling out the survey, you are helping us improve this plugin. Users who take the survey between now and December 31st, 2014 will be emailed a 25% off coupon for our WordPress Store. When you are ready, please take our survey.

@@ -112,13 +103,15 @@ function mlw_qmn_setTab(tab) {

We Are On GitHub Now

We have had several users ask for this so we thought we would try it out. We now love github! Be sure to make suggestions or contribute.


-

Popular Add-on Pack

-

Our Popular Add-On Pack is now only $45 for 6 add-ons! Now is the time to save almost 50%! Visit our WordPress Store for details.