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.

"; $mlw_display .= ""; @@ -972,10 +684,12 @@ function mlw_validateForm() //See which answers were correct and award points if necessary $mlw_user_text = ""; $mlw_correct_text = ""; + $qmn_correct = "incorrect"; $mlw_qmn_answer_array = array(); foreach($mlw_questions as $mlw_question) { $mlw_user_text = ""; $mlw_correct_text = ""; + $qmn_correct = "incorrect"; if ( isset($_POST["question".$mlw_question->question_id]) || isset($_POST["mlwComment".$mlw_question->question_id]) ) { if ( $mlw_question->question_type == 0 || $mlw_question->question_type == 1 || $mlw_question->question_type == 2) @@ -998,6 +712,7 @@ function mlw_validateForm() if ($mlw_qmn_question_answers_each[2] == 1) { $mlw_correct += 1; + $qmn_correct = "correct"; } } if ($mlw_qmn_question_answers_each[2] == 1) @@ -1024,6 +739,7 @@ function mlw_validateForm() if (strtoupper($mlw_user_text) == strtoupper($mlw_correct_text)) { $mlw_correct += 1; + $qmn_correct = "correct"; $mlw_points += $mlw_qmn_question_answers_each[1]; break; } @@ -1061,6 +777,7 @@ function mlw_validateForm() if ($mlw_qmn_user_correct_answers == $mlw_qmn_total_correct_answers) { $mlw_correct += 1; + $qmn_correct = "correct"; } } if (isset($_POST["mlwComment".$mlw_question->question_id])) @@ -1079,7 +796,7 @@ function mlw_validateForm() $mlw_question_answer_display = str_replace( "%USER_COMMENTS%" , $mlw_qm_question_comment, $mlw_question_answer_display); $mlw_question_answer_display = str_replace( "%CORRECT_ANSWER_INFO%" , htmlspecialchars_decode($mlw_question->question_answer_info, ENT_QUOTES), $mlw_question_answer_display); - $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)); + $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), "correct" => $qmn_correct, "id" => $mlw_question->question_id); $mlw_question_answers .= $mlw_question_answer_display; $mlw_question_answers .= "
"; @@ -1168,7 +885,7 @@ function mlw_validateForm() $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"; } /* @@ -1226,34 +943,8 @@ function mlw_validateForm() if ($mlw_quiz_options->social_media == 1) { - ?> - - social_media_text) && is_array(@unserialize($mlw_quiz_options->social_media_text))) @@ -1270,8 +961,8 @@ function mlw_qmn_share(network, mlw_qmn_social_text, mlw_qmn_title) $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
"; } @@ -1497,7 +1188,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 .= "

"; @@ -1509,7 +1200,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 .= "

"; } @@ -1520,7 +1211,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 .= "

"; } @@ -1531,7 +1222,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 .= "

"; } @@ -1552,7 +1243,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 .= "

"; } @@ -1563,7 +1254,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 .= "

"; } @@ -1574,7 +1265,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 .= "

"; } @@ -1585,7 +1276,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 .= "

"; } diff --git a/includes/mlw_quiz_creator.php b/includes/mlw_quiz_creator.php index 5dee7b414..10c00467f 100644 --- a/includes/mlw_quiz_creator.php +++ b/includes/mlw_quiz_creator.php @@ -192,17 +192,27 @@ 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 + { + 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( diff --git a/includes/mlw_quiz_options.php b/includes/mlw_quiz_options.php index 057ba7d8c..0c5425801 100644 --- a/includes/mlw_quiz_options.php +++ b/includes/mlw_quiz_options.php @@ -30,8 +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' ); wp_enqueue_script( 'jquery-effects-explode' ); @@ -41,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(); }); @@ -441,10 +438,6 @@ function mlw_options_questions_tab_content() ?>
- + "; echo ""; @@ -1431,24 +1412,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' /> -
- - - - -
@@ -1464,7 +1427,7 @@ function mlw_options_option_tab_content()
- + "; ?> %QUIZ_NAME% - The name of the quiz - + "; echo ""; @@ -1568,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 ""; @@ -1693,7 +1656,7 @@ function mlw_options_certificate_tab_content() - + 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'); @@ -1901,14 +1867,6 @@ function mlw_options_emails_tab_content()


- +

Custom Theme CSS

Entire quiz is a div with class 'mlw_qmn_quiz'

@@ -2474,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'

- + @@ -2526,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).

- +