Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KuhlTime committed Apr 26, 2021
1 parent 5b7c60e commit 59d2cdd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/controllers/OsscSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export default class OsscSession {
* Each `Score` gets scraped and then uploaded to firebase.
* If the particular `Score` has already been uploaded to firebase
* it gets sckipped.
* @param extract
* @param extract A reference to the `ModuleExtract`.
* @param cookie The session cookie.
*/
private static async getAllScores(extract: ModuleExtract, cookie: string) {
Expand All @@ -324,6 +324,8 @@ export default class OsscSession {
if (exam.score === undefined && exam.scoreLink !== undefined && cookie !== undefined) {
console.log(`No score found for ${module.name} on the ${exam.examinationDate?.toDateString()}`)
exam.score = await this.getScore(exam.scoreLink, cookie)

// save the score object to firebase
storeScore(exam.score)
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/models/Exam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,5 @@ export default class Exam {
const decoded = row['Note'].link.replace(/&/g, '&')
this.scoreLink = new URL(decoded)
}

// Check if firestore has score

// Else download score
}
}
2 changes: 0 additions & 2 deletions src/models/Score.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,4 @@ export default class Score {
failed: failed
}
}

// TODO: Simple Index values of each grade enum
}

0 comments on commit 59d2cdd

Please sign in to comment.