mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-77834-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE
This commit is contained in:
commit
a10c074f54
@ -301,10 +301,6 @@ class mod_feedback_complete_form extends moodleform {
|
|||||||
} else {
|
} else {
|
||||||
// Add non-group element to the form.
|
// Add non-group element to the form.
|
||||||
if (is_array($element)) {
|
if (is_array($element)) {
|
||||||
if ($this->is_frozen() && $element[0] === 'text') {
|
|
||||||
// Convert 'text' element to 'static' when freezing for better display.
|
|
||||||
$element = ['static', $element[1], $element[2]];
|
|
||||||
}
|
|
||||||
$element = call_user_func_array(array($this->_form, 'createElement'), $element);
|
$element = call_user_func_array(array($this->_form, 'createElement'), $element);
|
||||||
}
|
}
|
||||||
$element = $this->_form->addElement($element);
|
$element = $this->_form->addElement($element);
|
||||||
@ -323,7 +319,7 @@ class mod_feedback_complete_form extends moodleform {
|
|||||||
|
|
||||||
// Set default value.
|
// Set default value.
|
||||||
if ($setdefaultvalue && ($tmpvalue = $this->get_item_value($item))) {
|
if ($setdefaultvalue && ($tmpvalue = $this->get_item_value($item))) {
|
||||||
$this->_form->setDefault($element->getName(), s($tmpvalue));
|
$this->_form->setDefault($element->getName(), htmlspecialchars_decode($tmpvalue, ENT_QUOTES));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Freeze if needed.
|
// Freeze if needed.
|
||||||
|
@ -251,8 +251,8 @@ Feature: Anonymous feedback
|
|||||||
And I should see "Non anonymous entries (1)"
|
And I should see "Non anonymous entries (1)"
|
||||||
And I click on "," "link" in the "Username 1" "table_row"
|
And I click on "," "link" in the "Username 1" "table_row"
|
||||||
And I should see "(Username 1)"
|
And I should see "(Username 1)"
|
||||||
And I should see "usertext"
|
Then the field "this is a short text answer" matches value "usertext"
|
||||||
And I navigate to "Responses" in current page administration
|
And I navigate to "Responses" in current page administration
|
||||||
And I follow "Response number: 1"
|
And I follow "Response number: 1"
|
||||||
And I should see "Response number: 1 (Anonymous)"
|
And I should see "Response number: 1 (Anonymous)"
|
||||||
Then I should see "anontext"
|
And the field "this is a short text answer" matches value "anontext"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user