Merge branch 'MDL-64324-master' of https://github.com/marinaglancy/moodle

This commit is contained in:
Sara Arjona 2019-01-22 15:53:36 +01:00
commit 507d7ec1e8

View File

@ -1534,7 +1534,8 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
// No 'name' atttribute for form in xhtml strict :
$attributes = array('action' => $action, 'method' => $method, 'accept-charset' => 'utf-8') + $target;
if (is_null($this->getAttribute('id'))) {
$attributes['id'] = 'mform' . $formcounter;
// Append a random id, forms can be loaded in different requests using Fragments API.
$attributes['id'] = 'mform' . $formcounter . '_' . random_string();
}
$formcounter++;
$this->updateAttributes($attributes);