Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle request for new variant when assessment is not available #9803

Merged
merged 7 commits into from
May 9, 2024

Conversation

echau01
Copy link
Contributor

@echau01 echau01 commented May 2, 2024

Resolves #9030, resolves #1718.

If an assessment is not open or not active, and a student clicks a question in the assessment:

  • If the student has opened the question before (thus creating a variant), show them the most recent variant that is not broken.
  • If the student has never opened the question before, show them this page:

no-variant-exists

In both cases, we avoid generating a new variant.

Note: in my implementation, we do not show a broken variant. Not sure if this is right, but we can discuss it.

If a non-broken variant exists, return the most recent one.
Otherwise, tell the user that a new variant cannot be generated.
@jonatanschroeder
Copy link
Member

Resolves #9030 and #1718.

Nice to see you again, @echau01! In order to link the PR to the issue you will need to repeat the keyword: Resolves #9030, resolves #1718. Can you update the description?

Copy link
Member

@jonatanschroeder jonatanschroeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a full review, only a first pass.

Copy link
Member

@jonatanschroeder jonatanschroeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the way things are done here, but I'd prefer to defer to @mwest1066 or @nwalters512 for an additional look.

Copy link
Contributor

@nwalters512 nwalters512 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few stylistic nits, nothing blocking though. @echau01 let me know when you're ready for this to be merged.

@nwalters512
Copy link
Contributor

@echau01 there's a failing test that you'll need to fix before this can be merged.

Exam questions are randomized, so we might visit the
"broken generation" question and assume that a variant
was created. Let's just remove the broken question
from the test exam.
@echau01
Copy link
Contributor Author

echau01 commented May 9, 2024

@nwalters512 I think everything's ready for merging now.

@nwalters512 nwalters512 added this pull request to the merge queue May 9, 2024
Merged via the queue into PrairieLearn:master with commit 9765f7b May 9, 2024
7 checks passed
@echau01 echau01 deleted the forbidden-new-variant branch May 10, 2024 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants