From f83d0087a6242494cf96bcd0bc8a49105675e8bc Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 10 Nov 2017 14:21:25 +0100 Subject: [PATCH] Added projet --- utils/calendar.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/calendar.js b/utils/calendar.js index 7d3d07f..f1ad997 100644 --- a/utils/calendar.js +++ b/utils/calendar.js @@ -27,8 +27,9 @@ cal.Type = { Other: { BE: 5, Examen: 6, + Projet: 7, }, - Unknown: 7, + Unknown: 8, } cal.getTypeName = function(type) { @@ -38,6 +39,7 @@ cal.getTypeName = function(type) { case cal.Type.CTD: return "CTD"; case cal.Type.CM: return "CM"; case cal.Type.Other.BE: + case cal.Type.Other.Projet: case cal.Type.Other.Examen: return "Other"; default: return "Unknown"; @@ -49,6 +51,7 @@ cal.getFactor = function(type) { case cal.Type.TD: case cal.Type.TP: case cal.Type.Other.BE: return 1; + case cal.Type.Other.Projet: return 1; case cal.Type.Other.Examen: return 0; case cal.Type.CTD: return 1.25; case cal.Type.CM: return 1.5; @@ -70,6 +73,8 @@ cal.getTypeFromName = function(name) { return cal.Type.Other.BE; } else if (name.toLowerCase().indexOf("exam") !== -1) { return cal.Type.Other.Examen; + } else if (name.toLowerCase().indexOf("projet") !== -1) { + return cal.Type.Other.Projet; } else { return cal.Type.Unkown; }