diff --git a/lti-provider-server/app.js b/lti-provider-server/app.js index c27fd26f1d8..be060eabdfc 100644 --- a/lti-provider-server/app.js +++ b/lti-provider-server/app.js @@ -298,13 +298,13 @@ app.post('/postScore', jwtMiddleware({ let semester = calculateSemester(Date.now()); - let canvasUserId = user_id; + let lmsUserId = user_id; let lesson = lessonName; const submissionsRef = firestoredb.collection('problemSubmissions'); // const submissionsRef = firestoredb.collection('development_problemSubmissions'); const queryRef = submissionsRef.where('semester', '==', semester) - .where('canvas_user_id', '==', canvasUserId) + .where('lms_user_id', '==', lmsUserId) .where('lesson', '==', lesson) .orderBy('time_stamp', 'asc') .orderBy('problemID', 'asc'); @@ -334,7 +334,7 @@ app.post('/postScore', jwtMiddleware({ // get time of first action const firstQueryRef = submissionsRef.where('semester', '==', semester) - .where('canvas_user_id', '==', canvasUserId) + .where('lms_user_id', '==', lmsUserId) .where('lesson', '==', lesson) .orderBy('time_stamp', 'asc') .orderBy('problemID', 'asc') @@ -348,7 +348,7 @@ app.post('/postScore', jwtMiddleware({ // get time of last action before this lesson - const prevQueryRef = submissionsRef.where('canvas_user_id', '==', canvasUserId) + const prevQueryRef = submissionsRef.where('lms_user_id', '==', lmsUserId) .where('time_stamp', '<', lastTime) .orderBy('time_stamp', 'desc') .limit(1); diff --git a/src/ProblemLogic/Firebase.js b/src/ProblemLogic/Firebase.js index 531b238fce9..b1c2323528f 100644 --- a/src/ProblemLogic/Firebase.js +++ b/src/ProblemLogic/Firebase.js @@ -127,14 +127,14 @@ class Firebase { course_name: this.ltiContext.course_name, course_code: this.ltiContext.course_code, - canvas_user_id: this.ltiContext.user_id + lms_user_id: this.ltiContext.user_id } : { course_id: "n/a", course_name: "n/a", course_code: "n/a", - canvas_user_id: "n/a" + lms_user_id: "n/a" }, ...data diff --git a/src/tools/firebaseManipulateCSV.mjs b/src/tools/firebaseManipulateCSV.mjs index 14e3d8a174b..4288860414b 100644 --- a/src/tools/firebaseManipulateCSV.mjs +++ b/src/tools/firebaseManipulateCSV.mjs @@ -56,7 +56,7 @@ const transform = document => { if (document.course_id === "n/a") { document.course_code = "n/a" document.course_name = "n/a" - document.canvas_user_id = "n/a" + document.lms_user_id = "n/a" } if (document.semester === undefined || document.semester === "" || document.semester === null) { diff --git a/src/tools/firebaseVerifyCSV.mjs b/src/tools/firebaseVerifyCSV.mjs index f53c9396a5a..9c40f4c0aa1 100644 --- a/src/tools/firebaseVerifyCSV.mjs +++ b/src/tools/firebaseVerifyCSV.mjs @@ -111,7 +111,7 @@ async function verifyCSVs(_spinner, csvSelections, collectionType, useSampleMode object.assertPredicate("course_id", val => val === "n/a" || val?.toString().length === 40) object.assertPredicate("course_code", val => val === "n/a" || val?.toString().length >= 2) object.assertPredicate("course_name", val => val === "n/a" || val?.toString().length >= 4) - object.assertPredicate("canvas_user_id", val => val === "n/a" || val?.toString().length === 40) + object.assertPredicate("lms_user_id", val => val === "n/a" || val?.toString().length === 40) object.assertType("timeStamp", "undefined") object.assertType("canvasStudentID", "undefined") diff --git a/src/tools/populateGoogleSheets.js b/src/tools/populateGoogleSheets.js index 1f4d3865648..c3da9ad0c63 100644 --- a/src/tools/populateGoogleSheets.js +++ b/src/tools/populateGoogleSheets.js @@ -38,7 +38,7 @@ const INTERPOLATORS = { "Semester": val => calculateSemester(val) } -const EXCLUDED_FIELDS = ["semester", "canvas_user_id", "course_code", "course_id", "server_time"] +const EXCLUDED_FIELDS = ["semester", "lms_user_id", "course_code", "course_id", "server_time"] const HASH_EXCLUDE_FIELDS = ['status', 'resolution', 'resolveDate', 'deployDate', 'versionFixed', 'Issue Type']