From 9d69f7d3eeb73fbb599c5bf13610616597c836ea Mon Sep 17 00:00:00 2001 From: NicoDucou Date: Sun, 28 Apr 2024 12:32:16 +0200 Subject: [PATCH 1/3] Language: fix translation variable and translation in FR and DE --- public/main/admin/user_information.php | 2 +- translations/messages.de.po | 3 +++ translations/messages.fr.po | 3 +++ translations/messages.pot | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/public/main/admin/user_information.php b/public/main/admin/user_information.php index 9881f55b3f5..03f4c8448b2 100644 --- a/public/main/admin/user_information.php +++ b/public/main/admin/user_information.php @@ -405,7 +405,7 @@ $sessionInformation .= $courseToolInformationTotal; } } else { - $sessionInformation = '

'.get_lang('NoCourse sessionsForThisUser').'

'; + $sessionInformation = '

'.get_lang('No course sessions for this user').'

'; } $courseToolInformationTotal = ''; diff --git a/translations/messages.de.po b/translations/messages.de.po index 7be0d03ba74..ca3986ce11e 100644 --- a/translations/messages.de.po +++ b/translations/messages.de.po @@ -25136,3 +25136,6 @@ msgstr "hat folgende Kompetenzen erworben" msgid "Certificate Footer" msgstr "" + +msgid "No course session for this user" +msgstr "Keine Sessions für diesen Benutzer" diff --git a/translations/messages.fr.po b/translations/messages.fr.po index 290a7fad4b6..0ea08195979 100644 --- a/translations/messages.fr.po +++ b/translations/messages.fr.po @@ -29213,3 +29213,6 @@ msgstr "a obtenu les compétences suivantes " msgid "Certificate Footer" msgstr "" + +msgid "No course session for this user" +msgstr "Pas de cours de session pour cet utilisateur" diff --git a/translations/messages.pot b/translations/messages.pot index 507176b543b..6e500021e3c 100644 --- a/translations/messages.pot +++ b/translations/messages.pot @@ -27515,3 +27515,6 @@ msgstr "" msgid "Select date .." msgstr "" + +msgid "No course sessions for this user" +msgstr "" From 67e0f79578b7147b6ef172ad0b7debdbf5888110 Mon Sep 17 00:00:00 2001 From: NicoDucou Date: Sun, 28 Apr 2024 12:36:24 +0200 Subject: [PATCH 2/3] Social: Language: add translation to parts of social user profile --- assets/vue/components/social/UserProfileCard.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/vue/components/social/UserProfileCard.vue b/assets/vue/components/social/UserProfileCard.vue index 964ff8ca36b..fcc773b7ee5 100644 --- a/assets/vue/components/social/UserProfileCard.vue +++ b/assets/vue/components/social/UserProfileCard.vue @@ -18,7 +18,7 @@ @@ -72,8 +72,8 @@ :key="item.variable" >
-
{{ item.label }}:
-
{{ item.value }}
+
{{ t(item.label) }}:
+
{{ t(item.value) }}
Date: Sun, 28 Apr 2024 16:36:46 +0200 Subject: [PATCH 3/3] Exercise: Set cid and sid manually in results page to avoid context-loosing issue in learning path item refresh - refs BT#21595 --- public/main/exercise/result.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/main/exercise/result.php b/public/main/exercise/result.php index 8739576cc06..44d27172708 100644 --- a/public/main/exercise/result.php +++ b/public/main/exercise/result.php @@ -25,6 +25,10 @@ $cid = isset($_REQUEST['cid']) ? (int) $_REQUEST['cid'] : null; $sid = isset($_REQUEST['sid']) ? (int) $_REQUEST['sid'] : null; +// Hack for sid not being picked up by CidReqListener (cid isn't either) +if (!empty($sid)) { + Session::write('sid', $sid); +} // A notice for unauthorized people. api_protect_course_script($show_headers, false, '', $cid); @@ -47,7 +51,8 @@ $student_id = (int) $track_exercise_info['exe_user_id']; $current_user_id = api_get_user_id(); -$objExercise = new Exercise(); +// Pass cid manually to avoid context issues with cid not being picked up by CidReqListener +$objExercise = new Exercise($cid); if (!empty($exercise_id)) { $objExercise->read($exercise_id); }