Added projet

This commit is contained in:
Thomas Forgione 2017-11-10 14:21:25 +01:00
parent b8815ed6ac
commit f83d0087a6
No known key found for this signature in database
GPG Key ID: C75CD416BD1FFCE1
1 changed files with 6 additions and 1 deletions

View File

@ -27,8 +27,9 @@ cal.Type = {
Other: { Other: {
BE: 5, BE: 5,
Examen: 6, Examen: 6,
Projet: 7,
}, },
Unknown: 7, Unknown: 8,
} }
cal.getTypeName = function(type) { cal.getTypeName = function(type) {
@ -38,6 +39,7 @@ cal.getTypeName = function(type) {
case cal.Type.CTD: return "CTD"; case cal.Type.CTD: return "CTD";
case cal.Type.CM: return "CM"; case cal.Type.CM: return "CM";
case cal.Type.Other.BE: case cal.Type.Other.BE:
case cal.Type.Other.Projet:
case cal.Type.Other.Examen: case cal.Type.Other.Examen:
return "Other"; return "Other";
default: return "Unknown"; default: return "Unknown";
@ -49,6 +51,7 @@ cal.getFactor = function(type) {
case cal.Type.TD: case cal.Type.TD:
case cal.Type.TP: case cal.Type.TP:
case cal.Type.Other.BE: return 1; case cal.Type.Other.BE: return 1;
case cal.Type.Other.Projet: return 1;
case cal.Type.Other.Examen: return 0; case cal.Type.Other.Examen: return 0;
case cal.Type.CTD: return 1.25; case cal.Type.CTD: return 1.25;
case cal.Type.CM: return 1.5; case cal.Type.CM: return 1.5;
@ -70,6 +73,8 @@ cal.getTypeFromName = function(name) {
return cal.Type.Other.BE; return cal.Type.Other.BE;
} else if (name.toLowerCase().indexOf("exam") !== -1) { } else if (name.toLowerCase().indexOf("exam") !== -1) {
return cal.Type.Other.Examen; return cal.Type.Other.Examen;
} else if (name.toLowerCase().indexOf("projet") !== -1) {
return cal.Type.Other.Projet;
} else { } else {
return cal.Type.Unkown; return cal.Type.Unkown;
} }