diff --git a/js/AliasEditor.js b/js/AliasEditor.js index cfb891a..1dc2aef 100644 --- a/js/AliasEditor.js +++ b/js/AliasEditor.js @@ -32,7 +32,12 @@ studentEditSelector.addEventListener('change', function () { //change student to //click events studentSaveButton.addEventListener('click', function () { - let emails = tagify_Email.value; + let emails = []; + for (let e of tagify_Email.value) { + console.log(e.value); + emails.push(e.value); + } + if (studentSaveButton.value === "add") { //add new if (studentIDField.value !== "" && studentNameField.value !== "") { let newStudent = new Student(studentIDField.value, studentNameField.value, emails); diff --git a/js/ZOOMparse.js b/js/ZOOMparse.js index 9b48fdd..e9d2a0f 100644 --- a/js/ZOOMparse.js +++ b/js/ZOOMparse.js @@ -58,7 +58,6 @@ function processLine(curLine) { let matchResult = FindMatchFromStudentAttendance(curLine); if (matchResult.student !== null) { if (matchResult.unmatchedEmail !== null && matchResult.unmatchedEmail.length > 0) {//new email found with name - console.log("Adding new email"); students[students.indexOf(matchResult.student)].addKnownEmail(curLine[1]); } if (matchResult.unmatchedName !== null) {//new name found with email (might be a ZOOM username) @@ -74,6 +73,11 @@ function processLine(curLine) { connectionMatch = new StudentConnection(); connectionMatch.name = curLine[0]; connectionMatch.email = curLine[1]; + if (matchResult.student.emails.length > 0) { + console.log(matchResult.student.emails[0]); + connectionMatch.email = matchResult.student.emails[0]; + } + connectionMatch.addTime(curLine[4]); studentsConnections.push(connectionMatch); diff --git a/js/main.js b/js/main.js index 2558b23..2042dce 100644 --- a/js/main.js +++ b/js/main.js @@ -19,7 +19,6 @@ const initApp = () => { droparea.addEventListener("drop", handleDrop); document.querySelector('#zoomLink').addEventListener("click", pushData); - document.querySelector('#openZoomAcc').addEventListener("click", openZoomLink); document.querySelector('#upload').addEventListener("input", handleUpload); } @@ -63,7 +62,7 @@ function openZoomLink() { * @param students StudentConnections object array */ function generateAttendanceSheet(students) { - let timeStamp = 'For the meeting/class hosted on ' + recordDate.split(" ")[0] + " starting at " + recordDate.split(" ")[1] + recordDate.split(" ")[2] + let timeStamp = 'For the meeting/class hosted on ' + recordDate.split(" ")[0] + " starting at " + recordDate.split(" ")[1]; let html = "
" + "