- πΊπΈUnited States smustgrave
What if we just alter the options and if hasAttempts() is true don't include Remove button.
And we could update the help text at the bottom?
In a perfect world, questions that have been part of a Quiz attempt would never be deleted.
But, it's possible, since there are currently no restrictions to prevent that from happening. Usually this happens in testing, but could happen in production.
The issues we have to deal with here are:
1. Users who answered a question in their attempt will no longer have that question, and can't view feedback for it
2. Reporting is affected because a Quiz's score cannot be recalculated
3. Admins may be locked out of certain areas of the site because the system expects an attempt to have all questions.
Issues pop up frequently, this should solve them all:
#2912759: HTTP 500 and "Undefined property: MultichoiceResponse::$result_answer_id" after editing question β
#2884069: 500 ajax error path:/system/ajax β
#2402535: Disabling a quiz question type module leaves quizes with an existing question of that type unusable β
I believe the solution here is to prevent deletion of questions unless they are:
1. Not in any quiz, or quiz revision
2. Not in any attempt's layout
Active
7.0
Code - Quiz core
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
What if we just alter the options and if hasAttempts() is true don't include Remove button.
And we could update the help text at the bottom?