-
Notifications
You must be signed in to change notification settings - Fork 0
Examples
Alex Fantini edited this page Sep 21, 2023
·
1 revision
UniBoLessons
is the identifier of the library
If your degree programme has different curricula, please see Available method > getDegreeProgramme
function checkLessons(){
const calendar = CalendarApp.getCalendarsByName('University Lessons')[0];
const mail = "[email protected]";
const dp = UniBoLessons.getDegreeProgramme("https://corsi.unibo.it/laurea/IngegneriaInformatica/orario-lezioni");
const course = dp.getCourse("Analisi matematica T-1", 1);
course.createLessons(calendar, mail);
}
function checkLessons(){
const calendar = CalendarApp.getCalendarsByName('University Lessons')[0];
const mail = "[email protected]";
const dp = UniBoLessons.getDegreeProgramme("https://corsi.unibo.it/laurea/IngegneriaInformatica/orario-lezioni");
const course = dp.getCourse("Fondamenti di informatica T-1", 1, ["Modulo 2"]);
course.createLessons(calendar, mail);
}
Ex. skips all classes reserved for L-Zs and all classes after Dec. 20
function checkLessons(){
const calendar = CalendarApp.getCalendarsByName('University Lessons')[0];
const mail = "[email protected]";
const dp = UniBoLessons.getDegreeProgramme("https://corsi.unibo.it/laurea/IngegneriaInformatica/orario-lezioni");
const course = dp.getCourse("Fondamenti di informatica T-1", 1, ["Modulo 2"]);
course.setSkipLessons(skipLessons);
course.createLessons(calendar, mail);
}
function skipLessons(event){
return event.title.includes("L-Z") || new Date(event.start).valueOf() >= new Date(2023, 11, 20);
}
function checkLessons(){
const calendar = CalendarApp.getCalendarsByName('University Lessons')[0];
const mail = "[email protected]";
const dp = UniBoLessons.getDegreeProgramme("https://corsi.unibo.it/laurea/IngegneriaInformatica/orario-lezioni");
dp.createAllLessonsOfYear(1, calendar, mail);
}
Ex. skips all classes reserved for L-Zs and all classes after Dec. 20
function checkLessons(){
const calendar = CalendarApp.getCalendarsByName('University Lessons')[0];
const mail = "[email protected]";
const dp = UniBoLessons.getDegreeProgramme("https://corsi.unibo.it/laurea/IngegneriaInformatica/orario-lezioni");
dp.setSkipLessons(skipLessons);
dp.createAllLessonsOfYear(1, calendar, mail);
}
function skipLessons(event){
return event.title.includes("L-Z") || new Date(event.start).valueOf() >= new Date(2023, 11, 20);
}