sensei icon indicating copy to clipboard operation
sensei copied to clipboard

Improve classic editor support for questions

Open yscik opened this issue 3 years ago • 0 comments

Background

The classic editor plugin offers a choice to edit something in the block editor or classic editor. We previously forced falling back to metaboxes for quizzes and questions when the classic editor plugin was active, which breaks the case when the post is edited in the block editor.

image

Some new question types only work with the block editor, so this enables the option to create/edit those with the block editor and use the classic editor for other cases.

Changes proposed in this Pull Request

  • Change check for block/metabox-based question/quiz editor to be based on the current screen being the block editor
  • Add support for Question post types to be opened in the classic or the block editor

TODO

  • [ ] Consider is_legacy_quiz_editor tracking flag
  • [ ] REST APIs? Seem to be working but the current screen check shouldn't work there

Testing instructions

  • Add the classic editor plugin
  • Try to edit questions and lessons with quizzes both in classic and block editor. Make sure both work.

yscik avatar Aug 10 '22 09:08 yscik