From 6d114ec62753ce7d396a51eb0e227d91209285b0 Mon Sep 17 00:00:00 2001 From: Stephen Vickers Date: Mon, 10 Jul 2017 17:01:54 +0100 Subject: [PATCH] MDL-59490 mod_lti: Prevent text wrapping Update html_to_text method calls with a width of zero. --- mod/lti/locallib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/lti/locallib.php b/mod/lti/locallib.php index aa04d3f6287..3ca0adff917 100644 --- a/mod/lti/locallib.php +++ b/mod/lti/locallib.php @@ -386,11 +386,11 @@ function lti_build_request($instance, $typeconfig, $course, $typeid = null, $isl 'lis_person_sourcedid' => $USER->idnumber, 'roles' => $role, 'context_id' => $course->id, - 'context_label' => trim(html_to_text($course->shortname)), - 'context_title' => trim(html_to_text($course->fullname)), + 'context_label' => trim(html_to_text($course->shortname, 0)), + 'context_title' => trim(html_to_text($course->fullname, 0)), ); if (!empty($instance->name)) { - $requestparams['resource_link_title'] = trim(html_to_text($instance->name)); + $requestparams['resource_link_title'] = trim(html_to_text($instance->name, 0)); } if (!empty($instance->cmid)) { $intro = format_module_intro('lti', $instance, $instance->cmid); @@ -531,11 +531,11 @@ function lti_build_standard_request($instance, $orgid, $islti2, $messagetype = ' $requestparams["tool_consumer_instance_guid"] = $orgid; } if (!empty($CFG->mod_lti_institution_name)) { - $requestparams['tool_consumer_instance_name'] = trim(html_to_text($CFG->mod_lti_institution_name)); + $requestparams['tool_consumer_instance_name'] = trim(html_to_text($CFG->mod_lti_institution_name, 0)); } else { $requestparams['tool_consumer_instance_name'] = get_site()->shortname; } - $requestparams['tool_consumer_instance_description'] = trim(html_to_text(get_site()->fullname)); + $requestparams['tool_consumer_instance_description'] = trim(html_to_text(get_site()->fullname, 0)); return $requestparams; }