This commit is contained in:
parent
fc09c533cd
commit
f45b8a9967
|
@ -1,5 +1,3 @@
|
||||||
import logger from '../../../middleware/logger';
|
|
||||||
|
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
|
|
||||||
export const getiCalFile = async (user: string, file: string, showBlockers: boolean, electiveModule: string, profileModule: string): Promise<string> => {
|
export const getiCalFile = async (user: string, file: string, showBlockers: boolean, electiveModule: string, profileModule: string): Promise<string> => {
|
||||||
|
@ -102,12 +100,8 @@ export const removeElective = function (ical: iCalFile, chosenElective: string):
|
||||||
{name: 'Robotik'},
|
{name: 'Robotik'},
|
||||||
{name: 'Web-Services'}
|
{name: 'Web-Services'}
|
||||||
];
|
];
|
||||||
logger.info(JSON.stringify(electiveToRemove));
|
|
||||||
electiveToRemove.splice(parseInt(chosenElective), 1);
|
electiveToRemove.splice(parseInt(chosenElective), 1);
|
||||||
|
|
||||||
logger.info('Chosen elective: ' + chosenElective);
|
|
||||||
logger.info(JSON.stringify(electiveToRemove));
|
|
||||||
|
|
||||||
ical.body.forEach((event) => {
|
ical.body.forEach((event) => {
|
||||||
let addEvent = true;
|
let addEvent = true;
|
||||||
electiveToRemove.forEach((module) => {
|
electiveToRemove.forEach((module) => {
|
||||||
|
@ -136,12 +130,8 @@ export const removeProfile = function (ical: iCalFile, chosenProfile: string): i
|
||||||
{names: ['e Business', 'angewandtes Projektmanagement']},
|
{names: ['e Business', 'angewandtes Projektmanagement']},
|
||||||
{names: ['Kommunikations und Netztechnik II']}
|
{names: ['Kommunikations und Netztechnik II']}
|
||||||
];
|
];
|
||||||
logger.info(JSON.stringify(profileToRemove));
|
|
||||||
profileToRemove.splice(parseInt(chosenProfile), 1);
|
profileToRemove.splice(parseInt(chosenProfile), 1);
|
||||||
|
|
||||||
logger.info('Chosen profile: ' + chosenProfile);
|
|
||||||
logger.info(JSON.stringify(profileToRemove));
|
|
||||||
|
|
||||||
ical.body.forEach((event) => {
|
ical.body.forEach((event) => {
|
||||||
let addEvent = true;
|
let addEvent = true;
|
||||||
profileToRemove.forEach((module) => {
|
profileToRemove.forEach((module) => {
|
||||||
|
@ -166,21 +156,3 @@ export interface iCalFile {
|
||||||
head: string;
|
head: string;
|
||||||
body: string[];
|
body: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
let electiveModules = [
|
|
||||||
{name: 'ERP-Systeme'},
|
|
||||||
{name: 'Ethik für Informatiker'},
|
|
||||||
{name: 'Evolutionäre Algorithmen'},
|
|
||||||
{name: 'Forensik'},
|
|
||||||
{name: 'Kryptographische Verfahren'},
|
|
||||||
{name: 'Robotik'},
|
|
||||||
{name: 'Web-Services'}
|
|
||||||
];
|
|
||||||
|
|
||||||
let profileModules = [
|
|
||||||
{names: ['.Grundlagen der KI (KI und BV)', 'Bildverarbeitung (KI und BV)']},
|
|
||||||
{names: ['Bildverarbeitung', 'Computergraphik']},
|
|
||||||
{names: ['Interaktive Systeme', 'Grundlagen der KI']},
|
|
||||||
{names: ['e Business', 'angewandtes Projektmanagement']},
|
|
||||||
{names: ['Kommunikations und Netztechnik II']}
|
|
||||||
];
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user