From 6882e151f0eb45077fa189882ce51d60907306b2 Mon Sep 17 00:00:00 2001 From: Tulasi Atikamsetti Date: Fri, 17 Jun 2022 12:41:22 -0700 Subject: [PATCH] CANVAS-184 - Video reserves links not showing up. Commented summer session logic. --- src/server/services/registrar.js | 61 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/server/services/registrar.js b/src/server/services/registrar.js index 7c90539e..cdb8cc58 100644 --- a/src/server/services/registrar.js +++ b/src/server/services/registrar.js @@ -168,36 +168,37 @@ async function getShortname(offeredTermCode, classSectionID) { } = response; // Check if course is summer sessions. - if (offeredTermCode.slice(-1) === '1') { - registrarDebug('getShortname: Handling Summer session'); - // Get session group. - response = await registrar.call({ - url: `/sis/classes/${offeredTermCode}/v1`, - params: { - subjectAreaCode: subArea, - courseCatalogNumber: catNum, - classNumber: secNum, - }, - }); - - if (response === null) { - registrarDebug('getShortname: Classes is null'); - return returnObject; - } - - // Find the session that matches the class number. - let sessionGroup = ''; - response.classes[0].termSessionGroupCollection.forEach((groupItem) => { - groupItem.classCollection.forEach((classItem) => { - if (classItem.classNumber === secNum) { - sessionGroup = groupItem.termsessionGroupCode; - } - }); - }); - - registrarDebug(`getShortname: using sessionGroup ${sessionGroup}`); - term += sessionGroup; - } + // CANVAS-184 - Commented out to handle summer course to match up with Canvas SIS-ID. +// if (offeredTermCode.slice(-1) === '1') { +// registrarDebug('getShortname: Handling Summer session'); +// // Get session group. +// response = await registrar.call({ +// url: `/sis/classes/${offeredTermCode}/v1`, +// params: { +// subjectAreaCode: subArea, +// courseCatalogNumber: catNum, +// classNumber: secNum, +// }, +// }); +// +// if (response === null) { +// registrarDebug('getShortname: Classes is null'); +// return returnObject; +// } +// +// // Find the session that matches the class number. +// let sessionGroup = ''; +// response.classes[0].termSessionGroupCollection.forEach((groupItem) => { +// groupItem.classCollection.forEach((classItem) => { +// if (classItem.classNumber === secNum) { +// sessionGroup = groupItem.termsessionGroupCode; +// } +// }); +// }); +// +// registrarDebug(`getShortname: using sessionGroup ${sessionGroup}`); +// term += sessionGroup; +// } // Combine shortname components. const shortname = `${term}-${subArea}-${catNum}-${secNum}`;