Commit 077edd30 authored by Marina Glancy's avatar Marina Glancy

MDL-56864 forms: allow to remove last tag with forced standard tags

parent be2e38ed
......@@ -244,7 +244,11 @@ class MoodleQuickForm_tags extends MoodleQuickForm_autocomplete {
*/
public function exportValue(&$submitValues, $assoc = false) {
if (!$this->is_tagging_enabled()) {
return $assoc ? array($this->getName() => array()) : array();
return $this->_prepareValue([], $assoc);
}
if ($this->_findValue($submitValues) === '_qf__force_multiselect_submission') {
// Nothing was selected.
return $this->_prepareValue([], $assoc);
}
return parent::exportValue($submitValues, $assoc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment