API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · learning_units

Learning Unit Schema

ID du schéma
learning_unit
Collection
learning_units
Autorisations
  • Lirelearning_unit_view
  • Créerlearning_unit_create
  • Modifierlearning_unit_edit
  • Supprimerlearning_unit_delete
Relations

Champs

Learning Unit Schema

learning_units4 autorisations

Schema for individual learning units within a course section

lessonIdstringobligatoire

ID of the parent lesson/section (Lektion)

min. 1 caractères
courseIdstringobligatoire

ID of the parent course (denormalized)

min. 1 caractères
titlestringobligatoire

Learning unit title

1–200 caractères
typestringobligatoire

Type of learning unit content

videotextquizexamfile_uploadltih5pslideslive
ordernumberobligatoire

Position within the parent section

≥ 0
isPreviewbooleanfacultatif

Whether unit can be accessed without enrollment

nullable
isPublishedbooleanfacultatif

Whether the unit is visible to students

nullable
contentstringfacultatif

TipTap JSON content for text units

nullable
videoUrlstringfacultatif

URL of the video

nullable
videoProviderstringfacultatif

Video hosting provider

uploadyoutubevimeoexternalbunny
nullable
videoDurationSecsnumberfacultatif

Total video duration in seconds

≥ 0nullable
bunnyVideoIdstringfacultatif

BunnyCDN Stream video GUID (source of truth for provider "bunny"; playback URL is signed per-request)

nullable
bunnyStatusstringfacultatif

BunnyCDN Stream processing status for UI feedback

uploadingprocessingreadyerror
nullable
questionPoolIdstringfacultatif

ID of the question pool to draw from

nullable
questionCountnumberfacultatif

Number of questions to draw randomly from pool

≥ 1nullable
timeLimitSecsnumberfacultatif

Time limit in seconds (0 = no limit)

≥ 0nullable
passingScorenumberfacultatif

Minimum score percentage to pass (0-100)

0 – 100nullable
maxAttemptsnumberfacultatif

Maximum number of attempts (null = unlimited)

≥ 1nullable
shuffleQuestionsbooleanfacultatif

Whether to shuffle question order

nullable
shuffleOptionsbooleanfacultatif

Whether to shuffle answer options

nullable
showCorrectAfterbooleanfacultatif

Whether to show correct answers after submission

nullable
isGradedbooleanfacultatif

Whether this unit counts toward gradebook/certificate (default: true for exam, false for quiz)

nullable
allowBackNavigationbooleanfacultatif

Whether students can navigate back to previous questions (default: true for quiz, false for exam)

nullable
isRequiredForCompletionbooleanfacultatif

Whether this unit must be completed for course completion (default: true for exam, false for quiz)

nullable
embeddedQuestionsobject[]facultatif

Inline quiz questions (alternative to question pool)

nullable
_idstringobligatoire
min. 1 caractèreslecture seule
questionstringobligatoire
min. 1 caractères
typestringobligatoire
multiple_choicemultiple_responsetrue_falsefill_blankdropdown_blankmatchingorderingshort_text
optionsobject[]facultatif
nullable
idstringobligatoire
min. 1 caractères
labelstringobligatoire
min. 1 caractères
isCorrectbooleanfacultatif
nullable
correctAnsweroneOfobligatoire
pointsnumberobligatoire
≥ 0
explanationstringfacultatif
nullable
mediaUrlstringfacultatif
nullable
matchingPairsobject[]facultatif
nullable
leftstringobligatoire
rightstringobligatoire
orderItemsstring[]facultatif
nullable
dropdownBlanksobject[]facultatif
nullable
blankstringobligatoire
optionsstring[]obligatoire
correctstringobligatoire
difficultystringfacultatif
easymediumhard
nullable
gradingRubricstringfacultatif
nullable
aiPromptstringfacultatif
nullable
tagsstring[]facultatif
nullable
gradingMethodstringfacultatif

How to calculate final grade from multiple attempts (default: highest)

highestaveragefirstlast
nullable
availableFromdatetimefacultatif

Quiz opens at this time (ISO 8601)

nullable
availableUntildatetimefacultatif

Quiz closes at this time (ISO 8601)

nullable
lateSubmissionPolicystringfacultatif

What happens if submitted after availableUntil (default: none)

noneallow_with_penalty
nullable
lateSubmissionPenaltynumberfacultatif

Percentage deducted for late submission (e.g., 20 = -20%)

0 – 100nullable
reviewOptionsobjectfacultatif

Granular review options per time window. Overrides showCorrectAfter when set.

nullable
immediatelyAfterobjectfacultatif
nullable
showScorebooleanfacultatif
nullable
showCorrectAnswersbooleanfacultatif
nullable
showFeedbackbooleanfacultatif
nullable
showPointsbooleanfacultatif
nullable
afterCloseobjectfacultatif
nullable
showScorebooleanfacultatif
nullable
showCorrectAnswersbooleanfacultatif
nullable
showFeedbackbooleanfacultatif
nullable
showPointsbooleanfacultatif
nullable
attemptCooldownMinsnumberfacultatif

Minimum minutes to wait between attempts

≥ 0nullable
attemptPenaltyPercentnumberfacultatif

Percentage deducted per subsequent attempt (e.g., 10 = attempt 2 loses 10%, attempt 3 loses 20%)

0 – 100nullable
uploadInstructionsstringfacultatif

Instructions for file upload assignment

nullable
allowedFileTypesstring[]facultatif

Allowed MIME types for uploads

nullable
maxFileSizeMbnumberfacultatif

Maximum file size in MB

≥ 0nullable
ltiToolIdstringfacultatif

ID of the registered LTI tool (lti_tools collection)

nullable
ltiCustomParamsobjectfacultatif

Custom parameters for this unit (merged with tool-level defaults)

nullable
ltiOpenInNewTabbooleanfacultatif

Open the tool in a new tab instead of an inline iframe

nullable
ltiPassingScorenumberfacultatif

Minimum AGS score (0–100) required to auto-complete this unit

0 – 100nullable
h5pFileIdstringfacultatif

ID of the uploaded .h5p file in files collection

nullable
h5pContentPathstringfacultatif

URL path to the extracted H5P content (set by worker after extraction)

nullable
h5pPassingScorenumberfacultatif

Minimum xAPI score (0–100) required to auto-complete this unit

0 – 100nullable
requirementsobjectfacultatif

Completion requirements for this unit

nullable
minScorenumberfacultatif
0 – 100nullable
videoMinPercentnumberfacultatif
0 – 100nullable
textMinTimeSecsnumberfacultatif
≥ 0nullable
textScrollPercentnumberfacultatif
0 – 100nullable
slidesViewedPercentnumberfacultatif
0 – 100nullable
fileUploadRequiredbooleanfacultatif
nullable
manualApprovalRequiredbooleanfacultatif
nullable
resourcesobject[]facultatif

Additional resources attached to this unit

nullable
namestringobligatoire
min. 1 caractères
typestringobligatoire
pdflinkdownload
urluriobligatoire
sizenumberfacultatif
≥ 0nullable
slidesobject[]facultatif

Ordered slides shown one at a time (type: slides)

nullable
idstringobligatoire
min. 1 caractères
kindstringfacultatif
htmlwidgetcheckpointpdf
nullable
titlestringfacultatif
nullable
htmlstringfacultatif
nullable
widgetIdstringfacultatif
nullable
fileUrlstringfacultatif
max. 200 caractèresMotifnullable
fileNamestringfacultatif
max. 255 caractèresnullable
pageintegerfacultatif
1 – 2000nullable
eyebrowstringfacultatif
nullable
questionobjectfacultatif
nullable
_idstringobligatoire
min. 1 caractèreslecture seule
questionstringobligatoire
min. 1 caractères
typestringobligatoire
multiple_choicemultiple_responsetrue_falsefill_blankdropdown_blankmatchingorderingshort_text
optionsobject[]facultatif
nullable
idstringobligatoire
min. 1 caractères
labelstringobligatoire
min. 1 caractères
isCorrectbooleanfacultatif
nullable
correctAnsweroneOfobligatoire
pointsnumberobligatoire
≥ 0
explanationstringfacultatif
nullable
mediaUrlstringfacultatif
nullable
matchingPairsobject[]facultatif
nullable
leftstringobligatoire
rightstringobligatoire
orderItemsstring[]facultatif
nullable
dropdownBlanksobject[]facultatif
nullable
blankstringobligatoire
optionsstring[]obligatoire
correctstringobligatoire
difficultystringfacultatif
easymediumhard
nullable
gradingRubricstringfacultatif
nullable
aiPromptstringfacultatif
nullable
tagsstring[]facultatif
nullable
notesstringfacultatif
nullable
liveobjectfacultatif

Live unit settings (type: live): format, mandatory, completion rule, self-selection, approval and the embedded runs (Durchführungen). Runs are written only by the /academy/live routes.

nullable
formatstringfacultatif
onsiteonlinehybridnull
nullable
mandatorybooleanfacultatif
nullable
completionRuleobjectfacultatif
nullable
modestringobligatoire
allmin
minCountintegerfacultatif
≥ 1nullable
selfSelectbooleanfacultatif
nullable
requiresApprovalbooleanfacultatif
nullable
runsobject[]facultatif
max. 200 élémentsnullable
idstringobligatoire
1–64 caractères
titlestringfacultatif
max. 200 caractèresnullable
instructorUserIdsstring[]facultatif
nullable
minParticipantsintegerfacultatif
≥ 0nullable
maxParticipantsintegerfacultatif
≥ 1nullable
registrationDeadlinedatetimefacultatif
nullable
plannedAppointmentCountintegerfacultatif
1 – 500nullable
statusstringfacultatif
plannedconfirmedcancelledcompletednull
nullable
aiReviewEnabledbooleanfacultatif

Whether AI review is enabled for file upload submissions

nullable
aiReviewPromptstringfacultatif

Custom AI prompt for reviewing file submissions

max. 5000 caractèresnullable
aiReviewRubricstringfacultatif

Grading rubric for AI review of file submissions

max. 10000 caractèresnullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/learning_units — Liste, paginée et filtrable
  • GET /api/v1/learning_units/<id> — Une entité
  • POST /api/v1/learning_units — Créer
  • PATCH /api/v1/learning_units/<id> — Mise à jour partielle
  • DELETE /api/v1/learning_units/<id> — Suppression logique
  • GET /api/v1/learning_units/<id>/timeline — Audit et activités

Recherche