Skip to content

Commit

Permalink
Merge branch 'MDL-80537_403' of https://github.com/timhunt/moodle int…
Browse files Browse the repository at this point in the history
…o MOODLE_403_STABLE
  • Loading branch information
HuongNV13 committed Feb 5, 2024
2 parents 48fbf7e + 6505fbb commit 4a07c82
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions question/bank/viewquestiontext/classes/question_text_row.php
Expand Up @@ -58,8 +58,8 @@ protected function display_content($question, $rowclasses): void {
if ($this->preference !== question_text_format::OFF) {
$text = '';
if ($this->preference === question_text_format::PLAIN) {
$text = question_utils::to_plain_text($question->questiontext,
$question->questiontextformat, ['noclean' => true, 'para' => false, 'filter' => false]);
$text = s(question_utils::to_plain_text($question->questiontext,
$question->questiontextformat, ['noclean' => true, 'para' => false, 'filter' => false]));
} else if ($this->preference === question_text_format::FULL) {
$text = question_rewrite_question_preview_urls($question->questiontext, $question->id,
$question->contextid, 'question', 'questiontext', $question->id,
Expand Down
Expand Up @@ -13,26 +13,26 @@ Feature: Use the qbank plugin manager page for viewquestiontext
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | First question | Answer the <span class="totestforhtml">first</span> question |
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | First question | Answer the <span class="totestforhtml">first</span> &lt;question&gt; |

@javascript
Scenario: Display of plain question text can be turned on and off
When I am on the "Test quiz" "mod_quiz > question bank" page logged in as admin
And I set the field "Show question text in the question list?" to "text only"
Then I should see "Answer the first question"
And ".totestforhtml" "css_element" should not exist in the "Answer the first question" "table_row"
Then I should see "Answer the first <question>"
And ".totestforhtml" "css_element" should not exist in the "Answer the first <question>" "table_row"
And I set the field "Show question text in the question list?" to "No"
And I should not see "Answer the first question"
And I should not see "Answer the first <question>"

@javascript
Scenario: Display of full question text can be turned on and off
When I am on the "Test quiz" "mod_quiz > question bank" page logged in as admin
And I set the field "Show question text in the question list?" to "with images"
Then I should see "Answer the first question"
And ".totestforhtml" "css_element" should exist in the "Answer the first question" "table_row"
Then I should see "Answer the first <question>"
And ".totestforhtml" "css_element" should exist in the "Answer the first <question>" "table_row"
And I set the field "Show question text in the question list?" to "No"
And I should not see "Answer the first question"
And I should not see "Answer the first <question>"

@javascript
Scenario: Option does not show if the plugin is disabled
Expand All @@ -54,4 +54,4 @@ Feature: Use the qbank plugin manager page for viewquestiontext
And I click on "Enable" "link" in the "View question text" "table_row"
And I am on the "Test quiz" "mod_quiz > question bank" page
When I set the field "Show question text in the question list?" to "text only"
And I should see "Answer the first question"
And I should see "Answer the first <question>"

0 comments on commit 4a07c82

Please sign in to comment.