> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myustadia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quiz Question Edit

> PUT /courses/{id}/quiz/{module_index}/{position}  (GAP3)

Human edit of one quiz question. Flips its review status to pending
(re-review required). No regeneration, no metering -- this is a direct
write, not an AI call.

module_index/position are int-typed on the route so FastAPI's routing
never confuses this path with a sibling string-keyed quiz route.



## OpenAPI

````yaml /openapi.yaml put /api/v1/courses/{course_id}/quiz/{module_index}/{position}
openapi: 3.1.0
info:
  title: Mahara Platform
  description: >
    AI Sales Training Course Generator, a Coursera-style platform.


    ## Authentication


    Every request must carry your API key as a Bearer token:


    `Authorization: Bearer sk_live_your_key_here`


    ## Getting an API key


    API keys are provisioned by our team. They are not self-service, so there is
    no signup page to apply on. To request access, email **sales@myustadia.com**
    and we will issue a key for your account.
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/courses/{course_id}/quiz/{module_index}/{position}:
    put:
      tags:
        - B2B Courses v2
      summary: Quiz Question Edit
      description: |-
        PUT /courses/{id}/quiz/{module_index}/{position}  (GAP3)

        Human edit of one quiz question. Flips its review status to pending
        (re-review required). No regeneration, no metering -- this is a direct
        write, not an AI call.

        module_index/position are int-typed on the route so FastAPI's routing
        never confuses this path with a sibling string-keyed quiz route.
      operationId: >-
        quiz_question_edit_api_v1_courses__course_id__quiz__module_index___position__put
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: string
            title: Course Id
        - name: module_index
          in: path
          required: true
          schema:
            type: integer
            title: Module Index
        - name: position
          in: path
          required: true
          schema:
            type: integer
            title: Position
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuizQuestionEditRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuizQuestionEditResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    QuizQuestionEditRequest:
      properties:
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
          description: New question text; omit to keep the current prompt
        options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Options
          description: >-
            New option labels (MCQ only); omit to keep current options. Sending
            options REQUIRES restating correct
        correct:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Correct
          description: >-
            New correct answer (str, or list for multi-select); omit to keep
            current. Must match the effective option set
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
          description: New answer explanation; omit to keep current
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: New question type (e.g. mcq_single); omit to keep current
      type: object
      title: QuizQuestionEditRequest
      description: >-
        Request body for PUT /api/v1/courses/{id}/quiz/{module_index}/{position}
        (GAP3).


        A human edit of one quiz question. Every field is optional: an omitted

        field keeps its current value (the route merges over the existing row --

        a partial payload must never blank out the rest of the question).
    QuizQuestionEditResponse:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Question identity: m{module_index}_p{position}, matching the
            review-queue's quiz_question artifact identity
        module_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Module Index
          description: Module the question belongs to (0 = final exam)
        position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position
          description: >-
            Tier-offset position within the module (associate 0+, professional
            1000+, expert 2000+)
        tier:
          anyOf:
            - type: string
            - type: 'null'
          title: Tier
          description: 'Quiz tier: associate | professional | expert'
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: Question type (e.g. mcq_single, mcq_multi, true_false)
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
          description: Question text after the edit
        options:
          items:
            $ref: '#/components/schemas/QuizQuestionEditOption'
          type: array
          title: Options
          description: Option set after the edit (empty for non-MCQ types)
        correct_value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Correct Value
          description: Correct answer after the edit (str, or list for multi-select)
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
          description: Answer explanation after the edit
      type: object
      title: QuizQuestionEditResponse
      description: >-
        Response for PUT /api/v1/courses/{id}/quiz/{module_index}/{position}:

        the edited question re-read through the same reader as GET /quiz/review

        (contract parity). Deliberately NOT named QuizReviewQuestion: the
        review-

        read models land in a parallel branch and a same-name model here would

        merge-collide.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    QuizQuestionEditOption:
      properties:
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
          description: Option value the learner submits
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
          description: Option label shown to the learner
      type: object
      title: QuizQuestionEditOption
      description: |-
        One option in the quiz-question edit response (same {value,label} shape
        as GET /quiz/review's question options).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````