Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
InfoLEA
admin
Guide des Études LEA
Commits
624cae44
Commit
624cae44
authored
Sep 11, 2020
by
BERTHAUT Florent
Browse files
Fixed replacing General with Pro
parent
2dcb8bc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/leaguide.js
View file @
624cae44
...
...
@@ -114,6 +114,14 @@ Papa.parse(csv, {
}
});
function
findFicheInSemester
(
id
,
sem
)
{
for
(
let
f
=
0
;
f
<
sem
.
length
;
f
++
)
{
if
(
id
==
sem
[
f
][
"
UE
"
]
+
sem
[
f
][
"
EC
"
]
+
sem
[
f
][
"
Nom EC
"
])
{
return
f
;
}
}
return
-
1
;
}
//Build a structure of fiches per specialisation/year
function
parseGuides
(
fiches
)
{
...
...
@@ -147,6 +155,11 @@ function parseGuides(fiches) {
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA RICI
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA MPT
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA ANI
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA TCI Pro
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA RICI Pro
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA MPT Pro
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA ANI Pro
"
);
}
else
if
(
f
[
"
Parcours
"
]
==
"
Master Apprentissage - Contrat Pro - Tronc commun
"
)
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA TCI Pro
"
);
...
...
@@ -156,24 +169,28 @@ function parseGuides(fiches) {
}
else
if
(
f
[
"
Parcours
"
]
==
fullNames
.
get
(
"
ANI
"
))
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA ANI
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA ANI Pro
"
);
}
else
if
(
f
[
"
Parcours
"
]
==
fullNames
.
get
(
"
ANI
"
)
+
fullNames
.
get
(
"
Pro
"
))
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA ANI Pro
"
);
}
else
if
(
f
[
"
Parcours
"
]
==
fullNames
.
get
(
"
TCI
"
))
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA TCI
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA TCI Pro
"
);
}
else
if
(
f
[
"
Parcours
"
]
==
fullNames
.
get
(
"
TCI
"
)
+
fullNames
.
get
(
"
Pro
"
))
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA TCI Pro
"
);
}
else
if
(
f
[
"
Parcours
"
]
==
fullNames
.
get
(
"
RICI
"
))
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA RICI
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA RICI Pro
"
);
}
else
if
(
f
[
"
Parcours
"
]
==
fullNames
.
get
(
"
RICI
"
)
+
fullNames
.
get
(
"
Pro
"
))
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA RICI Pro
"
);
}
else
if
(
f
[
"
Parcours
"
]
==
fullNames
.
get
(
"
MPT
"
))
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA MPT
"
);
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA MPT Pro
"
);
}
else
if
(
f
[
"
Parcours
"
]
==
fullNames
.
get
(
"
MPT
"
)
+
fullNames
.
get
(
"
Pro
"
))
{
guideNames
.
push
(
f
[
"
Année
"
]
+
"
LEA MPT Pro
"
);
...
...
@@ -194,43 +211,55 @@ function parseGuides(fiches) {
guid
.
set
(
f
[
"
Semestre
"
],
[]);
}
//add the fiche
fill
to the specialisation/year/semester
//add the fiche to the specialisation/year/semester
let
sem
=
guid
.
get
(
f
[
"
Semestre
"
]);
sem
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
f
)));
//change the EC Name for co-build languages
//if(f["Année"]=="L3") {
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
portugais
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Portugais :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
}
else
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
suédois
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Suédois :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
}
else
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
chinois
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Chinois :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
}
else
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
néerlandais
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Néerlandais :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
let
id
=
f
[
"
UE
"
]
+
f
[
"
EC
"
]
+
f
[
"
Nom EC
"
];
if
(
guideName
.
includes
(
"
Pro
"
))
{
//specific tests for Master Pro
let
existing
=
findFicheInSemester
(
id
,
sem
);
//if the fiche already exists
if
(
existing
>=
0
)
{
console
.
log
(
"
found previous
"
);
console
.
log
(
f
[
"
Parcours
"
]);
console
.
log
(
sem
[
existing
][
"
Parcours
"
]);
//if new one is pro, replace old one
if
(
!
sem
[
existing
][
"
Parcours
"
].
includes
(
"
Pro
"
))
{
sem
[
existing
]
=
JSON
.
parse
(
JSON
.
stringify
(
f
));
}
}
else
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
russe
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Russe :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
else
{
sem
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
f
)));
}
//}
}
else
{
//add in all the other cases
sem
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
f
)));
}
//change the EC Name for co-build languages
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
portugais
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Portugais :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
}
else
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
suédois
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Suédois :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
}
else
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
chinois
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Chinois :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
}
else
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
néerlandais
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Néerlandais :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
}
else
if
((
f
[
"
Parcours
"
]
+
""
).
includes
(
"
russe
"
))
{
sem
[
sem
.
length
-
1
][
"
Nom EC
"
]
=
"
Russe :
"
+
sem
[
sem
.
length
-
1
][
"
Nom EC
"
];
}
//change UE number depending on parcours for L3
if
(
f
[
"
Année
"
]
==
"
L3
"
&&
(
guideName
==
"
L3 TCI
"
||
guideName
==
"
L3 MPT
"
))
{
if
(
f
[
"
UE
"
]
==
7
&&
(
f
[
"
Nom UE
"
]
+
""
).
includes
(
"
Projet
"
))
{
//Stages
if
(
f
[
"
Année
"
]
==
"
L3
"
&&
(
guideName
==
"
L3 TCI
"
||
guideName
==
"
L3 MPT
"
))
{
if
(
f
[
"
UE
"
]
==
7
&&
(
f
[
"
Nom UE
"
]
+
""
).
includes
(
"
Projet
"
))
{
sem
[
sem
.
length
-
1
][
"
UE
"
]
=
5
;
}
else
if
(
f
[
"
UE
"
]
==
4
&&
(
f
[
"
Nom UE
"
]
+
""
).
includes
(
"
anglais
"
))
{
...
...
@@ -267,9 +296,10 @@ function parseGuides(fiches) {
return
0
;
});
if
(
guideName
==
"
L3 MPT
"
)
{
if
(
guideName
==
"
M1 LEA MPT Pro
"
)
{
for
(
let
ue
of
sem
)
{
console
.
log
(
ue
[
"
UE
"
]
+
"
"
+
ue
[
"
Nom UE
"
]
+
"
"
+
ue
[
"
Nom EC
"
]);
console
.
log
(
ue
[
"
UE
"
]
+
"
"
+
ue
[
"
Nom UE
"
]
+
"
"
+
ue
[
"
Nom EC
"
]
+
"
"
+
ue
[
"
Parcours
"
]);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment