mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-45592 mod_feedback - unwanted linebreak after import or duplicating a feedback
This commit is contained in:
parent
8e478c99d3
commit
c2ebf60636
1 changed files with 3 additions and 0 deletions
|
@ -650,6 +650,7 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function prepare_presentation_values_print($valuestring, $valuesep1, $valuesep2) {
|
public function prepare_presentation_values_print($valuestring, $valuesep1, $valuesep2) {
|
||||||
|
$valuestring = str_replace(array("\n","\r"), "", $valuestring);
|
||||||
return $this->prepare_presentation_values(FEEDBACK_MULTICHOICERATED_LINE_SEP,
|
return $this->prepare_presentation_values(FEEDBACK_MULTICHOICERATED_LINE_SEP,
|
||||||
"\n",
|
"\n",
|
||||||
$valuestring,
|
$valuestring,
|
||||||
|
@ -658,6 +659,8 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function prepare_presentation_values_save($valuestring, $valuesep1, $valuesep2) {
|
public function prepare_presentation_values_save($valuestring, $valuesep1, $valuesep2) {
|
||||||
|
$valuestring = str_replace("\r", "\n", $valuestring);
|
||||||
|
$valuestring = str_replace("\n\n", "\n", $valuestring);
|
||||||
return $this->prepare_presentation_values("\n",
|
return $this->prepare_presentation_values("\n",
|
||||||
FEEDBACK_MULTICHOICERATED_LINE_SEP,
|
FEEDBACK_MULTICHOICERATED_LINE_SEP,
|
||||||
$valuestring,
|
$valuestring,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue