Skip to content

Commit

Permalink
Merge pull request #2507 from QuizandSurveyMaster/dev-zubair
Browse files Browse the repository at this point in the history
Dev zubair
  • Loading branch information
zubairraeen authored Mar 26, 2024
2 parents 8c151ee + b703f43 commit 3f4044b
Show file tree
Hide file tree
Showing 14 changed files with 271 additions and 231 deletions.
280 changes: 146 additions & 134 deletions blocks/block.php

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion blocks/build/answer-option/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<?php return array('dependencies' => array('react', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '2d3f4bd22446647134b1');
<?php return array(
'dependencies' => array( 'react', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url' ),
'version' => '2d3f4bd22446647134b1',
);
5 changes: 4 additions & 1 deletion blocks/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices'), 'version' => '9ae62c1e6dbc6a16c846');
<?php return array(
'dependencies' => array( 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices' ),
'version' => '9ae62c1e6dbc6a16c846',
);
5 changes: 4 additions & 1 deletion blocks/build/page/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'b938d315c3e97d3c8ae6');
<?php return array(
'dependencies' => array( 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n' ),
'version' => 'b938d315c3e97d3c8ae6',
);
5 changes: 4 additions & 1 deletion blocks/build/question/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<?php return array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices'), 'version' => '45906d9cb21e070d8451');
<?php return array(
'dependencies' => array( 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices' ),
'version' => '45906d9cb21e070d8451',
);
2 changes: 1 addition & 1 deletion blocks/src/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
*/
?>
<p <?php echo get_block_wrapper_attributes(); ?>>
<?php esc_html_e( 'QSM Block hello from a dynamic block!', 'main-block' ); ?>
<?php esc_html_e( 'QSM Block hello from a dynamic block!', 'quiz-master-next' ); ?>
</p>
8 changes: 8 additions & 0 deletions css/qsm-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,14 @@ ul.changelog li.update div.two:before {
#qsm-export-settings-options .select2-container{
max-width: 430px;
}
.qsm-btn-link-global-settings {
line-height: 27px;
margin-right: 10px;
}
#qsm-export-settings-options .ms-options-wrap>.ms-options>.ms-search input{
max-width: 100% !important;
border: 1px solid #dcdccfd4;
}
.admin_page_mlw_quiz_options .qsm-info-widget {
background: #fff;
margin: 0 0 20px 0;
Expand Down
7 changes: 1 addition & 6 deletions js/qsm-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,8 @@ var QSMAdmin;
MicroModal.show('qsm-global-default-popup');
});
$(document).on('click', '#qsm-apply-global-settings', function () {
console.log($('#qsm-select-quiz-apply').multiselect('getChecked'));
let selectedCount = $('#qsm-select-quiz-apply').find('option:selected').length;
jQuery("#qsm-quizzes-global-count").text(selectedCount);
MicroModal.show('qsm-global-apply-default-popup');
});
$(document).on('click', '#qsm-apply-global-default-btn', function () {
jQuery('#qsm-apply-global-settings-form').submit();
});

$('#qmn_check_all').change(function () {
$('.qmn_delete_checkbox').prop('checked', jQuery('#qmn_check_all').prop('checked'));
Expand Down Expand Up @@ -184,6 +178,7 @@ var QSMAdmin;
if( jQuery('#qsm-select-quiz-apply').length ) {
$('#qsm-select-quiz-apply').multiselect({
columns: 1,
placeholder: qsm_admin_messages.select,
search: true,
selectAll: true,
dropdownAutoWidth: false,
Expand Down
5 changes: 3 additions & 2 deletions mlw_quizmaster2.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private function load_dependencies() {
include_once 'php/adverts-generate.php';
include_once 'php/question-types.php';
include_once 'php/default-templates.php';
include_once 'php/shortcodes.php';
include_once 'php/shortcodes.php';

include_once 'php/classes/class-qmn-alert-manager.php';
$this->alertManager = new MlwQmnAlertManager();
Expand Down Expand Up @@ -487,6 +487,7 @@ public function qsm_admin_scripts_style( $hook ) {
'variables' => __("Variables", 'quiz-master-next'),
'insert_variable' => __("Insert QSM variables", 'quiz-master-next'),
'select_all' => __("Select All", 'quiz-master-next'),
'select' => __("Select", 'quiz-master-next'),
);
$qsm_admin_messages = apply_filters( 'qsm_admin_messages_after', $qsm_admin_messages );
wp_localize_script( 'qsm_admin_js', 'qsm_admin_messages', $qsm_admin_messages );
Expand Down Expand Up @@ -587,7 +588,7 @@ public function register_quiz_post_types() {
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_in_rest' => true,
'show_in_rest' => true,
'show_tagcloud' => false,
'rewrite' => false,
);
Expand Down
20 changes: 10 additions & 10 deletions php/admin/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
global $globalQuizsetting, $mlwQuizMasterNext, $themes_data;

$quiz_setting_option = array(
'form_type' => array(
'form_type' => array(
'option_name' => __( 'Form Type', 'quiz-master-next' ),
'value' => $globalQuizsetting['form_type'],
'default' => 0,
Expand All @@ -608,7 +608,7 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
),
),
),
'system' => array(
'system' => array(
'option_name' => __( 'Grading System', 'quiz-master-next' ),
'value' => $globalQuizsetting['system'],
'default' => 0,
Expand All @@ -629,7 +629,7 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
),
'help' => __( 'Select the system for grading the quiz.', 'quiz-master-next' ),
),
'enable_contact_form' => array(
'enable_contact_form' => array(
'option_name' => __( 'Display a contact form before quiz', 'quiz-master-next' ),
'value' => 0,
'type' => 'radio',
Expand All @@ -644,21 +644,21 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
),
),
),
'timer_limit' => array(
'timer_limit' => array(
'option_name' => __( 'Time Limit (in Minute)', 'quiz-master-next' ),
'value' => $globalQuizsetting['timer_limit'],
'type' => 'number',
'default' => 0,
'help' => __( 'Leave 0 for no time limit', 'quiz-master-next' ),
),
'pagination' => array(
'pagination' => array(
'option_name' => __( 'Questions Per Page', 'quiz-master-next' ),
'value' => $globalQuizsetting['pagination'],
'type' => 'number',
'default' => 0,
'help' => __( 'Override the default pagination created on questions tab', 'quiz-master-next' ),
),
'enable_pagination_quiz' => array(
'enable_pagination_quiz' => array(
'option_name' => __( 'Show current page number', 'quiz-master-next' ),
'value' => $globalQuizsetting['enable_pagination_quiz'],
'options' => array(
Expand Down Expand Up @@ -689,7 +689,7 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
),
'default' => 0,
),
'progress_bar' => array(
'progress_bar' => array(
'option_name' => __( 'Show progress bar', 'quiz-master-next' ),
'value' => $globalQuizsetting['enable_pagination_quiz'],
'type' => 'radio',
Expand All @@ -705,7 +705,7 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
),
'default' => 0,
),
'require_log_in' => array(
'require_log_in' => array(
'option_name' => __( 'Require User Login', 'quiz-master-next' ),
'value' => $globalQuizsetting['require_log_in'],
'type' => 'radio',
Expand All @@ -722,7 +722,7 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
'default' => 0,
'help' => __( 'Enabling this allows only logged in users to take the quiz', 'quiz-master-next' ),
),
'disable_first_page' => array(
'disable_first_page' => array(
'option_name' => __( 'Disable first page on quiz', 'quiz-master-next' ),
'value' => $globalQuizsetting['disable_first_page'],
'type' => 'radio',
Expand All @@ -738,7 +738,7 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
),
'default' => 0,
),
'comment_section' => array(
'comment_section' => array(
'option_name' => __( 'Enable Comment box', 'quiz-master-next' ),
'value' => $globalQuizsetting['comment_section'],
'type' => 'radio',
Expand Down
Loading

0 comments on commit 3f4044b

Please sign in to comment.