Quizzes

Schema #

The schema defines all the fields that exist within a quiz record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.

date
string, null, datetime (details)

The date the object was published, in the site's timezone.

Context: view, edit, embed

date_gmt
string, null, datetime (details)

The date the object was published, as GMT.

Context: view, edit

guid
object

The globally unique identifier for the object.

Read only

Context: view, edit

id
integer

Unique identifier for the object.

Read only

Context: view, edit, embed

modified
string, datetime (details)

The date the object was last modified, in the site's timezone.

Read only

Context: view, edit

modified_gmt
string, datetime (details)

The date the object was last modified, as GMT.

Read only

Context: view, edit

slug
string

An alphanumeric identifier for the object unique to its type.

Context: view, edit, embed

status
string

A named status for the object.

Context: view, edit

One of: publish, future, draft, pending, private, graded, not_graded

type
string

Type of Post for the object.

Read only

Context: view, edit, embed

password
string

A password to protect access to the content and excerpt.

Context: edit

generated_slug
string

Slug automatically generated from the object title.

Read only

Context: edit

title
object

The title for the object.

Context: view, edit, embed

content
object

The content for the object.

Context: view, edit

author
integer

The ID for the author of the object.

Context: view, edit, embed

comment_status
string

Whether or not comments are open on the object.

Context: view, edit

One of: open, closed

ping_status
string

Whether or not the object can be pinged.

Context: view, edit

One of: open, closed

menu_order
integer

The order of the object in relation to other object of its type.

Context: view, edit

template
string

The theme file to use to display the object.

Context: view, edit

categories
array

The terms assigned to the object in the category taxonomy.

Context: view, edit

tags
array

The terms assigned to the object in the post_tag taxonomy.

Context: view, edit

ld_quiz_category
array

The terms assigned to the object in the ld_quiz_category taxonomy.

Context: view, edit

ld_quiz_tag
array

The terms assigned to the object in the ld_quiz_tag taxonomy.

Context: view, edit

course
integer

Associated Course

Context: view, edit

lesson
integer

Associated Lesson

Context: view, edit

prerequisites
array

Quiz Prerequisites

Context: view, edit

registered_users_only
boolean

Allowed Users

Context: view, edit

passing_percentage
float

Passing Score Percentage

Context: view, edit

certificate
integer

Quiz Certificate

Context: view, edit

certificate_award_threshold
float

Certificate Awarded for

Context: view, edit

retry_restrictions_enabled
boolean

Restrict Quiz Retakes

Context: view, edit

retry_repeats
string

Number of repeats allowed. blank is unlimited, 0 is 1 repeats, 1 is 2 repeats, etc.

Context: view, edit

answer_all_questions_enabled
boolean

All Questions required to complete

Context: view, edit

time_limit_enabled
boolean

Time Limit Enabled

Context: view, edit

time_limit_time
integer

Automatically Submit After

Context: view, edit

materials_enabled
boolean

Materials Eabled

Context: view, edit

materials
string

Materials

Context: view, edit

auto_start
boolean

Autostart

Context: view, edit

quiz_modus
string

Question Display

Context: view, edit

One of: single, multiple

review_table_enabled
boolean

Question Overview Table

Context: view, edit

summary_hide
boolean

Quiz Summary

Context: view, edit

skip_question_disabled
boolean

Skip Question

Context: view, edit

custom_sorting
boolean

Custom Question Ordering

Context: view, edit

sort_categories
boolean

Sort by Category

Context: view, edit

question_random
boolean

Randomize Order

Context: view, edit

show_max_question
boolean

Context: view, edit

show_points
boolean

Point Value

Context: view, edit

show_category
boolean

Question Category

Context: view, edit

hide_question_position_overview
boolean

Question Position

Context: view, edit

hide_question_numbering
boolean

Question Numbering

Context: view, edit

numbered_answer
boolean

Number Answers

Context: view, edit

answer_random
boolean

Randomize Answers

Context: view, edit

title_hidden
boolean

Quiz Title

Context: view, edit

restart_button_hide
boolean

Restart Quiz button

Context: view, edit

show_average_result
boolean

Average Score

Context: view, edit

show_category_score
boolean

Category Score

Context: view, edit

hide_result_points
boolean

Overall Score

Context: view, edit

hide_result_correct_question
boolean

No. of Correct Answers

Context: view, edit

hide_result_quiz_time
boolean

Time Spent

Context: view, edit

custom_answer_feedback
boolean

Custom Answer Feedback

Context: view, edit

hide_answer_message_box
boolean

Correct / Incorrect Messages

Context: view, edit

disabled_answer_mark
boolean

Correct / Incorrect Answer Marks

Context: view, edit

view_question_button_hidden
boolean

View Questions Button

Context: view, edit

toplist_enabled
boolean

Leaderboard

Context: view, edit

toplist_data_add_permissions
string

Who can apply?

Context: view, edit

One of: All user, Registered users only, Anonymous users only

toplist_data_add_multiple
boolean

Multiple Applications per user

Context: view, edit

toplist_data_add_automatic
boolean

Automatic user entry

Context: view, edit

toplist_data_show_limit
integer

Number of displayed entries

Context: view, edit

toplist_data_sort
string

Sort list by?

Context: view, edit

One of: Best user, Newest entry, Oldest entry

toplist_data_showin_enabled
boolean

Display on Quiz results page

Context: view, edit

statistics_enabled
boolean

Quiz Statistics

Context: view, edit

view_profile_statistics_enabled
boolean

Front-end Profile Display

Context: view, edit

statistics_ip_lock_enabled
boolean

Statistics IP-lock

Context: view, edit

email_enabled
boolean

Email Notifications

Context: view, edit

email_admin_enabled
boolean

Admin

Context: view, edit

email_user_enabled
boolean

User

Context: view, edit

List Quizzes #

Query this endpoint to retrieve a collection of Quizzes. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /ldlms/v2/sfwd-quiz

Example Request #

$ curl https://example.com/wp-json/ldlms/v2/sfwd-quiz

Arguments #

context

Scope under which the request is made; determines fields present in response.

Default: view

One of: view, embed, edit

page

Current page of the collection.

Default: 1

per_page

Maximum number of items to be returned in result set.

Default: 10

search

Limit results to those matching a string.

after

Limit response to posts published after a given ISO8601 compliant date.

author

Limit result set to posts assigned to specific authors.

author_exclude

Ensure result set excludes posts assigned to specific authors.

before

Limit response to posts published before a given ISO8601 compliant date.

exclude

Ensure result set excludes specific IDs.

include

Limit result set to specific IDs.

menu_order

Limit result set to posts with a specific menu_order value.

offset

Offset the result set by a specific number of items.

order

Order sort attribute ascending or descending.

Default: asc

One of: asc, desc

orderby

Sort collection by object attribute.

Default: title

One of: author, date, id, include, modified, parent, relevance, slug, include_slugs, title, menu_order

slug

Limit result set to posts with one or more specific slugs.

status

Limit result set to posts assigned one or more statuses.

Default: publish

tax_relation

Limit result set based on relationship between multiple taxonomies.

One of: AND, OR

categories

Limit result set to all items that have the specified term assigned in the categories taxonomy.

categories_exclude

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags

Limit result set to all items that have the specified term assigned in the tags taxonomy.

tags_exclude

Limit result set to all items except those that have the specified term assigned in the tags taxonomy.

ld_quiz_category

Limit result set to all items that have the specified term assigned in the ld_quiz_category taxonomy.

ld_quiz_category_exclude

Limit result set to all items except those that have the specified term assigned in the ld_quiz_category taxonomy.

ld_quiz_tag

Limit result set to all items that have the specified term assigned in the ld_quiz_tag taxonomy.

ld_quiz_tag_exclude

Limit result set to all items except those that have the specified term assigned in the ld_quiz_tag taxonomy.

course

Limit results to be within a specific Course. Required for non-admin users.

lesson

Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with course parameter.

topic

Limit results to be within a specific Topic. Must be used with course parameter.

Create a Quiz #

Arguments #

date

The date the object was published, in the site's timezone.

date_gmt

The date the object was published, as GMT.

slug

An alphanumeric identifier for the object unique to its type.

status

A named status for the object.

One of: publish, future, draft, pending, private, graded, not_graded

password

A password to protect access to the content and excerpt.

title

The title for the object.

content

The content for the object.

author

The ID for the author of the object.

featured_media

The ID of the featured media for the object.

comment_status

Whether or not comments are open on the object.

One of: open, closed

ping_status

Whether or not the object can be pinged.

One of: open, closed

menu_order

The order of the object in relation to other object of its type.

template

The theme file to use to display the object.

categories

The terms assigned to the object in the category taxonomy.

tags

The terms assigned to the object in the post_tag taxonomy.

ld_quiz_category

The terms assigned to the object in the ld_quiz_category taxonomy.

ld_quiz_tag

The terms assigned to the object in the ld_quiz_tag taxonomy.

course

Associated Course

lesson

Associated Lesson

prerequisites

Quiz Prerequisites

registered_users_only

Allowed Users

passing_percentage

Passing Score Percentage

certificate

Quiz Certificate

certificate_award_threshold

Certificate Awarded for

retry_restrictions_enabled

Restrict Quiz Retakes

retry_repeats

Number of repeats allowed. blank is unlimited, 0 is 1 repeats, 1 is 2 repeats, etc.

answer_all_questions_enabled

All Questions required to complete

Default: 1

time_limit_enabled

Time Limit Enabled

time_limit_time

Automatically Submit After

materials_enabled

Materials Eabled

materials

Materials

auto_start

Autostart

quiz_modus

Question Display

Default: open

One of: single, multiple

review_table_enabled

Question Overview Table

summary_hide

Quiz Summary

skip_question_disabled

Skip Question

custom_sorting

Custom Question Ordering

sort_categories

Sort by Category

question_random

Randomize Order

show_max_question
show_points

Point Value

show_category

Question Category

hide_question_position_overview

Question Position

hide_question_numbering

Question Numbering

numbered_answer

Number Answers

answer_random

Randomize Answers

title_hidden

Quiz Title

restart_button_hide

Restart Quiz button

Default: 1

show_average_result

Average Score

Default: 1

show_category_score

Category Score

Default: 1

hide_result_points

Overall Score

Default: 1

hide_result_correct_question

No. of Correct Answers

Default: 1

hide_result_quiz_time

Time Spent

Default: 1

custom_answer_feedback

Custom Answer Feedback

Default: 1

hide_answer_message_box

Correct / Incorrect Messages

Default: 1

disabled_answer_mark

Correct / Incorrect Answer Marks

Default: 1

view_question_button_hidden

View Questions Button

Default: 1

toplist_enabled

Leaderboard

toplist_data_add_permissions

Who can apply?

Default: 1

One of: All user, Registered users only, Anonymous users only

toplist_data_add_multiple

Multiple Applications per user

toplist_data_add_automatic

Automatic user entry

toplist_data_show_limit

Number of displayed entries

Default: 10

toplist_data_sort

Sort list by?

Default: 1

One of: Best user, Newest entry, Oldest entry

toplist_data_showin_enabled

Display on Quiz results page

statistics_enabled

Quiz Statistics

Default: 1

view_profile_statistics_enabled

Front-end Profile Display

Default: 1

statistics_ip_lock_enabled

Statistics IP-lock

email_enabled

Email Notifications

email_admin_enabled

Admin

email_user_enabled

User

Definition #

POST /ldlms/v2/sfwd-quiz

List Quizzes #

Query this endpoint to retrieve a collection of Quizzes. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /ldlms/v2/sfwd-quiz/<id>

Example Request #

$ curl https://example.com/wp-json/ldlms/v2/sfwd-quiz/<id>

Arguments #

id

Unique identifier for the object.

context

Scope under which the request is made; determines fields present in response.

Default: view

One of: view, embed, edit

page

Current page of the collection.

Default: 1

per_page

Maximum number of items to be returned in result set.

Default: 10

search

Limit results to those matching a string.

after

Limit response to posts published after a given ISO8601 compliant date.

author

Limit result set to posts assigned to specific authors.

author_exclude

Ensure result set excludes posts assigned to specific authors.

before

Limit response to posts published before a given ISO8601 compliant date.

exclude

Ensure result set excludes specific IDs.

include

Limit result set to specific IDs.

menu_order

Limit result set to posts with a specific menu_order value.

offset

Offset the result set by a specific number of items.

order

Order sort attribute ascending or descending.

Default: asc

One of: asc, desc

orderby

Sort collection by object attribute.

Default: title

One of: author, date, id, include, modified, parent, relevance, slug, include_slugs, title, menu_order

slug

Limit result set to posts with one or more specific slugs.

status

Limit result set to posts assigned one or more statuses.

Default: publish

tax_relation

Limit result set based on relationship between multiple taxonomies.

One of: AND, OR

categories

Limit result set to all items that have the specified term assigned in the categories taxonomy.

categories_exclude

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags

Limit result set to all items that have the specified term assigned in the tags taxonomy.

tags_exclude

Limit result set to all items except those that have the specified term assigned in the tags taxonomy.

ld_quiz_category

Limit result set to all items that have the specified term assigned in the ld_quiz_category taxonomy.

ld_quiz_category_exclude

Limit result set to all items except those that have the specified term assigned in the ld_quiz_category taxonomy.

ld_quiz_tag

Limit result set to all items that have the specified term assigned in the ld_quiz_tag taxonomy.

ld_quiz_tag_exclude

Limit result set to all items except those that have the specified term assigned in the ld_quiz_tag taxonomy.

course

Limit results to be within a specific Course. Required for non-admin users.

lesson

Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with course parameter.

topic

Limit results to be within a specific Topic. Must be used with course parameter.

Update a Quiz #

Arguments #

id

Unique identifier for the object.

date

The date the object was published, in the site's timezone.

date_gmt

The date the object was published, as GMT.

slug

An alphanumeric identifier for the object unique to its type.

status

A named status for the object.

One of: publish, future, draft, pending, private, graded, not_graded

password

A password to protect access to the content and excerpt.

title

The title for the object.

content

The content for the object.

author

The ID for the author of the object.

featured_media

The ID of the featured media for the object.

comment_status

Whether or not comments are open on the object.

One of: open, closed

ping_status

Whether or not the object can be pinged.

One of: open, closed

menu_order

The order of the object in relation to other object of its type.

template

The theme file to use to display the object.

categories

The terms assigned to the object in the category taxonomy.

tags

The terms assigned to the object in the post_tag taxonomy.

ld_quiz_category

The terms assigned to the object in the ld_quiz_category taxonomy.

ld_quiz_tag

The terms assigned to the object in the ld_quiz_tag taxonomy.

course

Associated Course

lesson

Associated Lesson

prerequisites

Quiz Prerequisites

registered_users_only

Allowed Users

passing_percentage

Passing Score Percentage

certificate

Quiz Certificate

certificate_award_threshold

Certificate Awarded for

retry_restrictions_enabled

Restrict Quiz Retakes

retry_repeats

Number of repeats allowed. blank is unlimited, 0 is 1 repeats, 1 is 2 repeats, etc.

answer_all_questions_enabled

All Questions required to complete

time_limit_enabled

Time Limit Enabled

time_limit_time

Automatically Submit After

materials_enabled

Materials Eabled

materials

Materials

auto_start

Autostart

quiz_modus

Question Display

One of: single, multiple

review_table_enabled

Question Overview Table

summary_hide

Quiz Summary

skip_question_disabled

Skip Question

custom_sorting

Custom Question Ordering

sort_categories

Sort by Category

question_random

Randomize Order

show_max_question
show_points

Point Value

show_category

Question Category

hide_question_position_overview

Question Position

hide_question_numbering

Question Numbering

numbered_answer

Number Answers

answer_random

Randomize Answers

title_hidden

Quiz Title

restart_button_hide

Restart Quiz button

show_average_result

Average Score

show_category_score

Category Score

hide_result_points

Overall Score

hide_result_correct_question

No. of Correct Answers

hide_result_quiz_time

Time Spent

custom_answer_feedback

Custom Answer Feedback

hide_answer_message_box

Correct / Incorrect Messages

disabled_answer_mark

Correct / Incorrect Answer Marks

view_question_button_hidden

View Questions Button

toplist_enabled

Leaderboard

toplist_data_add_permissions

Who can apply?

One of: All user, Registered users only, Anonymous users only

toplist_data_add_multiple

Multiple Applications per user

toplist_data_add_automatic

Automatic user entry

toplist_data_show_limit

Number of displayed entries

toplist_data_sort

Sort list by?

One of: Best user, Newest entry, Oldest entry

toplist_data_showin_enabled

Display on Quiz results page

statistics_enabled

Quiz Statistics

view_profile_statistics_enabled

Front-end Profile Display

statistics_ip_lock_enabled

Statistics IP-lock

email_enabled

Email Notifications

email_admin_enabled

Admin

email_user_enabled

User

Definition #

POST /ldlms/v2/sfwd-quiz/<id>

Example Request #

Delete a Quiz #

Arguments #

id

Unique identifier for the object.

force

Whether to bypass trash and force deletion.

Definition #

DELETE /ldlms/v2/sfwd-quiz/<id>

Example Request #

$ curl -X DELETE https://example.com/wp-json/ldlms/v2/sfwd-quiz/<id>