PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
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
← All changes | inc/Models/Question/QuestionPostSingleChoiceModel.php +43 -43 4.3.9.14.4.8 View file →
@@ -1,43 +1,43 @@
1 -<?php
2 -
3 -namespace LearnPress\Models\Question;
4 -
5 -/**
6 - * Class QuestionPostTrueFalseModel
7 - * To replace class LP_Question old
8 - *
9 - * @package LearnPress/Classes
10 - * @version 1.0.0
11 - * @since 4.2.9
12 - */
13 -class QuestionPostSingleChoiceModel extends QuestionPostModel {
14 - public $question_type = 'single_choice';
15 -
16 - /**
17 - * Create default answers for question
18 - *
19 - * @return array[]
20 - */
21 - public function get_default_answers(): array {
22 - return array(
23 - array(
24 - 'is_true' => 'yes',
25 - 'value' => $this->random_value(),
26 - 'title' => esc_html__( 'First option', 'learnpress' ),
27 - 'order' => 1,
28 - ),
29 - array(
30 - 'is_true' => '',
31 - 'value' => $this->random_value(),
32 - 'title' => esc_html__( 'Second option', 'learnpress' ),
33 - 'order' => 2,
34 - ),
35 - array(
36 - 'is_true' => '',
37 - 'value' => $this->random_value(),
38 - 'title' => esc_html__( 'Third option', 'learnpress' ),
39 - 'order' => 3,
40 - ),
41 - );
42 - }
43 -}
1 +<?php
2 +
3 +namespace LearnPress\Models\Question;
4 +
5 +/**
6 + * Class QuestionPostTrueFalseModel
7 + * To replace class LP_Question old
8 + *
9 + * @package LearnPress/Classes
10 + * @version 1.0.0
11 + * @since 4.2.9
12 + */
13 +class QuestionPostSingleChoiceModel extends QuestionPostModel {
14 + public $question_type = 'single_choice';
15 +
16 + /**
17 + * Create default answers for question
18 + *
19 + * @return array[]
20 + */
21 + public function get_default_answers(): array {
22 + return array(
23 + array(
24 + 'is_true' => 'yes',
25 + 'value' => $this->random_value(),
26 + 'title' => esc_html__( 'First option', 'learnpress' ),
27 + 'order' => 1,
28 + ),
29 + array(
30 + 'is_true' => '',
31 + 'value' => $this->random_value(),
32 + 'title' => esc_html__( 'Second option', 'learnpress' ),
33 + 'order' => 2,
34 + ),
35 + array(
36 + 'is_true' => '',
37 + 'value' => $this->random_value(),
38 + 'title' => esc_html__( 'Third option', 'learnpress' ),
39 + 'order' => 3,
40 + ),
41 + );
42 + }
43 +}