Skip to content

Commit

Permalink
Merge pull request maths#1320 from maths/iss1317
Browse files Browse the repository at this point in the history
iss1317 - Notes validation line break fix
  • Loading branch information
sangwinc authored Nov 25, 2024
2 parents 22d4c16 + a067054 commit d9ef868
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions stack/input/notes/notes.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,13 @@ public function get_api_solution($tavalue) {
public function get_api_solution_render($tadisplay) {
return '';
}

protected function ajax_to_response_array($in) {
// ISS1317 EJMF - Notes are treated the same as textareas on the front end so
// we need to add this to match the textarea input and avoid
// <br> appearing in the validation display.
$in = explode('<br>', $in);
$in = implode("\n", $in);
return [$this->name => $in];
}
}

0 comments on commit d9ef868

Please sign in to comment.