From 9b7eb0ce20c14f772b74b15af40f989d2e11cb50 Mon Sep 17 00:00:00 2001 From: Raza403 Date: Fri, 27 Jun 2025 17:53:41 +0500 Subject: [PATCH] Added question name as data attribute for anchoring. This PR is made for #253 --- classes/output/renderer.php | 3 ++- templates/question_container.mustache | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/output/renderer.php b/classes/output/renderer.php index 85497f8a..a35cdb94 100755 --- a/classes/output/renderer.php +++ b/classes/output/renderer.php @@ -244,7 +244,8 @@ public function question_output($question, $response, $qnum, $blankquestionnaire $pagetags->notifications = $this->notification($notification, \core\output\notification::NOTIFY_ERROR); } } - + $pagetags->questionname = $question->name; + return $this->render_from_template('mod_questionnaire/question_container', $pagetags); } diff --git a/templates/question_container.mustache b/templates/question_container.mustache index f29c93ac..97ebd1a9 100644 --- a/templates/question_container.mustache +++ b/templates/question_container.mustache @@ -58,7 +58,7 @@ {{{required}}} {{/qnum}} -
+
{{#label}}