PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.6.9.3
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.6.9.3
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / admin / views / quiz / question-settings.php

question-settings.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.6.9.3, at inc/admin/views/quiz/question-settings.php

54 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Question template.
4 *
5 * @since 3.0.0
6 */
7
8 learn_press_admin_view( 'quiz/question-answer' );
9 learn_press_admin_view( 'quiz/question-meta' );
10 ?>
11
12 <script type="text/x-template" id="tmpl-lp-quiz-question-settings">
13 <div class="question-settings" :class="[question.open ? 'table-row' : 'hide-if-js', isHiddenSettings(question.id) ? 'closed' : '']">
14 <template v-if="!supportAnswerOptions">
15 <?php do_action( 'learn-press/quiz-editor/question-js-component' ); ?>
16 </template>
17 <template v-else-if="isFillInBlank">
18 <lp-quiz-fib-question-answer :question="question"></lp-quiz-fib-question-answer>
19 </template>
20 <template v-else>
21 <lp-quiz-question-answers :question="question"></lp-quiz-question-answers>
22 </template>
23
24 <lp-quiz-question-meta :question="question"></lp-quiz-question-meta>
25 </div>
26 </script>
27
28
29 <script type="text/javascript">
30 jQuery(function ($) {
31 var $Vue = window.$Vue || Vue;
32 var $store = window.LP_Quiz_Store;
33
34 $Vue.component('lp-quiz-question-settings', {
35 template: '#tmpl-lp-quiz-question-settings',
36 props: ['question', 'index'],
37 computed: {
38 supportAnswerOptions: function () {
39 return $store.getters['lqs/supportAnswerOptions'].indexOf(this.question.type.key) !== -1;
40 },
41 isFillInBlank: function() {
42 return this.question.type.key === 'fill_in_blanks';
43 },
44 },
45
46 methods: {
47 isHiddenSettings: function (id) {
48 return $.inArray(id, $store.getters['lqs/hiddenQuestionsSettings']) !== -1;
49 }
50 }
51 })
52 })
53 </script>
54