truck-medicalLesson scaffolding

Module Sequence Modification API

Endpoint

POST /modules/sequences/users/{userId}

Description

This endpoint allows for the modification of a user's module sequence by creating custom routing between modules. It can be used to implement both module insertion (scaffolding) and module skipping/bypassing functionality.

Request Parameters

Path Parameters

  • userId (required): The unique identifier of the user whose module sequence is being modified

Request Body

{
    "originModuleId": number,
    "destinationModuleId": number
}
  • originModuleId (required): The ID of the source module where the sequence starts

  • destinationModuleId (required): The ID of the target module where the sequence ends

Use Cases

Adding Additional Modules (Scaffolding)

To insert an additional module between two existing modules in the sequence:

  1. Create the new module that will be inserted

  2. Make two sequence calls to this endpoint:

    • First call: Connect the preceding module to the new module

    • Second call: Connect the new module to the subsequent module

Example:

Bypassing/Skipping Modules

To skip a module in the sequence:

  1. Create a sequence that bypasses the module to be skipped by connecting the modules before and after it directly

Example:

Notes

  • The sequence modifications are user-specific and do not affect the default course structure for other users

  • Multiple sequences can be created for a single user to build complex learning paths

  • These modifications override the default module progression path for the specific user

  • The sequence changes are additive - they don't remove existing sequences but provide alternative paths

Response

  • 200 OK: Sequence created successfully

  • 400 Bad Request: Invalid module IDs or sequence configuration

  • 404 Not Found: User or module not found

Example Implementation

Last updated