public function save(WpProQuiz_Model_GlobalSettings $settings)
 {
     if (add_option('wpProQuiz_addRawShortcode', $settings->isAddRawShortcode()) === false) {
         update_option('wpProQuiz_addRawShortcode', $settings->isAddRawShortcode());
     }
     if (add_option('wpProQuiz_jsLoadInHead', $settings->isJsLoadInHead()) === false) {
         update_option('wpProQuiz_jsLoadInHead', $settings->isJsLoadInHead());
     }
     if (add_option('wpProQuiz_touchLibraryDeactivate', $settings->isTouchLibraryDeactivate()) === false) {
         update_option('wpProQuiz_touchLibraryDeactivate', $settings->isTouchLibraryDeactivate());
     }
     if (add_option('wpProQuiz_corsActivated', $settings->isCorsActivated()) === false) {
         update_option('wpProQuiz_corsActivated', $settings->isCorsActivated());
     }
 }
 private function loadJsScripts($footer = true, $quiz = true, $toplist = false)
 {
     if ($quiz) {
         wp_enqueue_script('wpProQuiz_front_javascript', plugins_url('js/wpProQuiz_front' . (WPPROQUIZ_DEV ? '' : '.min') . '.js', WPPROQUIZ_FILE), array('jquery-ui-sortable'), WPPROQUIZ_VERSION, $footer);
         wp_localize_script('wpProQuiz_front_javascript', 'WpProQuizGlobal', array('ajaxurl' => admin_url('admin-ajax.php'), 'loadData' => __('Loading', 'wp-pro-quiz'), 'questionNotSolved' => __('You must answer this question.', 'wp-pro-quiz'), 'questionsNotSolved' => __('You must answer all questions before you can completed the quiz.', 'wp-pro-quiz'), 'fieldsNotFilled' => __('All fields have to be filled.', 'wp-pro-quiz')));
     }
     if ($toplist) {
         wp_enqueue_script('wpProQuiz_front_javascript_toplist', plugins_url('js/wpProQuiz_toplist' . (WPPROQUIZ_DEV ? '' : '.min') . '.js', WPPROQUIZ_FILE), array('jquery-ui-sortable'), WPPROQUIZ_VERSION, $footer);
         if (!wp_script_is('wpProQuiz_front_javascript')) {
             wp_localize_script('wpProQuiz_front_javascript_toplist', 'WpProQuizGlobal', array('ajaxurl' => admin_url('admin-ajax.php'), 'loadData' => __('Loading', 'wp-pro-quiz'), 'questionNotSolved' => __('You must answer this question.', 'wp-pro-quiz'), 'questionsNotSolved' => __('You must answer all questions before you can completed the quiz.', 'wp-pro-quiz'), 'fieldsNotFilled' => __('All fields have to be filled.', 'wp-pro-quiz')));
         }
     }
     if (!$this->_settings->isTouchLibraryDeactivate()) {
         wp_enqueue_script('jquery-ui-touch-punch', plugins_url('js/jquery.ui.touch-punch.min.js', WPPROQUIZ_FILE), array('jquery-ui-sortable'), '0.2.2', $footer);
     }
 }