PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 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 All 140 releases
← All changes | assets/src/apps/js/admin/editor/mutations/question.js +46 -46 4.3.8 → 4.4.9 View file →
@@ -1,46 +1,46 @@
1 -const Question = {
2 -
3 - UPDATE_STATUS: function( state, status ) {
4 - state.status = status;
5 - },
6 -
7 - UPDATE_AUTO_DRAFT_STATUS: function( state, status ) {
8 - state.auto_draft = status;
9 - },
10 -
11 - CHANGE_QUESTION_TYPE: function( state, question ) {
12 - state.answers = question.answers;
13 - state.type = question.type;
14 - },
15 -
16 - SET_ANSWERS: function( state, answers ) {
17 - state.answers = answers;
18 - },
19 -
20 - DELETE_ANSWER: function( state, id ) {
21 - for ( var i = 0, n = state.answers.length; i < n; i++ ) {
22 - if ( state.answers[i].question_answer_id == id ) {
23 - state.answers[i].question_answer_id = LP.uniqueId();
24 - break;
25 - }
26 - }
27 - },
28 -
29 - ADD_NEW_ANSWER: function( state, answer ) {
30 - state.answers.push( answer );
31 - },
32 -
33 - UPDATE_ANSWERS: function( state, answers ) {
34 - state.answers = answers;
35 - },
36 -
37 - INCREASE_NUMBER_REQUEST: function( state ) {
38 - state.countCurrentRequest++;
39 - },
40 -
41 - DECREASE_NUMBER_REQUEST: function( state ) {
42 - state.countCurrentRequest--;
43 - },
44 -};
45 -
46 -export default Question;
1 +const Question = {
2 +
3 + UPDATE_STATUS: function( state, status ) {
4 + state.status = status;
5 + },
6 +
7 + UPDATE_AUTO_DRAFT_STATUS: function( state, status ) {
8 + state.auto_draft = status;
9 + },
10 +
11 + CHANGE_QUESTION_TYPE: function( state, question ) {
12 + state.answers = question.answers;
13 + state.type = question.type;
14 + },
15 +
16 + SET_ANSWERS: function( state, answers ) {
17 + state.answers = answers;
18 + },
19 +
20 + DELETE_ANSWER: function( state, id ) {
21 + for ( var i = 0, n = state.answers.length; i < n; i++ ) {
22 + if ( state.answers[i].question_answer_id == id ) {
23 + state.answers[i].question_answer_id = LP.uniqueId();
24 + break;
25 + }
26 + }
27 + },
28 +
29 + ADD_NEW_ANSWER: function( state, answer ) {
30 + state.answers.push( answer );
31 + },
32 +
33 + UPDATE_ANSWERS: function( state, answers ) {
34 + state.answers = answers;
35 + },
36 +
37 + INCREASE_NUMBER_REQUEST: function( state ) {
38 + state.countCurrentRequest++;
39 + },
40 +
41 + DECREASE_NUMBER_REQUEST: function( state ) {
42 + state.countCurrentRequest--;
43 + },
44 +};
45 +
46 +export default Question;