From 0a2879b260b0e0b3c06b399719dbeb526d1c4a56 Mon Sep 17 00:00:00 2001
From: Elke Kreim <elke.kreim@hs-hannover.de>
Date: Fri, 7 Feb 2025 14:47:09 +0100
Subject: [PATCH] Add course fullname to form title

---
 export.php                  | 3 ++-
 lang/de/local_hshexport.php | 1 +
 lang/en/local_hshexport.php | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/export.php b/export.php
index bbcb570..89f05f7 100644
--- a/export.php
+++ b/export.php
@@ -43,6 +43,7 @@ $PAGE->set_url('/local/hshexport/export.php', ['id' => $course->id]);
 require_login($course);
 
 $PAGE->set_title($title);
+$PAGE->set_heading($title);
 $PAGE->set_context($context);
 
 require_capability('local/hshexport:canexport', $context);
@@ -67,7 +68,7 @@ if ($mform->is_cancelled()) {
 }
 
 echo $OUTPUT->header();
-echo $OUTPUT->heading($title);
+echo $OUTPUT->heading(get_string('formtitle', 'local_hshexport', $course->fullname));
 
 $mform->display();
 
diff --git a/lang/de/local_hshexport.php b/lang/de/local_hshexport.php
index 4ab1d64..85e0352 100644
--- a/lang/de/local_hshexport.php
+++ b/lang/de/local_hshexport.php
@@ -31,6 +31,7 @@ $string['coursecode_help'] = 'Eine LV-Kennung muss eindeutig und einmalig sein,
 $string['coursecode_placeholder'] = 'Bitte hier LV Kennung eingeben';
 $string['csvdownload'] = 'CSV herunterladen';
 $string['evaluserexport_form_into'] = 'Nutzen Sie dieses Formular um eine CSV-Datei mit den Nutzern der ausgewählten Rollen für die Evaluation zu erzeugen.';
+$string['formtitle'] = 'Export für Evaluation: {$a}';
 $string['hshexport:canexport'] = 'Kann Nutzer für Evasys als csv exportieren';
 $string['nav_course'] = 'Link in Kursnavigation';
 $string['nav_participants'] = 'Link in Auswahlbutton der Teilnehmerliste';
diff --git a/lang/en/local_hshexport.php b/lang/en/local_hshexport.php
index fffe546..c464472 100644
--- a/lang/en/local_hshexport.php
+++ b/lang/en/local_hshexport.php
@@ -31,6 +31,7 @@ $string['coursecode_help'] = 'A course code must be unique and unambiguous, e.g.
 $string['coursecode_placeholder'] = 'Please enter course code here';
 $string['csvdownload'] = 'Download csv';
 $string['evaluserexport_form_into'] = 'Use this form to generate a CSV file with users of selected roles for evaluation purposes.';
+$string['formtitle'] = 'Export for evaluation: {$a}';
 $string['hshexport:canexport'] = 'Can export user csv for  evasys';
 $string['nav_course'] = 'Navigation node in course navigation';
 $string['nav_participants'] = 'Navigation node in participants page jump menu';
-- 
GitLab