Skip to content

Commit

Permalink
Merge pull request #799 from QuizandSurveyMaster/dev
Browse files Browse the repository at this point in the history
v6.3.5
  • Loading branch information
vikasprogrammer authored Nov 20, 2019
2 parents 7ab2c6c + 96602bf commit 2f3770c
Show file tree
Hide file tree
Showing 21 changed files with 4,071 additions and 104 deletions.
3,625 changes: 3,625 additions & 0 deletions css/animate.css

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions css/common.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Created by dev: 06-11-2019
*/
.qsm-page .pages_count,
.quiz_section .pages_count{
display: block;
text-align: center;
}
.mlw_qmn_question p:empty{
display: none;
}
125 changes: 125 additions & 0 deletions css/qsm-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ Misc.
padding: 10px 10px 10px 10px;
}

.qsm_tab_content label{
margin-right: 20px;
}

/* Popup */

.qsm-popup {
Expand Down Expand Up @@ -684,7 +688,128 @@ h3.addon_category_name {
background: #d7d1d1;
padding: 15px;
}
/*Design of new radio taggle*/
.buttonset.ui-buttonset .ui-button.ui-state-active {
background: #E21130 none repeat scroll 0 0;
border-color: #E21130 !important;
}
.buttonset.ui-buttonset .ui-button.ui-state-active span.ui-button-text{
color: #fff !important;
}
.buttonset.ui-buttonset.green .ui-state-active {
background: #44c767 none repeat scroll 0 0;
border-color: #44c767 !important;
}
.buttonset.ui-buttonset .ui-button.ui-state-active.ui-corner-left {
background: #44c767 none repeat scroll 0 0;
border-color: #44c767 !important;
}
.buttonset.ui-buttonset label {
background: #fff;
border: 1px solid #B6B6B6;
margin-right: -5px !important;
}
.buttonset.ui-buttonset label span.ui-button-text{
color: #727272;
font-size: 12px;
height: 35px;
line-height: 35px;
min-width: 20px;
padding: 0 10px;
}
.qsm_tab_content input[type="text"],
.qsm_tab_content input[type="number"],
.qsm_global_settings input[type="text"],
.qsm_global_settings input[type="number"],
.qsm_global_settings input[type="email"],
.qsm-addon-setting-wrap input[type="email"],
.qsm-addon-setting-wrap input[type="text"],
.qsm-addon-setting-wrap input[type="number"]{
background: #ffffff none repeat scroll 0 0;
border: 1px solid #dddddd;
border-radius: 5px;
box-shadow: none;
color: #666666;
padding: 10px 15px;
width: auto;
height: auto;
min-width: 230px;
max-width:100%;
}
.qsm_tab_content textarea{
background: #ffffff none repeat scroll 0 0;
border: 1px solid #dddddd;
border-radius: 5px;
box-shadow: none;
color: #666666;
padding: 10px 15px;
width: auto;
height: auto;
}
.global-sub-text{
margin-left: 15px;
}
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}

/* Hide default HTML checkbox */
.switch input[type="checkbox"] {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}

.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}

input:checked + .slider {
background-color: #2196F3;
}

input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
border-radius: 34px;
}

.slider.round:before {
border-radius: 50%;
}
@media screen and (max-width: 767px){
.qsm-quiz-row td:nth-of-type(2n){
display: none;
Expand Down
2 changes: 2 additions & 0 deletions js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,7 @@ var QSMAdmin;
}
);
});
/**/
jQuery('.buttonset').buttonset();
});
}(jQuery));
6 changes: 3 additions & 3 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ function qmnValidation( element, quiz_form_id ) {
var number_error = qmn_quiz_data[ quiz_id ].error_messages.number;
var empty_error = qmn_quiz_data[ quiz_id ].error_messages.empty;
var incorrect_error = qmn_quiz_data[ quiz_id ].error_messages.incorrect;
qmnResetError( quiz_form_id );
jQuery( element ).each(function(){
qmnResetError( quiz_form_id );
jQuery( element ).each(function(){
if ( jQuery( this ).attr( 'class' )) {
if( jQuery( this ).attr( 'class' ).indexOf( 'mlwEmail' ) > -1 && this.value !== "" ) {
var x = this.value;
Expand Down Expand Up @@ -440,7 +440,7 @@ function qmnValidation( element, quiz_form_id ) {
}
}
if( jQuery( this ).attr( 'class' ).indexOf( 'qsmRequiredSelect' ) > -1 ) {
check_val = jQuery( this ).val();
check_val = jQuery( this ).val();
if ( check_val == "No Answer Provided" ) {
qmnDisplayError( empty_error, jQuery( this ), quiz_form_id );
result = false;
Expand Down
2 changes: 2 additions & 0 deletions mlw_quizmaster2.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

define( 'QSM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
define( 'QSM_SUBMENU', __FILE__);
define('hide_qsm_adv', true);

/**
* This class is the main class of the plugin
*
Expand Down
3 changes: 2 additions & 1 deletion php/admin/addons-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ function qmn_addons_page() {
global $mlwQuizMasterNext;
$active_tab = strtolower(str_replace(" ", "-", isset($_GET['tab']) ? $_GET['tab'] : __('Featured Addons', 'quiz-master-next')));
$tab_array = $mlwQuizMasterNext->pluginHelper->get_addon_tabs();
wp_enqueue_style( 'qsm_admin_style', plugins_url( '../../css/qsm-admin.css', __FILE__ ), array(), $mlwQuizMasterNext->version );
?>
<div class="wrap">
<div class="wrap qsm-addon-setting-wrap">
<h2>Quiz And Survey Master Addon Settings</h2>
<h2 class="nav-tab-wrapper">
<?php
Expand Down
22 changes: 12 additions & 10 deletions php/admin/admin-results-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function qsm_results_overview_tab_content() {
} else {
$mlw_quiz_data = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_results WHERE deleted = '0' $search_phrase_sql $order_by_sql LIMIT %d, %d", $result_begin, $table_limit ) );
}

wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'jquery-ui-core' );
wp_enqueue_script( 'jquery-ui-dialog' );
Expand Down Expand Up @@ -307,8 +307,7 @@ function deleteResults(id,quizName){
<table class=widefat>
<thead>
<tr>
<th><input type="checkbox" id="qmn_check_all" /></th>
<th><?php esc_html_e( 'Actions','quiz-master-next' ); ?></th>
<th><input type="checkbox" id="qmn_check_all" /></th>
<th><?php esc_html_e( 'Quiz Name','quiz-master-next' ); ?></th>
<th><?php esc_html_e( 'Score','quiz-master-next' ); ?></th>
<th><?php esc_html_e( 'Time To Complete','quiz-master-next' ); ?></th>
Expand All @@ -321,11 +320,12 @@ function deleteResults(id,quizName){
<th><?php esc_html_e( 'IP Address','quiz-master-next' ); ?></th>
</tr>
</thead>
<?php
<?php
$quotes_list = "";
$display = "";
$alternate = "";
foreach ( $mlw_quiz_data as $mlw_quiz_info ) {
if($mlw_quiz_data){
foreach ( $mlw_quiz_data as $mlw_quiz_info ) {
if ( $alternate ) {
$alternate = '';
} else {
Expand All @@ -347,9 +347,8 @@ function deleteResults(id,quizName){
}

$quotes_list .= "<tr{$alternate}>";
$quotes_list .= "<td><input type='checkbox' class='qmn_delete_checkbox' name='delete_results[]' value='".$mlw_quiz_info->result_id. "' /></td>";
$quotes_list .= "<td><span style='color:green;font-size:16px;'><a href='admin.php?page=qsm_quiz_result_details&&result_id=".$mlw_quiz_info->result_id."'>View</a>|<a onclick=\"deleteResults('".$mlw_quiz_info->result_id."','".esc_js($mlw_quiz_info->quiz_name)."')\" href='#'>Delete</a></span></td>";
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->quiz_name . "</span></td>";
$quotes_list .= "<td><input type='checkbox' class='qmn_delete_checkbox' name='delete_results[]' value='".$mlw_quiz_info->result_id. "' /></td>";
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->quiz_name . "</span><div class='row-actions'><span style='color:green;font-size:16px;'><a href='admin.php?page=qsm_quiz_result_details&&result_id=".$mlw_quiz_info->result_id."'>View</a> | <a style='color: red;' onclick=\"deleteResults('".$mlw_quiz_info->result_id."','".esc_js($mlw_quiz_info->quiz_name)."')\" href='#'>Delete</a></span></div></td>";
if ( $mlw_quiz_info->quiz_system == 0 ) {
$quotes_list .= "<td class='post-title column-title'><span style='font-size:16px;'>" . $mlw_quiz_info->correct ." out of ".$mlw_quiz_info->total." or ".$mlw_quiz_info->correct_score."%</span></td>";
}
Expand All @@ -371,10 +370,13 @@ function deleteResults(id,quizName){
}
$date = date_i18n( get_option( 'date_format' ), strtotime( $mlw_quiz_info->time_taken ) );
$time = date( "h:i:s A", strtotime( $mlw_quiz_info->time_taken ) );
$quotes_list .= "<td><span style='font-size:16px;'>$date $time</span></td>";
$quotes_list .= "<td><span style='font-size:16px;'><abbr title='$date $time'>$date</abbr></span></td>";
$quotes_list .= "<td><span style='font-size:16px;'>" . $mlw_quiz_info->user_ip . "</span></td>";
$quotes_list .= "</tr>";
}
}
}else{
$quotes_list .= "<tr{$alternate}><td colspan='12' style='text-align: center;'>". __('No record found.','quiz_master_next') ."</td></tr>";
}
$display .= "<tbody id=\"the-list\">{$quotes_list}</tbody>";
echo $display;
?>
Expand Down
2 changes: 1 addition & 1 deletion php/admin/quiz-options-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function qsm_generate_quiz_options() {
<form action='' method='post' id="edit-name-form">
<label><?php _e( 'Name', 'quiz-master-next' ); ?></label>
<input type="text" id="edit_quiz_name" name="edit_quiz_name" value="<?php echo $quiz_name; ?>" />
<input type="hidden" id="edit_quiz_id" name="edit_quiz_id" value="<?php echo isset($_GET['quiz_id']) ? $_GET['quiz_id'] : ''; ?>" />
<input type="hidden" id="edit_quiz_id" name="edit_quiz_id" value="<?php echo isset($_GET['quiz_id']) && is_int($_GET['quiz_id']) ? (int) $_GET['quiz_id'] : '0'; ?>" />
<?php wp_nonce_field( 'qsm_edit_name_quiz', 'qsm_edit_name_quiz_nonce' ); ?>
</form>
</main>
Expand Down
4 changes: 2 additions & 2 deletions php/admin/quizzes-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function qsm_generate_quizzes_surveys_page() {
}
?>
<div class="qsm-quizzes-page-content">
<div class="<?php if ( 'false' != get_option( 'mlw_advert_shows' ) ) { echo 'qsm-quiz-page-wrapper-with-ads'; } else { echo 'qsm-quiz-page-wrapper'; } ?>">
<div class="<?php if ( 'false' != get_option( 'mlw_advert_shows' ) && hide_qsm_adv !== TRUE ) { echo 'qsm-quiz-page-wrapper-with-ads'; } else { echo 'qsm-quiz-page-wrapper'; } ?>">
<p class="search-box">
<label class="screen-reader-text" for="quiz_search"><?php esc_html_e( 'Search', 'quiz-master-next' ); ?></label>
<input type="search" id="quiz_search" name="quiz_search" value="">
Expand Down Expand Up @@ -181,7 +181,7 @@ function qsm_generate_quizzes_surveys_page() {
</table>
</div>
<?php
if ( 'true' == get_option( 'mlw_advert_shows' ) ) {
if ( 'true' == get_option( 'mlw_advert_shows' ) && hide_qsm_adv !== TRUE ) {
?>
<div class="qsm-news-ads">
<h3 class="qsm-news-ads-title"><?php esc_html_e( 'QSM News', 'quiz-master-next' ); ?></h3>
Expand Down
Loading

0 comments on commit 2f3770c

Please sign in to comment.