Skip to content

feat(course-management): apply wedge spec via manifest-first declaration (closes #22) - #30

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feature/wedge/course-management
May 11, 2026
Merged

feat(course-management): apply wedge spec via manifest-first declaration (closes #22)#30
rubenvdlinde merged 1 commit into
developmentfrom
feature/wedge/course-management

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

  • Adds three schemas to lib/Settings/scholiq_register.json: Course, Lesson, XapiStatement — fully declared via x-openregister-* extensions, zero PHP service classes.
  • Extends src/manifest.json with 4 new pages: CourseDetail (type: detail), LessonIndex (type: index), LessonDetail (type: detail), LessonPlayer (type: custom — branches on contentType at runtime).

Schemas added

Course (12 properties, 3 lifecycle states)

  • Properties: code, name, name_nl, description, level (enum: po/vo/mbo/hbo/wo/corporate), language, tags, mandatoryTraining, regulationSlug, renewalCourseSlug, certificateTemplate, lifecycle, tenant_id
  • x-openregister-lifecycle: draft → published (guarded by CoursePublishGuard), published → archived, archived → draft
  • x-openregister-calculations: lessonCount (count of child Lessons), isPublished (eq lifecycle=published)
  • x-openregister-aggregations: enrolledLearners (count_distinct from Enrolment), completedLearners (count_distinct, filtered lifecycle=completed)
  • x-openregister-notifications: publish → admin+hr, archive → admin

Lesson (11 properties, 3 lifecycle states)

  • Properties: courseId, name, order (min: 1), contentType (enum: text/video/scorm12/scorm2004/cmi5/lti/quiz), contentRef, durationMinutes, learningObjectives, mandatoryTraining, regulationSlug, lifecycle, tenant_id
  • x-openregister-relations: course many-to-one, joinOn courseId
  • x-openregister-lifecycle: draft → published, published → retired
  • x-openregister-notifications: publish → admin

XapiStatement (12 properties, appendOnly: true)

  • Properties: actor, verb, object, result, context, timestamp, stored, authority, version (const: 1.0.3), courseId, lessonId, tenant_id
  • appendOnly: true — every save emits xapi.statement.received audit entry via OR lifecycle engine
  • Empty transitions map — no state changes permitted (LRS substrate)

Manifest changes

4 pages added to src/manifest.json (was 6 pages, now 10):

  • CourseDetail — route /courses/:id, type: detail, register: scholiq, schema: Course
  • LessonIndex — route /courses/:courseId/lessons, type: index, register: scholiq, schema: Lesson
  • LessonDetail — route /courses/:courseId/lessons/:id, type: detail, register: scholiq, schema: Lesson
  • LessonPlayer — route /courses/:courseId/lessons/:lessonId/play, type: custom, component: LessonPlayer

No router edits, no Pinia stores, no custom List/Detail Vue files created.

ADR-031 PHP exceptions

None in this PR. The CoursePublishGuard lifecycle guard and the four spec-mandated controllers/services (LrsController, ScormController, LessonImportController, Cmi5ImporterService, ScormToXapiTranslator) are ADR-031 legitimate exceptions — they will be added in follow-up PRs per the tasks.md Phase 2 list.

Validation

  • python3 -c 'import json; json.load(open("lib/Settings/scholiq_register.json"))' — PASS
  • node tests/validate-manifest.js — PASS (10 pages, structural lint: 0 issues)

…ion (closes #22)

Adds Course, Lesson, and XapiStatement schemas to scholiq_register.json
with full x-openregister-lifecycle / calculations / aggregations /
relations / notifications declarations per ADR-022/024/031.

Extends src/manifest.json with CourseDetail (type: detail), LessonIndex
(type: index), LessonDetail (type: detail), and LessonPlayer (type:
custom) pages — all resolved by CnAppRoot built-in renderers.

No PHP service classes added; CoursePublishGuard (lifecycle guard) and
the four ADR-031 exception controllers/services are deferred to separate
PRs per the spec's Phase 2 task list.
@rubenvdlinde
rubenvdlinde merged commit ee3409c into development May 11, 2026
25 of 34 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/scholiq @ 529f4cd

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-05-11 21:49 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant