diffscript betterment

This commit is contained in:
Matti Luukkainen
2021-03-02 13:51:24 +02:00
parent 28cecba134
commit 18c7dd6b03
@@ -25,13 +25,16 @@ const populationDiff = async (programme, year) => {
const studentsOodi = resultOodi.students.map(s => s.studentNumber)
const sisOnly = _.difference(studentsSis, studentsOodi)
const oodiOnly = _.difference(studentsOodi. studentsSis)
const oodiOnly = _.difference(studentsOodi, studentsSis)
const both = _.intersection(studentsOodi, studentsSis)
if (oodiOnly.length === 0 && sisOnly.length === 0 ) {
} else {
if (oodiOnly.length > 0) {
console.log(' ',year, ' oodi only', oodiOnly.length, 'both', both.length)
oodiOnly.forEach(s => {
console.log(' ', s)
})
}
if (sisOnly.length > 0) {
const wronglyMarked = (await cancelledButGraduated(programme)).map(s => s.student_studentnumber)
@@ -117,14 +120,13 @@ const bsc = async () => {
const main = async () => {
// print moar/less
verbose = false
await bsc()
await msc()
verbose = true
//await bsc()
//await msc()
await programmeDiff('KH50_005')
process.exit()
}
main()
/*
how to run:
docker exec backend node /usr/src/app/src/sisoodi_diff/populations.js