Actions88
- Blog Actions
- Get All Posts (Admin)
- Get Post (Admin)
- Create Post (Admin)
- Update Post (Admin)
- Delete Post (Admin)
- Get Categories (Admin)
- Get Category (Admin)
- Create Category (Admin)
- Update Category (Admin)
- Delete Category (Admin)
- Get Tags (Admin)
- Get Tag (Admin)
- Create Tag (Admin)
- Update Tag (Admin)
- Delete Tag (Admin)
- Get Authors (Admin)
- Get All Posts (Public)
- Get Post (Public)
- Get Categories (Public)
- Get Tags (Public)
- Get Posts by Category (Public)
- Get Posts by Tag (Public)
- Section Actions
- AI Resource Actions
- Authentication Actions
- User Actions
- Course Actions
- Lecture Actions
- Enrollment Actions
- Learning Path Actions
- Assignment Actions
- Progress Actions
- Video Actions
- Article Actions
- Quiz Question Actions
- Quiz Choice Actions
- Quiz Submission Actions
- Image Actions
Overview
This node integrates with the Lectful API to manage quiz choices within a learning platform. Specifically, the "Quiz Choice" resource with the "Update" operation allows users to update an existing quiz choice's content and correctness status. This is useful in scenarios where quiz questions need refinement or correction after creation, such as fixing typos, updating answer options, or marking the correct choice.
Practical examples:
- Updating the text of a quiz choice to clarify wording.
- Changing which choice is marked as correct after reviewing quiz answers.
- Correcting formatting issues in the choice content stored in Quill Delta JSON format.
Properties
| Name | Meaning |
|---|---|
| Authentication Mode | Choose how to authenticate with the Lectful API: either using stored credentials or manual configuration by providing base URL and API key. |
| Credentials Note | Informational note shown when using Manual Configuration mode about credential usage. |
| Base URL Override | Optional manual override for the API base URL (excluding /api/v1). |
| API Key Override | Optional manual override for the API key used for authentication. |
| Choice ID | The unique identifier of the quiz choice to update. |
| Content (Quill Delta JSON) | The updated content of the quiz choice, formatted as Quill Delta JSON. |
| Is Correct | Boolean flag indicating whether this choice is the correct answer. |
Output
The node outputs an array of JSON objects representing the API response from the Lectful server after updating the quiz choice. The structure typically includes the updated quiz choice details as returned by the API, reflecting the new content and correctness status.
If the API returns binary data (not typical for this operation), it would be included accordingly, but this operation primarily deals with JSON data.
Example output snippet (conceptual):
{
"id": "choiceId123",
"content": { /* Quill Delta JSON object */ },
"is_correct": true,
"question_id": "questionId456",
// other metadata fields...
}
Dependencies
- Requires access to the Lectful API.
- Needs either stored credentials configured in n8n or manual input of the API base URL and API key.
- Proper network connectivity to the Lectful API endpoint.
Troubleshooting
- Missing or invalid credentials: If neither stored credentials nor manual overrides are provided correctly, the node will throw an error. Ensure that the API key and base URL are correctly set.
- Invalid Choice ID: Providing a non-existent or malformed choice ID will result in API errors. Verify the choice ID before running the node.
- Malformed Quill Delta JSON: The content must be valid Quill Delta JSON; otherwise, the API may reject the update. Validate the JSON format before submission.
- API Errors: Network issues or API downtime can cause failures. Check API availability and network settings.
- Permission Issues: The API key used must have permissions to update quiz choices; otherwise, authorization errors will occur.
Links and References
- Lectful API Documentation (general reference for API endpoints and data formats)
- Quill Delta Format - Explanation of the Quill Delta JSON format used for rich text content.