Open Jim-Sosnowski opened 1 month ago
The link that PT shows links to .../assessment/ID
, whereas if an assessment instance already exists, the PL homepage will link to .../assessment_instance/ID
. My hypothesis is that there is some difference in behavior between these two routes.
Just adding an additional note that may be helpful from our experience for allowing cheatsheets during exams. We noticed that it only occurred when we had active: false
(albeit a needed statement) in the assessment that we were trying to view
That's consistent with Jim's note that this is for review sessions, where access rules would have "active": false
.
When arriving at PL via the PT link, we hit this case since it's using the ..../assessment/:id
route:
res.locals.assessment_instance
is indeed undefined
, and res.locals.authz_result.active
is false
because of the access rule, so we immediately block access. However, that condition is never hit when accessing the assessment instance from the PL assessment list, since res.locals.assessment_instance
will be defined on the .../assessment_instance/:id
route.
As for the solution: I think we just need to query for and redirect to an assessment instance a little earlier. That is, we need to do this little thing before the studentAssessmentAccess
middleware gets a chance to block access:
We should consider how multi-instance assessments are handled, as we wouldn't know which specific instance to redirect to. This probably won't be common for CBTF exams, and we could probably defer handling this case until later. A possible solution is to render the list of instances on the studentAssessment
page.
This basic approach sounds sensible to me. Good find! 🕵️
During review sessions, students are not able to access their exams directly through PrairieTest.
Here is what a student experiences.
1) The student takes an exam in the CBTF. 2) They come to a review session to review their exam in the CBTF. 3) Everything is linked correctly in PT but when the exam starts the student sees a message stating "Assessment is no longer available." 4) To access the exam, students click on assessments (I believe in PL) and see the exam there. 5) They click on the exam and can review it.