Skip to content
Snippets Groups Projects
Commit ad8f5627 authored by David Surville's avatar David Surville
Browse files

[Fix] Prise en compte d'un diplôme inconnu ({INCONUU}) dans l'attribut supannEtuInscription

parent 77f5ee7f
Branches
Tags 3.1.14
No related merge requests found
......@@ -292,7 +292,7 @@ class People extends Entity
'\[typedip=(?<typedip>\{[\w\-:]+\}\w*)\]' . // {SISE}.* ou {INCONNU}
'\[cursusann=(?<cursusann>\{SUPANN\}\w+)\]' .
'\[affect=(?<affect>[\w\-]+)\]' .
'\[diplome=(?<diplome>\{[\w\-:]+\}\w+)\]' .
'\[diplome=(?<diplome>\{[\w\-:]+\}\w*)\]' .
'\[etape=(?<etape>\{[\w\-:]+\}.+)\]$/';
static protected $inscription_complement_pattern =
'/^\[anneeinsc=(?<anneeinsc>\d{4})\]' .
......@@ -818,7 +818,7 @@ class People extends Entity
* @var string $diplome
* @var string $etape
*/
foreach (['regimeinsc', 'sectdisc', 'typedip'] as $part) {
foreach (['regimeinsc', 'sectdisc', 'typedip', 'diplome'] as $part) {
$$part = preg_match("/^($siseLabel|$inconnuLabel)\w*$/", $matches[$part])
? $matches[$part]
: sprintf('%s%s', $siseLabel, $matches[$part]);
......@@ -843,7 +843,7 @@ class People extends Entity
return preg_replace(
self::$inscription_pattern,
"[etab=\\1][anneeinsc=\\2][regimeinsc=$regimeinsc][sectdisc=$sectdisc][typedip=$typedip][cursusann=$cursusann][affect=$affect][diplome=\\8][etape=$etape]",
"[etab=\\1][anneeinsc=\\2][regimeinsc=$regimeinsc][sectdisc=$sectdisc][typedip=$typedip][cursusann=$cursusann][affect=$affect][diplome=$diplome][etape=$etape]",
$v, 1);
} else {
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment