| Conditions | 1 |
| Paths | 1 |
| Total Lines | 28 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function createForm(&$form, $exercise) |
||
| 17 | { |
||
| 18 | $form->addText( |
||
| 19 | 'questionName', |
||
| 20 | get_lang('Page Title'), |
||
| 21 | false, |
||
| 22 | ['maxlength' => 255] |
||
| 23 | ); |
||
| 24 | $editorConfig = [ |
||
| 25 | 'ToolbarSet' => 'TestQuestionDescription', |
||
| 26 | 'Height' => '100' |
||
| 27 | ]; |
||
| 28 | $form->addHtmlEditor( |
||
| 29 | 'questionDescription', |
||
| 30 | get_lang('Page Introduction'), |
||
| 31 | false, |
||
| 32 | false, |
||
| 33 | $editorConfig |
||
| 34 | ); |
||
| 35 | |||
| 36 | global $text; |
||
| 37 | $form->addButtonSave($text, 'submitQuestion'); |
||
| 38 | |||
| 39 | $defaults = [ |
||
| 40 | 'questionName' => $this->question, |
||
| 41 | 'questionDescription' => $this->description |
||
| 42 | ]; |
||
| 43 | $form->setDefaults($defaults); |
||
| 44 | } |
||
| 58 |