MDL-75051 Questions: Selecting idnumber in the question bank,

the copy/pasting, includes extraneous text in Chrome
This commit is contained in:
Mahmoud Kassaei
2022-09-09 10:35:55 +01:00
parent 5b90938614
commit 7c7505e428
2 changed files with 4 additions and 2 deletions
@@ -45,10 +45,11 @@ class question_name_idnumber_tags_column extends viewquestionname_column_helper
}
// Question idnumber.
// The non-breaking space ' ' is used in html to fix MDL-75051 (browser issues caused by chrome and Edge).
if ($question->idnumber !== null && $question->idnumber !== '') {
echo ' ' . \html_writer::span(
\html_writer::span(get_string('idnumber', 'question'), 'accesshide')
. ' ' . \html_writer::span(s($question->idnumber), 'badge badge-primary'), 'ml-1');
. ' ' . \html_writer::span(s($question->idnumber), 'badge badge-primary'), 'ml-1');
}
// Question tags.
@@ -30,7 +30,8 @@ Feature: A teacher can duplicate questions in the question bank
And I press "id_submitbutton"
Then I should see "Duplicated question name"
And I should see "Test question to be copied"
And "Test question to be copied ID number qid" row "Created by" column of "categoryquestions" table should contain "Admin User"
And I should see "ID number" in the "Test question to be copied" "table_row"
And I should see "qid" in the "Test question to be copied" "table_row"
Scenario: Duplicated questions automatically get a new name suggested
When I choose "Duplicate" action for "Test question to be copied" in the question bank