From 1bfed23bf59c76fbf18432c34c311ccef5daa3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Mon, 12 Nov 2018 15:37:37 +0100 Subject: [PATCH] MDL-62439 output: Debugstringids in overlay windows. --- lib/outputcomponents.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 772385e2f43..d755f168d4d 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -525,12 +525,19 @@ class help_icon implements renderable, templatable { $data->icon = (new pix_icon('help', $alt, 'core', ['class' => 'iconhelp']))->export_for_template($output); $data->linktext = $this->linktext; $data->title = get_string('helpprefix2', '', trim($title, ". \t")); - $data->url = (new moodle_url('/help.php', [ + + $options = [ 'component' => $this->component, 'identifier' => $this->identifier, 'lang' => current_language() - ]))->out(false); + ]; + // Debugging feature lets you display string identifier and component. + if (isset($CFG->debugstringids) && $CFG->debugstringids && optional_param('strings', 0, PARAM_INT)) { + $options['strings'] = 1; + } + + $data->url = (new moodle_url('/help.php', $options))->out(false); $data->ltr = !right_to_left(); return $data; }