Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

The node interacts with the Lectful API to manage quiz questions among many other resources. Specifically, for the Quiz Question - Update operation, it updates an existing quiz question by sending a PUT request to the Lectful API with new content, type, optional settings, and feedback.

This node is beneficial in scenarios where you want to programmatically update quiz questions within an online course or learning platform powered by Lectful. For example, you might automate updating quiz questions based on external data sources or user input without manually editing them in the Lectful admin interface.

Practical example:

  • Automatically update quiz questions' content and type after importing new question data from another system.
  • Modify question feedback dynamically based on learner performance analytics.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful API: "Use Stored Credentials" or "Manual Configuration".
Credentials Note Notice shown when using Manual Configuration mode explaining credential overrides.
Base URL Override Optional base URL to override stored credentials (without /api/v1), used only in Manual mode.
API Key Override Optional API key to override stored credentials, used only in Manual mode.
Question ID The ID of the quiz question to update (required).
Content (Quill Delta JSON) The updated question content in Quill Delta JSON format (required).
Type The type of question; options are "Multiple Choice", "Fill Blank", or "Matching" (default: Multiple Choice).
Settings (JSON) Additional settings for fill_blank and matching question types, provided as JSON string.
Feedback (Quill Delta JSON) Feedback content for the question in Quill Delta JSON format (optional).

Output

The node outputs the JSON response returned by the Lectful API after updating the quiz question. This typically includes the updated quiz question object with its properties such as ID, content, type, settings, feedback, timestamps, and any other metadata the API provides.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "id": "string",
  "quiz_id": "string",
  "content": "Quill Delta JSON string",
  "type": "multiple_choice | fill_blank | matching",
  "settings": { /* parsed JSON object if applicable */ },
  "feedback": "Quill Delta JSON string",
  "created_at": "timestamp",
  "updated_at": "timestamp"
}

Dependencies

  • Requires access to the Lectful API.
  • Needs either stored credentials configured in n8n or manual configuration with Base URL and API key.
  • The API key must have permissions to update quiz questions.
  • No additional external dependencies beyond standard HTTP requests.

Troubleshooting

  • Missing or invalid credentials: If neither stored credentials nor manual overrides are properly set, the node will throw errors indicating missing Base URL or API key.
  • Invalid JSON in Settings: The Settings (JSON) property is parsed before sending. Invalid JSON syntax will cause the node to fail. Ensure valid JSON formatting.
  • Incorrect Question ID: Providing a non-existent or incorrect question ID will result in API errors (e.g., 404 Not Found).
  • API permission errors: Insufficient permissions for the API key may cause authorization errors.
  • Malformed Quill Delta JSON: Incorrectly formatted Quill Delta JSON for content or feedback may cause the API to reject the update.

To resolve these issues:

  • Verify credentials and API key validity.
  • Validate JSON strings before input.
  • Confirm the question ID exists in Lectful.
  • Check API key permissions.
  • Use proper Quill Delta JSON format for rich text fields.

Links and References


This summary focuses solely on the Quiz Question resource and the Update operation as requested.

Discussion