Skip to content

Overrides the pass or fail grade recorded against one quiz attempt.

status must be passed or failed; nothing else is accepted, and the score itself is left unchanged.

Endpoint

  • Method: POST

  • Path: /admin/courses/{course_id}/quiz-results/{quiz_id}

  • Edition: PRO

  • Controller: FluentCommunityPro\App\Modules\Quiz\Http\Controllers\QuizController@updateQuizResult

  • Route source: fluent-community-pro/app/Modules/Quiz/Http/quiz_api.php:14

  • Requires a course admin for this course, or a WordPress user with manage_options.

  • Requires FluentCommunity Pro with the Quiz module.

Live sample

The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.

POST Update Course Quiz Result

POST
/admin/courses/{course_id}/quiz-results/{quiz_id}

Overrides the pass or fail grade recorded against one quiz attempt.

Controller: FluentCommunityPro\App\Modules\Quiz\Http\Controllers\QuizController@updateQuizResult
Route source: fluent-community-pro/app/Modules/Quiz/Http/quiz_api.php:14

Authorizations

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Request Body

application/json
JSON
{
  
"status": "string"
}

Responses

Successful response

application/json
JSON
{
  
"message": "string",
  
"result": {
  
  
"content_type": "string",
  
  
"id": 0,
  
  
"message": {
  
  
  
"q1": {
  
  
  
  
"is_correct": true,
  
  
  
  
"user_answer": "string"
  
  
  
},
  
  
  
"q2": {
  
  
  
  
"is_correct": true,
  
  
  
  
"user_answer": [
  
  
  
  
  
"string"
  
  
  
  
]
  
  
  
}
  
  
},
  
  
"meta": {
  
  
  
"attempts": 0,
  
  
  
"correct_answers": 0,
  
  
  
"total_questions": 0
  
  
},
  
  
"parent_id": "string",
  
  
"post_id": "string",
  
  
"score": "string",
  
  
"status": "string",
  
  
"type": "string",
  
  
"updated_at": "string",
  
  
"user_id": "string"
  
}
}

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation