Complete Learning Unit
complete_unitMark a learning unit as completed after the user achieves a passing score (≥50%). Awards XP, unlocks the next unit, and checks for course completion. Called automatically by learning widgets (quiz, flashcards, etc.) when the user finishes. FREE call - no coin cost.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| score | Yes | The user's score (0-100). Must be ≥50 to complete the unit. | |
| unit_id | Yes | The unit ID being completed (required) | |
| course_id | Yes | The course ID containing this unit (required) | |
| learning_type | No | Type of learning activity completed (mcq, flashcard, fill_blank, match_pair, ranking, crossword, podcast, infographic) |