Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ios/Papillon/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@
<string>sq</string>
<string>uk</string>
<string>vi</string>
<string>bg</string>
<string>bn</string>
<string>cs</string>
<string>da</string>
<string>fi</string>
<string>he</string>
<string>hu</string>
<string>id</string>
<string>no</string>
<string>sk</string>
<string>sv</string>
<string>sw</string>
<string>th</string>
<string>it</string>
<string>fa</string>
<string>ur</string>
<string>ms</string>
<string>hr</string>
<string>et</string>
</array>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
Expand Down
19 changes: 16 additions & 3 deletions utils/grades/helper/period.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@ import { error, warn } from "@/utils/logger/logger";

export function getCurrentPeriod(periods: Period[]): Period {
const now = new Date().getTime();
const excludedNames = ["Bac blanc", "Brevet blanc", "Hors période", "Année", "Contrôle en cours de formation", "EPREUVES PONCTUELLES 1ERE SERIE", "EPREUVES PONCTUELLES 2EME SERIE", "MI-SEMESTRE 1", "MI-SEMESTRE 2"];
const excludedNames = [
"Bac blanc",
"Brevet blanc",
"Hors période",
"Année",
"Contrôle en cours de formation",
"EPREUVES PONCTUELLES 1ERE SERIE",
"EPREUVES PONCTUELLES 2EME SERIE",
"MI-SEMESTRE 1",
"MI-SEMESTRE 2",
"Évaluation spécifique de DNL",
];
periods = periods
.filter(period => !excludedNames.includes(period.name))
.sort((a, b) => a.start.getTime() - b.start.getTime());
Expand All @@ -15,9 +26,11 @@ export function getCurrentPeriod(periods: Period[]): Period {
}

if (periods.length > 0) {
warn("Current period not found. Falling back to the first period in the array.");
warn(
"Current period not found. Falling back to the first period in the array."
);
return periods[0];
}

error("Unable to find the current period and unable to fallback...");
}
}