Use dedicated entity types instead of paragraphs

Created on 17 June 2021, about 3 years ago
Updated 26 July 2024, about 1 month ago

Problem/Motivation

Paragraphs are currently being used on several places of the quiz module/architecture. While this gives you a head start regarding the feature-set for for example quiz feedback, it also comes with various drawbacks:

  • You need to exclude the quiz-related paragraph types on other places where paragraphs can be used
  • It's not possible to use strict interfaces that describe/dictate how for example quiz feedback work
  • Its not possible (more difficult) to create UIs (widgets,formatters,etc) that perfectly fits for managing quiz feedback/
  • It's not really clear (any more, especially with the new Entity API since Drupal 8) what distinct benefits the usage of paragraphs has in the context of the quiz module, versus custom/dedicated entities
  • Paragraphs are not being used what they are actually ment for
  • The hard dependency on the paragraphs module feels a bit like inheritance where composition is very well possible (a bundle of a dedicated quiz_feedback entity type can still use paragraphs)
  • ...

Proposed resolution

Use dedicated entity types, eg:

  • quiz_feedback
  • quiz_question_pool
  • quiz_choice

Of course we should still use entity_reference_revisions fields to link to entities of these types.

Remaining tasks

Discus, decide, refactor, implement upgrade path

User interface changes

None?

API changes

Tbd, various

Data model changes

Tbd, at least existing quiz paragraph types and paragraphs should be migrated/converted

✨ Feature request
Status

Active

Version

7.0

Component

Code - Quiz core

Created by

πŸ‡³πŸ‡±Netherlands casey

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024