Skip to content

Commit

Permalink
MDL-74371 mod_survey: Wordrap long questions in response reports
Browse files Browse the repository at this point in the history
Word wrap long questions in Response reports so that the users dont
see broken questions in the questions page.
  • Loading branch information
sharidas committed Apr 6, 2022
1 parent 62dec78 commit a2dd812
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mod/survey/graph.php
Expand Up @@ -83,7 +83,7 @@
case "question.png":

$question = $DB->get_record("survey_questions", array("id"=>$qid));
$question->text = get_string($question->text, "survey");
$question->text = wordwrap(get_string($question->text, "survey"), SURVEY_QLENGTH_WRAP);
$question->options = get_string($question->options, "survey");

$options = explode(",",$question->options);
Expand Down
2 changes: 2 additions & 0 deletions mod/survey/lib.php
Expand Up @@ -54,6 +54,8 @@
define("SURVEY_COLLES_PREFERRED_ACTUAL", "3");
define("SURVEY_ATTLS", "4");
define("SURVEY_CIQ", "5");
// Question length to wrap.
define("SURVEY_QLENGTH_WRAP", "80");

require_once(__DIR__ . '/deprecatedlib.php');

Expand Down

0 comments on commit a2dd812

Please sign in to comment.