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:
Pontoporeia
2026-05-10 22:36:28 +02:00
parent 8545daaccc
commit 406752bc6f
8 changed files with 208 additions and 30 deletions

View File

@@ -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'] ?? '',