Skip to content

Commit

Permalink
fix: amélioration du format des titres de cours et correction de la s…
Browse files Browse the repository at this point in the history
…pécialité "sae"
  • Loading branch information
ecnivtwelve committed Jan 21, 2025
1 parent 51e85b1 commit abb6ea0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/services/local/utils/reduceIcalToCourse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ export const reduceIcalToCourse = (course: any, identityProvider: any, url: stri
title = title.replace(cmSRegex, "");
}

// if ends with "Autonomie', move to beginning
if (title.trim().endsWith("Autonomie")) {
title = "Autonomie " + title.replace("Autonomie", "");
}

if (title.trim().endsWith("Suivi")) {
title = "Suivi " + title.replace("Suivi", "");
}

returnCourse = {
...returnCourse,
title: title,
Expand Down
1 change: 1 addition & 0 deletions src/utils/format/format_cours_name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function getCourseSpeciality (pronoteString = ""): string | null {
newPrnString = newPrnString.replace("expression", "expr.");
newPrnString = newPrnString.replace("compréhension", "comp.");
newPrnString = newPrnString.replace("ecrit", "écrit");
newPrnString = newPrnString.replace("sae", "saé");
newPrnString = formatPretty(newPrnString);

return newPrnString;
Expand Down

0 comments on commit abb6ea0

Please sign in to comment.