Skip to content

Commit f5acfda

Browse files
committed
Session: #fix Excel export show display text for user's headers and fix spanish translation - refs BT#22502
1 parent 31747db commit f5acfda

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

main/inc/lib/sessionmanager.lib.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10193,14 +10193,18 @@ public static function exportCourseSessionReport(int $sessionId, string $courseC
1019310193
}
1019410194

1019510195
// 3. USER HEADER
10196-
$header3 = [''];
10196+
$header3 = [''];
10197+
$extraFieldUser = new ExtraFieldModel('user');
10198+
$extraDefsUser = $extraFieldUser->get_all();
10199+
$extraDefsByVariableUser = array_column($extraDefsUser, null, 'variable');
10200+
1019710201
foreach ($userFieldsBefore as $field) {
10198-
$header3[] = $field;
10202+
$header3[] = $extraDefsByVariableUser[$field]['display_text'] ?? $field;
1019910203
}
1020010204
$header3[] = get_lang('FirstName');
1020110205
$header3[] = get_lang('LastName');
1020210206
foreach ($userFieldsAfter as $field) {
10203-
$header3[] = $field;
10207+
$header3[] = $extraDefsByVariableUser[$field]['display_text'] ?? $field;
1020410208
}
1020510209

1020610210
// 4. USERS WITH CERTIFICATE

main/lang/spanish/trad4all.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9121,7 +9121,7 @@
91219121
$ACorrectAnswerIsRequired = "Una respuesta debe ser marcada como correcta";
91229122
$NoAdditionalComments = "No hay comentarios adicionales";
91239123
$TeacherFeedback = "Comentario del profesor";
9124-
$Learners = "ASSISTANTES";
9124+
$Learners = "ASISTENTES";
91259125
$BackToDateOrder = "Retorno al orden cronológico";
91269126
$SeeAlphabeticalOrder = "Ver en orden alfabético";
9127-
?>
9127+
?>

0 commit comments

Comments
 (0)