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

Retrieve individual question options from REST API #4013

Merged
merged 14 commits into from
Feb 25, 2021

Conversation

jom
Copy link
Member

@jom jom commented Feb 24, 2021

Changes proposed in this Pull Request

  • Adds two REST API endpoints to assist with both the individual question editor and adding existing questions to a quiz.
    • GET /wp-json/sensei-internal/v1/question-options/{question_id}
    • GET /wp-json/sensei-internal/v1/question-options?question_ids={question_ids_separated_by_commas}
  • Split off the question methods into a shared trait between the two controllers.
  • Fix for schema.

Testing instructions

  • Try out endpoints.

New Filter

  • sensei_rest_api_schema_single_question: Add additional question types to the REST API schema.

@jom jom requested a review from a team February 24, 2021 20:03
@jom jom self-assigned this Feb 24, 2021
@jom jom force-pushed the add/individual-question-rest-api branch from 34f5a64 to aeb56d0 Compare February 24, 2021 20:06
@jom jom marked this pull request as draft February 25, 2021 10:34
@jom jom added this to the 3.9.0 milestone Feb 25, 2021
@jom jom force-pushed the add/individual-question-rest-api branch 7 times, most recently from 426ac8b to 3167fb7 Compare February 25, 2021 14:18
@jom jom force-pushed the add/individual-question-rest-api branch from 3167fb7 to e602a9c Compare February 25, 2021 14:19
@jom jom force-pushed the add/individual-question-rest-api branch from c97440d to 749a1e5 Compare February 25, 2021 14:28
@jom jom added the Hooks This change adds or modifies one or more hooks. label Feb 25, 2021
@jom jom marked this pull request as ready for review February 25, 2021 14:50
Copy link
Contributor

@gikaragia gikaragia left a comment

Choose a reason for hiding this comment

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

LGTM!

@jom jom merged commit ab9113d into master Feb 25, 2021
@jom jom deleted the add/individual-question-rest-api branch February 25, 2021 15:25
@donnapep donnapep changed the title REST API: Retrieve individual question options Retrieve individual question options from REST API Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hooks This change adds or modifies one or more hooks. [Type] Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants