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

Implement saving quiz and questions via the REST API #3972

Merged
merged 17 commits into from Feb 25, 2021

Conversation

gikaragia
Copy link
Contributor

@gikaragia gikaragia commented Feb 10, 2021

Changes proposed in this Pull Request

  • Implements saving of quiz and questions for the lesson-quiz endpoint.
  • The schema has been updated to support WP validation and sanitization.
  • The anyOf construct can't be use as it is supported in WP 5.6 only.
  • Some code from lesson import has been refactored in order to be shared between the importer and REST.

Testing instructions

  • The endpoint is not linked with the frontend yet so the only way to manually test this is to use the endpoint directly.

@gikaragia gikaragia changed the base branch from master to add/expand-question-categories February 10, 2021 17:38
@gikaragia gikaragia requested a review from yscik February 10, 2021 17:39
Base automatically changed from add/expand-question-categories to master February 11, 2021 17:48
@gikaragia gikaragia requested review from a team and removed request for yscik February 18, 2021 16:09
@gikaragia gikaragia marked this pull request as ready for review February 18, 2021 16:09
@gikaragia gikaragia force-pushed the add/quiz-rest-saving branch 3 times, most recently from e06b871 to 0bcd5a4 Compare February 22, 2021 09:52
Copy link
Member

@jom jom left a comment

Choose a reason for hiding this comment

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

Didn't test much, but I think we'll have the opportunity to do more later. Thanks for putting things in the trait in this PR 👍 . Looks good!

I'll do some rejigging with the schema, but I think it's good to split up the question type schema methods like this.

@gikaragia gikaragia merged commit 5484844 into master Feb 25, 2021
@donnapep donnapep deleted the add/quiz-rest-saving branch February 26, 2021 19:10
@donnapep donnapep added this to the 3.9.0 milestone Feb 26, 2021
@donnapep donnapep changed the title Implement quiz REST saving Implement saving quiz and questions via the REST API Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants