Skip to content

Commit

Permalink
MDL-45592 mod_feedback - unwanted linebreak after import or duplicati…
Browse files Browse the repository at this point in the history
…ng a feedback
  • Loading branch information
grabs committed May 29, 2014
1 parent 8e478c9 commit c2ebf60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mod/feedback/item/multichoicerated/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ public function prepare_presentation_values($linesep1,
}

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,
"\n",
$valuestring,
Expand All @@ -658,6 +659,8 @@ public function prepare_presentation_values_print($valuestring, $valuesep1, $val
}

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",
FEEDBACK_MULTICHOICERATED_LINE_SEP,
$valuestring,
Expand Down

0 comments on commit c2ebf60

Please sign in to comment.