PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.7
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.7
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 4.2.1 All 138 releases
learnpress / inc / Models / Question / QuestionPostTrueFalseModel.php

QuestionPostTrueFalseModel.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.7, at inc/Models/Question/QuestionPostTrueFalseModel.php

38 lines 732 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 QuestionPostTrueFalseModel extends QuestionPostModel {
14 public $question_type = 'true_or_false';
15
16 /**
17 * Get true or false default answers.
18 *
19 * @return array
20 */
21 public function get_default_answers(): array {
22 return [
23 [
24 'is_true' => 'yes',
25 'value' => $this->random_value(),
26 'title' => esc_html__( 'True', 'learnpress' ),
27 'order' => 1,
28 ],
29 [
30 'is_true' => '',
31 'value' => $this->random_value(),
32 'title' => esc_html__( 'False', 'learnpress' ),
33 'order' => 2,
34 ],
35 ];
36 }
37 }
38