mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Improve recap page + fix CSV import for jury roles
recapitulatif.php (partage): - Center .thanks-success and add bottom margin/padding - Display ALL fields: identifier, synopsis, languages, formats, jury (all roles), baiu link, license, access type - Add validation notice asking user to verify info, with xamxam@erg.be contact link (email obfuscated) StudentEmail: - Add 'Note contextuelle' and license_custom to email recap - Rename 'Promoteur·ice(s)' to 'Promoteur·ice(s) interne' - Change email message to ask student to verify info + contact for errors CSV export/import: - Add 3 new CSV columns: Lecteur·ice(s) interne, Lecteur·ice(s) externe, Promoteur·ice(s) ULB - Export splits supervisors by role/is_external/is_ulb into separate columns - Import inserts supervisors with correct role, is_external, and is_ulb flags (was: all treated as generic supervisors) - Add header matching for short distinguishers (ulb, externe) via str_contains fallback
This commit is contained in:
@@ -188,7 +188,10 @@ class ExportController
|
||||
'Sous-titre',
|
||||
'Auteur·ice(s)',
|
||||
'Contact',
|
||||
'Promoteur·ice(s)',
|
||||
'Promoteur·ice(s) interne',
|
||||
'Lecteur·ice(s) interne',
|
||||
'Lecteur·ice(s) externe',
|
||||
'Promoteur·ice(s) ULB',
|
||||
'Format(s)',
|
||||
'Année',
|
||||
'AP',
|
||||
@@ -252,10 +255,28 @@ class ExportController
|
||||
}
|
||||
}
|
||||
|
||||
// Supervisors
|
||||
$supList = [];
|
||||
// Supervisors — split by role
|
||||
$promoteursInternes = [];
|
||||
$lecteursInternes = [];
|
||||
$lecteursExternes = [];
|
||||
$promoteursUlb = [];
|
||||
foreach (($supervisors[$tid] ?? []) as $s) {
|
||||
$supList[] = $s['name'];
|
||||
$role = $s['role'] ?? '';
|
||||
$isExternal = (int)($s['is_external'] ?? 0);
|
||||
$isUlb = (int)($s['is_ulb'] ?? 0);
|
||||
$name = $s['name'];
|
||||
if ($role === 'promoteur' && $isUlb) {
|
||||
$promoteursUlb[] = $name;
|
||||
} elseif ($role === 'promoteur') {
|
||||
$promoteursInternes[] = $name;
|
||||
} elseif ($role === 'lecteur' && $isExternal) {
|
||||
$lecteursExternes[] = $name;
|
||||
} elseif ($role === 'lecteur') {
|
||||
$lecteursInternes[] = $name;
|
||||
} else {
|
||||
// Legacy rows with no role: treat as promoteur interne
|
||||
$promoteursInternes[] = $name;
|
||||
}
|
||||
}
|
||||
|
||||
// Tags
|
||||
@@ -282,7 +303,10 @@ class ExportController
|
||||
$t['subtitle'] ?? '',
|
||||
implode(', ', $authorList),
|
||||
$contact,
|
||||
implode(', ', $supList),
|
||||
implode(', ', $promoteursInternes),
|
||||
implode(', ', $lecteursInternes),
|
||||
implode(', ', $lecteursExternes),
|
||||
implode(', ', $promoteursUlb),
|
||||
implode(', ', $fmtList),
|
||||
$t['year'] ?? '',
|
||||
$t['ap_program'] ?? '',
|
||||
|
||||
Reference in New Issue
Block a user