@@ -63,9 +63,9 @@ export default function CoursePage({
6363 // The Course data from the database is stored in the `course` object.
6464 // The data for the table is converted to the `row` object.
6565 const names = Array . isArray ( course . instructors ) ? course . instructors : [ ]
66- const hasReport = course . hasReport || ( course . report && course . report . id )
66+ const hasReport = course . hasReport || ( course . latestReport && course . latestReport . id )
6767 const publicUrl = course . publicUrl !== '---' && course . publicUrl !== '-' ? course . publicUrl : null
68- const scanCounts = course . report ?. scanCounts || { } ;
68+ const scanCounts = course . latestReport ?. scanCounts || { } ;
6969 const barriers = scanCounts . errors || 0 ;
7070 const suggestions = scanCounts . suggestions || 0 ;
7171 let row = {
@@ -76,11 +76,11 @@ export default function CoursePage({
7676 courseTitle : course . title , // Used for sorting, not displayed outside of courseName element
7777 accountName : course . accountName || '---' ,
7878 lastUpdated : course . lastUpdated || '---' ,
79- barriers : hasReport && course . report ? barriers : '---' ,
80- suggestions : hasReport && course . report ? suggestions : '---' ,
81- contentFixed : hasReport && course . report ? course . report . contentFixed : '---' ,
82- contentResolved : hasReport && course . report ? course . report . contentResolved : '---' ,
83- filesReviewed : hasReport && course . report ? course . report . filesReviewed : '---' ,
79+ barriers : hasReport && course . latestReport ? barriers : '---' ,
80+ suggestions : hasReport && course . latestReport ? suggestions : '---' ,
81+ contentFixed : hasReport && course . latestReport ? course . latestReport . contentFixed : '---' ,
82+ contentResolved : hasReport && course . latestReport ? course . latestReport . contentResolved : '---' ,
83+ filesReviewed : hasReport && course . latestReport ? course . latestReport . filesReviewed : '---' ,
8484 action : < div className = "flex-row gap-1" >
8585 < button key = { `reportButton${ course . id } ` }
8686 onClick = { ( ) => { ! course . loading && ! isAnyScanning && hasReport && handleReportClick ( course ) } }
@@ -105,7 +105,7 @@ export default function CoursePage({
105105 </ div >
106106
107107 }
108- tempFilteredCourses . push ( { ...course . report , ...row , } )
108+ tempFilteredCourses . push ( { ...course . latestReport , ...row , } )
109109 }
110110 } )
111111
@@ -188,7 +188,7 @@ export default function CoursePage({
188188
189189 if ( response . data && response . data . courseId ) {
190190 // Update the course object with the new UDOIT ID and instructors
191- course . udoitId = response . data . courseId
191+ course . udoitId = response . data . courseId ``
192192 const newCourseId = response . data . courseId
193193
194194 // Update instructors if they were fetched
@@ -313,7 +313,7 @@ export default function CoursePage({
313313 updatedCourse . oldId = originalId
314314 }
315315
316- handleCourseUpdate ( updatedCourse )
316+ handleCourseUpdate ( updatedCourse )
317317 setIsAnyScanning ( false )
318318 }
319319 } )
0 commit comments