summaryrefslogtreecommitdiff
path: root/school/node_modules/pronote-api/src/fetch/pronote/evaluations.js
diff options
context:
space:
mode:
Diffstat (limited to 'school/node_modules/pronote-api/src/fetch/pronote/evaluations.js')
-rw-r--r--school/node_modules/pronote-api/src/fetch/pronote/evaluations.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/school/node_modules/pronote-api/src/fetch/pronote/evaluations.js b/school/node_modules/pronote-api/src/fetch/pronote/evaluations.js
deleted file mode 100644
index c9065fd..0000000
--- a/school/node_modules/pronote-api/src/fetch/pronote/evaluations.js
+++ /dev/null
@@ -1,49 +0,0 @@
-const parse = require('../../data/types');
-const { toPronote } = require('../../data/objects');
-
-const navigate = require('./navigate');
-
-const PAGE_NAME = 'DernieresEvaluations';
-const TAB_ID = 201;
-const ACCOUNTS = ['student', 'parent'];
-
-async function getEvaluations(session, user, period)
-{
- const evaluations = await navigate(session, user, PAGE_NAME, TAB_ID, ACCOUNTS, {
- periode: period.name ? toPronote(period) : period
- });
-
- if (!evaluations) {
- return null;
- }
-
- return parse(evaluations.listeEvaluations, ({
- listeNiveauxDAcquisitions, listePaliers, matiere, individu, coefficient, descriptif, date, periode
- }) => ({
- title: descriptif,
- acquisitionLevels: parse(listeNiveauxDAcquisitions, ({
- abbreviation, ordre, pilier, coefficient, domaine, item
- }) => ({
- position: ordre,
- value: abbreviation,
- pillar: parse(pilier, ({ strPrefixes }) => ({
- prefixes: strPrefixes.split(', ')
- })),
- coefficient,
- domain: parse(domaine),
- item: item && parse(item) || null
- })),
- levels: parse(listePaliers),
- subject: parse(matiere, ({ couleur, ordre, serviceConcerne }) => ({
- position: ordre,
- service: parse(serviceConcerne),
- color: couleur
- })),
- teacher: parse(individu),
- coefficient,
- date: parse(date),
- period: parse(periode)
- }));
-}
-
-module.exports = getEvaluations;