Skip to content

Commit

Permalink
Merge pull request #772 from yeatmanlab/fix/score-report-no-name
Browse files Browse the repository at this point in the history
Fix score and progress reports not loading
  • Loading branch information
Emily-ejag authored Sep 4, 2024
2 parents cb13feb + fe6c013 commit 4a2be6b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
14 changes: 4 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"vue-recaptcha": "^3.0.0-alpha.6",
"vue-router": "^4.1.6",
"vue3-text-clamp": "^0.1.2",
"workbox-precaching": "^7.1.0",
"zipson": "^0.2.12"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/ProgressReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ const computedProgressData = computed(() => {
username: user.username,
email: user.email,
userId: user.userId,
firstName: user.name.first,
lastName: user.name.last,
firstName: user.name?.first,
lastName: user.name?.last,
grade: grade,
assessmentPid: user.assessmentPid,
schoolName: schoolName,
Expand Down
12 changes: 8 additions & 4 deletions src/pages/ScoreReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,19 @@ const computeAssignmentAndRunData = computed(() => {
schoolName = schoolNameDictionary.value[schoolId];
}

const firstNameOrUsername = user.name.first ?? user.username;
const firstName = user.name?.first;
const lastName = user.name?.last;
const username = user.username;

const firstNameOrUsername = firstName ?? username;

const currRow = {
user: {
username: user.username,
username: username,
email: user.email,
userId: user.userId,
firstName: user.name.first,
lastName: user.name.last,
firstName: firstName,
lastName: lastName,
grade: grade,
assessmentPid: user.assessmentPid,
schoolName: schoolName,
Expand Down

0 comments on commit 4a2be6b

Please sign in to comment.