Skip to content

Commit

Permalink
CONTRIB-7412 improve response values when exporting "other" responses.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden authored and Mike Churchward committed Feb 8, 2019
1 parent 6a4a531 commit 6918572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion questionnaire.class.php
Expand Up @@ -3087,7 +3087,7 @@ public function generate_csv($rid='', $userid='', $choicecodes=1, $choicetext=0,
$content = $choicesbyqid[$qid][$responserow->choice_id]->content;
if (preg_match('/^!other/', $content)) {
// If this has an "other" text, use it.
$responsetxt = get_string('other', 'questionnaire');
$responsetxt = preg_replace(["/^!other=/", "/^!other/"], ['', get_string('other', 'questionnaire')], $content);
$responsetxt1 = $responserow->response;
} else if (($choicecodes == 1) && ($choicetext == 1)) {
$responsetxt = $c.' : '.$content;
Expand Down

0 comments on commit 6918572

Please sign in to comment.