gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
181 stars 135 forks source link

[Quiz] Deleting a quiz questions causes issues when grading / reviewing quiz attempts #840

Open thomasplevy opened 5 years ago

thomasplevy commented 5 years ago

Reproduction Steps

Expected Behavior

Actual Behavior

Error Messages / Logs



### Possible Solutions

+ When a question is deleted from a quiz LifterLMS should determine if the question exists in any existing attempts. If it does, the question should be *archived* instead of deleted.
+ This could be a new custom post status reserved for this post type.
+ An archived question should be excluded from all quiz related queries EXCEPT with relation to quiz attempts
+ When an attempt is deleted all archived questions should be checked to see if that archived question can now safely be deleted
+ An interface on the admin review may need to display that the question is an archived question (?)
actual-saurabh commented 4 years ago

It is a difficult one because there is no option to manually correct the issue, except by editing serialized attempt information directly into the database.

Possible Solutions

On Attempt Screen (Manual Grading):

  1. Orphaned answers show a warning (question doesn't exist).
  2. An option to delete orphaned question's answers.
  3. An option to manually grade answers whose questions don't exist.
  4. An option to manually grade answers that don't exist because their questions were added after the attempt.
  5. Ignore such answers from the grading calculations, or present a conflict resolution UI of some sorts.

On Builder

Add a warning in the builder when a question in a quiz (with existing attempts) is modified/deleted or when new ones are added.

nrherron92 commented 3 years ago

HS-117320 (this isn't a bump I just had this attached to the wrong issue)