| 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 |
|