Skip to content

[oer-schema] Migrate embedded vocab to v1.2.0 + wire pedagogical elements to emit OER Schema - #816

Open
btopro wants to merge 13 commits into
masterfrom
oer-schema-migration
Open

[oer-schema] Migrate embedded vocab to v1.2.0 + wire pedagogical elements to emit OER Schema#816
btopro wants to merge 13 commits into
masterfrom
oer-schema-migration

Conversation

@btopro

@btopro btopro commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Migrates the embedded OER Schema vocabulary from v0.3.4 → v1.2.0 and standardizes OER Schema metadata emission across the pedagogical web components, so each renders the correct OER class + relationship properties via the existing SchemaBehaviors RDFa idiom (typeof/property + oer: prefix).

Phase 1 — Vocabulary foundation (elements/oer-schema/)

  • lib/oerschema.js: bump 0.3.4 → 1.2.0. Add the Rubric family (Rubric/RubricCriterion/RubricScale/RubricLevel + hasCriterion/rubricScale/rubricType/criterionWeight/hasLevel/levelOrdinal/levelPoints/pointsRequired), AssociatedMaterial/SupplementalMaterial/ReferencedMaterial, aiUsageConstraint (on Task), rubric (on Assessment/Activity). Rename prerequisite → coursePrerequisites; drop duration; fix name.domain (resource → Resource), hasComponent.label (forComponent → hasComponent), LearningObjective.comment typo (commnet). Widen the typeof dropdown filter to include TableOfContents/TableOfContentsEntry/Rubric family/AssociatedMaterial family.
  • oer-schema.js: expand oerProperty authoring options with the pedagogical relationship properties (forCourse, hasLearningObjective, assessing, assessedBy, gradingFormat, rubric, material, doTask, typeOfAction, aiUsageConstraint, skill, hasComponent, forComponent, forTopic, associatedMedia, hasCriterion, rubricScale, mainContent).

Phase 2 — Pedagogical element wiring (6 groups, all emit typeof/property RDFa + HAX authoring fields)

  • Question family (QuestionElement + 6 subclass haxProperties.json): keep oer:Assessment; add gradingFormat/hasLearningObjective/forCourse emission + authoring fields. Existing oer:answer/oer:correctFeedback/oer:incorrectFeedback left intact (non-vocab; deferred to oerschema-schema-author).
  • Material/citations: citation-element oer:Text → oer:ReferencedMaterial (fixes DataType mis-classification) + name/uri; license-element oer:SupportingMaterial; bibliography-builder/bibliography-item oer:LearningComponent/oer:ReferencedMaterial.
  • Media: video-player/a11y-media-player oer:MediaObject + name/uri; audio-player inherits via VideoPlayer; media-playlist oer:LearningComponent + hasComponent/forCourse.
  • Navigation/ToC: outline-designer/page-contents-menu oer:TableOfContents + per-entry oer:TableOfContentsEntry/entry/title/forComponent; outline-player/map-menu wrapper oer:TableOfContents (per-entry rendered by child sub-components, not in scope).
  • Rubric/assessment: editable-table opt-in rubric-mode → oer:Rubric + RubricCriterion/RubricScale/RubricLevel (ordinal/points/weight); star-rating opt-in rubric-scale-mode → oer:RubricScale + RubricLevel; grade-book per-row oer:Assessment + gradingFormat/forCourse; self-check oer:Assessment + hasLearningObjective/assessing.
  • Pedagogical misc: flash-card oer:Practice + typeOfAction/hasLearningObjective; stop-note oer:LearningComponent + mainContent; merit-badge oer:LearningObjective + skill; un-sdg oer:Topic + name/image; lrn-vocab/vocab-term oer:LearningComponent + name/description; ai-usage-license oer:SupportingMaterial + uri; course-design oer:Course + courseIdentifier/primaryInstructor/termOffered/syllabus/deliveryFormat; course-model oer:MediaObject (NOT Course — it is a 3D model viewer) + name/image; lrndesign-timeline/career-timeline oer:LearningComponent + per-event name/description; person-testimonial oer:SupportingMaterial + name/description/image.

Validation

  • node --check passes on all 30 changed .js files; JSON.parse passes on all 12 changed .json files.
  • v1.2.0 vocab runtime-verified: new classes/properties present, typeof dropdown widened, prerequisite/duration removed, typos fixed.
  • Every emitted class/property verified against the v1.2.0 vocabulary with subClassOf domain inheritance.
  • No optional chaining (?.) introduced; globalThis used; no build//dist//node_modules edits; no ubiquity/top-of-monorepo build run (none of these are HAXCMSLitElement themes; custom-elements.json regen left to the ubiquity flow).

Notes for review

  • outline-player/map-menu only get the wrapper typeof (per-entry markup is rendered by their child sub-components site-menu/map-menu-builder, which were out of scope).
  • audio-player needs no edit — it extends VideoPlayer without overriding render()/firstUpdated(), so it inherits the MediaObject emission.
  • The non-vocab oer:answer/oer:correctFeedback/oer:incorrectFeedback emissions in the question family are intentionally left in place to avoid breaking already-authored content; adding those to the vocabulary is a separate oerschema-schema-author follow-up.
  • custom-elements.json will regenerate via the ubiquity build (not run here).

Co-Authored-By: Oz oz-agent@warp.dev

btopro and others added 13 commits August 3, 2026 14:11
…/assessment family

Add gradingFormat, hasLearningObjective, and forCourse as Lit String properties on the shared QuestionElement base class and emit them as conditional <meta property="oer:..."> tags in render() only when set. All three are valid on oer:Assessment via subClassOf chains in the v1.2.0 vocabulary: gradingFormat domain [Activity, Assessment]; hasLearningObjective domain [InstructionalPattern] (Assessment subClassOf InstructionalPattern); forCourse domain [Resource] (Assessment subClassOf Resource via LearningComponent).

Add matching gradingFormat/hasLearningObjective/forCourse textfield inputs to settings.configure in all 6 subclass haxProperties.json files (multiple-choice, matching-question, sorting-question, tagging-question, mark-the-words, fill-in-the-blanks) so authors can set these relationships in the HAX editor.

Existing oer:assessing, oer:name, oer:answer, oer:correctFeedback, and oer:incorrectFeedback emissions are left intact.

Co-Authored-By: Oz <oz-agent@warp.dev>
Phase 2 OER Schema migration: add SchemaBehaviors mixin and emit
RDFa typeof/property attributes for the Rubric family and Assessment
class across four pedagogical elements.

editable-table: opt-in rubricMode emits typeof=oer:Rubric on the host
(via setAttribute), oer:rubricType as a meta tag, a RubricScale with
hasLevel children for each header column, a RubricCriterion for each
body row with criterionWeight, and a RubricLevel (levelOrdinal +
levelPoints) for each criterion/level cell. haxProperties.json gains
a rubricMode boolean toggle and a rubricType select.

star-rating: opt-in rubricScaleMode emits typeof=oer:RubricScale on
the wrapper div and typeof=oer:RubricLevel + property=oer:hasLevel
on each star icon, with levelOrdinal and levelPoints meta children.
Adds a static haxProperties() method with a rubricScaleMode toggle.

grade-book: SchemaBehaviors added to the class chain; emits
typeof=oer:Assessment per database assignment with gradingFormat
(points) and forCourse (when set) via a hidden RDFa block. Adds a
forCourse property and a static haxProperties() method with a
forCourse textfield.

self-check: typeof=oer:Assessment set on the host in firstUpdated
(matching the QuestionElement idiom); hasLearningObjective and
assessing properties emitted as meta tags in render() when linked.
haxProperties.json gains hasLearningObjective and assessing textfields.

Co-Authored-By: Oz <oz-agent@warp.dev>
…t OER metadata

Phase 2 OER wiring for material-citations element group.

citation-element: fix mis-classification of typeof oer:Text (a DataType,
wrong for a citation) -> oer:ReferencedMaterial. The typeof is now driven
by a new overridable typeof property (default oer:ReferencedMaterial) with
a textfield in settings.configure so authors can pick a more specific OER
class. Emits property=oer:name on the cited work title <a> (with content
override for RDFa literal correctness despite href) and property=oer:uri
via a meta carrying the source URL. Existing about=${this.relatedResource}
RDFa link is preserved.

license-element: emit typeof=oer:SupportingMaterial on the .license-body
wrapper and property=oer:name / property=oer:uri metas for the title and
source. SupportingMaterial subClassOf AssociatedMaterial subClassOf
LearningComponent subClassOf Resource, so name/uri are valid.

bibliography-builder: add SchemaBehaviors to the class chain and emit
typeof=oer:LearningComponent on the list wrapper. Adds a forCourse property
(emitted via property=oer:forCourse meta, valid on LearningComponent via
Resource) with a forCourse textfield in the external haxProperties.json so
authors can associate the bibliography with a Course.

bibliography-item (the slotted per-entry element): add SchemaBehaviors to
the class chain and emit typeof=oer:ReferencedMaterial on each entry
wrapper, property=oer:uri via a meta carrying the entry URL, and
property=oer:name on the title element in exportAPA for all three citation
types (journal uses a span to avoid italicizing the title; book/web reuse
the existing <i>). ReferencedMaterial subClassOf AssociatedMaterial, so
name/uri are valid.

All emitted classes/properties verified against the v1.2.0 vocabulary in
elements/oer-schema/lib/oerschema.js. No optional chaining, no window
references, no build/ubiquity commands run. node --check passes on every
edited .js; no lint script or node_modules present in the worktree so lint
was skipped per instructions.

Co-Authored-By: Oz <oz-agent@warp.dev>
Phase 2 OER Schema v1.2.0 migration for media playback elements.

- video-player: emit typeof="oer:MediaObject" on host via firstUpdated
  setAttribute + oer:name (mediaTitle) and oer:uri (source) meta tags at
  top of render(). SchemaBehaviors already applied in class chain.
- audio-player: extends VideoPlayer and does not override render() or
  firstUpdated(), so inherited MediaObject typeof/name/uri emission
  applies; no edit required.
- a11y-media-player: add SchemaBehaviors import and wrap class chain
  SchemaBehaviors(I18NMixin(FullscreenBehaviors(DDD))); emit
  typeof="oer:MediaObject" + oer:name + oer:uri.
- media-playlist: add SchemaBehaviors import and wrap class chain; emit
  typeof="oer:LearningComponent" on host, oer:hasComponent meta per
  media item, and oer:forCourse meta; add forCourse reactive property
  + constructor init + forCourse textfield in
  lib/media-playlist.haxProperties.json settings.configure.

Co-Authored-By: Oz <oz-agent@warp.dev>
Apply the SchemaBehaviors mixin and emit OER Schema v1.2.0 metadata on the
outline/navigation elements so each renders the correct OER class and
relationship properties.

- outline-designer: typeof=oer:TableOfContents on <ul#list>; per entry
  typeof=oer:TableOfContentsEntry + property=oer:entry on the <li>,
  property=oer:title on the label span, and a <meta property=oer:forComponent>
  referencing the item id.
- page-contents-menu: typeof=oer:TableOfContents on <section.wrapper>; per
  entry in both renderItem branches typeof=oer:TableOfContentsEntry +
  property=oer:entry on <li>, property=oer:title on the <a>, and a <meta
  property=oer:forComponent>.
- outline-player: typeof=oer:TableOfContents on the <nav> wrapper. Entries
  are rendered by the child <site-menu> component, so per-entry wiring is
  not applied here.
- map-menu: typeof=oer:TableOfContents on <div#itemslist>. Entries are
  rendered by the child <map-menu-builder> component, so per-entry wiring
  is not applied here.

Each element declares schemaMap so SchemaBehaviors' updated hook sets the
oer:/schema:/dc: prefix and a resource id on the host element.

No haxProperties authoring fields were added: none of these four elements
define a haxProperties() method (they are theme/editor/navigation
infrastructure, not HAX-authorable content elements), so there was no
authoring surface to extend.

Co-Authored-By: Oz <oz-agent@warp.dev>
…etadata

Add SchemaBehaviors mixin and emit typeof/property RDFa attributes for:
- flash-card: oer:Practice + typeOfAction + hasLearningObjective
- stop-note: oer:LearningComponent + mainContent
- merit-badge: oer:LearningObjective + skill
- un-sdg: oer:Topic + name + image
- lrn-vocab: oer:LearningComponent + name + description
- vocab-term: oer:LearningComponent + name + description
- ai-usage-license: oer:SupportingMaterial + uri
- course-design: oer:Course + courseIdentifier/primaryInstructor/termOffered/syllabus/deliveryFormat
- course-model: oer:MediaObject + name + image
- lrndesign-timeline: oer:LearningComponent + name + description per event
- career-timeline: oer:LearningComponent + name
- person-testimonial: oer:SupportingMaterial + name + description + image

Also adds authoring textfields to haxProperties for schema-relationship
fields (typeOfAction, hasLearningObjective, skill, description, uri,
courseIdentifier, termOffered, deliveryFormat, title).
Fixes missing super.updated() calls in vocab-term, ai-usage-license,
and course-design so SchemaBehaviors prefix/resource setup runs.

Co-Authored-By: Oz <oz-agent@warp.dev>
…rface

- oer-schema/lib/oerschema.js: bump version 0.3.4 -> 1.2.0; add Rubric family
  (Rubric/RubricCriterion/RubricScale/RubricLevel + hasCriterion/rubricScale/
  rubricType/criterionWeight/hasLevel/levelOrdinal/levelPoints/pointsRequired),
  AssociatedMaterial/SupplementalMaterial/ReferencedMaterial, aiUsageConstraint
  on Task, rubric on Assessment/Activity; rename prerequisite -> coursePrerequisites;
  drop duration; fix name.domain (resource -> Resource), hasComponent.label
  (forComponent -> hasComponent), LearningObjective.comment typo (commnet);
  widen the typeof dropdown filter to include TableOfContents/TableOfContentsEntry/
  Rubric family/AssociatedMaterial family.
- oer-schema/oer-schema.js: expand oerProperty authoring options with the
  pedagogical relationship properties (forCourse, hasLearningObjective, assessing,
  assessedBy, gradingFormat, rubric, material, doTask, typeOfAction,
  aiUsageConstraint, skill, hasComponent, forComponent, forTopic, associatedMedia,
  hasCriterion, rubricScale, mainContent).

Co-Authored-By: Oz <oz-agent@warp.dev>
Copilot AI review requested due to automatic review settings August 3, 2026 18:26
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webcomponents Ready Ready Preview Aug 3, 2026 6:26pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the embedded OER Schema vocabulary to v1.2.0 and standardizes RDFa emission (typeof + property with the oer: prefix) across a broad set of pedagogical web components using the existing SchemaBehaviors pattern.

Changes:

  • Bumps the embedded OER Schema vocab to v1.2.0, adding the Rubric and AssociatedMaterial families and updating/renaming/removing legacy vocab terms.
  • Expands oer-schema authoring options for additional OER relationship properties used by pedagogical components.
  • Wires multiple components (questions, media, navigation/ToC, rubric-related, and misc pedagogical elements) to emit OER RDFa metadata + expose corresponding HAX authoring fields.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
elements/vocab-term/vocab-term.js Adds SchemaBehaviors + emits oer:name/oer:description and typeof wrapper.
elements/video-player/video-player.js Emits MediaObject RDFa (oer:name, oer:uri, typeof).
elements/un-sdg/un-sdg.js Adds SchemaBehaviors + emits Topic RDFa (oer:name, oer:image, typeof).
elements/tagging-question/lib/tagging-question.haxProperties.json Adds OER authoring fields (gradingFormat, hasLearningObjective, forCourse).
elements/stop-note/stop-note.js Adds SchemaBehaviors + emits LearningComponent RDFa (oer:mainContent, typeof).
elements/star-rating/star-rating.js Adds SchemaBehaviors + optional RubricScale/RubricLevel RDFa emission + HAX config.
elements/sorting-question/lib/sorting-question.haxProperties.json Adds OER authoring fields (gradingFormat, hasLearningObjective, forCourse).
elements/self-check/self-check.js Emits Assessment RDFa + new OER fields (hasLearningObjective, assessing, typeof).
elements/self-check/lib/self-check.haxProperties.json Adds HAX fields for hasLearningObjective and assessing.
elements/person-testimonial/person-testimonial.js Adds SchemaBehaviors + emits SupportingMaterial RDFa (oer:name, oer:description, oer:image, typeof).
elements/page-contents-menu/page-contents-menu.js Adds SchemaBehaviors + emits TableOfContents and entry RDFa (entry, title, forComponent).
elements/outline-player/outline-player.js Adds SchemaBehaviors + emits TableOfContents wrapper RDFa for navigation.
elements/outline-designer/outline-designer.js Adds SchemaBehaviors + emits TableOfContents/Entry RDFa for outline structure.
elements/oer-schema/oer-schema.js Expands oerProperty mapping options for additional pedagogical relationships.
elements/oer-schema/lib/oerschema.js Updates embedded vocabulary to v1.2.0 (Rubrics, materials, renamed/removed fields, dropdown type widening).
elements/multiple-choice/lib/QuestionElement.js Adds OER fields + emits gradingFormat/hasLearningObjective/forCourse in RDFa.
elements/multiple-choice/lib/multiple-choice.haxProperties.json Adds OER authoring fields (gradingFormat, hasLearningObjective, forCourse).
elements/merit-badge/merit-badge.js Adds SchemaBehaviors + emits LearningObjective RDFa with oer:skill + HAX config.
elements/media-playlist/media-playlist.js Adds SchemaBehaviors + emits LearningComponent RDFa (hasComponent, forCourse, typeof).
elements/media-playlist/lib/media-playlist.haxProperties.json Adds HAX field for forCourse.
elements/matching-question/lib/matching-question.haxProperties.json Adds OER authoring fields (gradingFormat, hasLearningObjective, forCourse).
elements/mark-the-words/lib/mark-the-words.haxProperties.json Adds OER authoring fields (gradingFormat, hasLearningObjective, forCourse).
elements/map-menu/map-menu.js Adds SchemaBehaviors + emits TableOfContents wrapper RDFa.
elements/lrndesign-timeline/lrndesign-timeline.js Adds SchemaBehaviors + emits LearningComponent RDFa for timeline events (oer:name, oer:description, typeof).
elements/lrn-vocab/lrn-vocab.js Emits LearningComponent RDFa (oer:name, oer:description, typeof) + adds description field.
elements/license-element/license-element.js Emits SupportingMaterial RDFa with oer:name/oer:uri and typeof.
elements/grade-book/grade-book.js Adds SchemaBehaviors + emits per-assignment Assessment RDFa and HAX config for forCourse.
elements/flash-card/lib/flash-card.haxProperties.json Adds OER authoring fields (typeOfAction, hasLearningObjective).
elements/flash-card/flash-card.js Adds SchemaBehaviors + emits Practice RDFa (typeOfAction, hasLearningObjective, typeof).
elements/fill-in-the-blanks/lib/fill-in-the-blanks.haxProperties.json Adds OER authoring fields (gradingFormat, hasLearningObjective, forCourse).
elements/editable-table/lib/editable-table.haxProperties.json Adds HAX fields for rubric emission (rubricMode, rubricType).
elements/editable-table/editable-table.js Adds SchemaBehaviors + optional Rubric RDFa emission for rubric mode.
elements/course-model/course-model.js Adds SchemaBehaviors + emits MediaObject RDFa (oer:name, oer:image, typeof).
elements/course-design/course-design.js Adds SchemaBehaviors + emits Course RDFa (courseIdentifier, primaryInstructor, etc.) + HAX config.
elements/citation-element/citation-element.js Changes default cited-work type to ReferencedMaterial + emits oer:uri/oer:name metadata.
elements/career-timeline/lib/career-timeline.haxProperties.json Adds HAX field for title as oer:name.
elements/career-timeline/career-timeline.js Adds SchemaBehaviors + emits LearningComponent RDFa (oer:name, typeof).
elements/bibliography-builder/lib/bibliography-item.js Adds SchemaBehaviors + emits ReferencedMaterial RDFa (oer:uri, oer:name).
elements/bibliography-builder/lib/bibliography-builder.haxProperties.json Adds HAX field for forCourse.
elements/bibliography-builder/bibliography-builder.js Adds SchemaBehaviors + emits LearningComponent RDFa (forCourse, typeof).
elements/ai-usage-license/ai-usage-license.js Adds SchemaBehaviors + emits SupportingMaterial RDFa (oer:uri, typeof) + HAX field for uri.
elements/a11y-media-player/a11y-media-player.js Adds SchemaBehaviors + emits MediaObject RDFa (oer:name, oer:uri, typeof).
Suppressed comments (2)

elements/editable-table/editable-table.js:194

  • In renderRubricSchema(), each RubricCriterion is emitted as a standalone typed node, but it’s not connected to the parent Rubric via oer:hasCriterion. Add property="oer:hasCriterion" so the rubric actually references its criteria.
            <span typeof="oer:RubricCriterion">

elements/citation-element/citation-element.js:79

  • The oer:name property on the citation link is currently scoped to the citation-element’s subject (no about), but other citation metadata is scoped to relatedResource. Add about="${this.relatedResource}" so the name is applied to the cited work resource consistently.
          class="license-link"
          href="${this.source}"
          property="oer:name"
          content="${this.title}"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

: nothing}
${headerRow.length
? html`
<span typeof="oer:RubricScale">
${this.database.assignments.map(
(a) => html`
<span typeof="oer:Assessment">
<meta property="oer:gradingFormat" content="${a.points || ""}" />
typeof="${this.typeof}"
content="${this.title}"
/>
<meta property="oer:uri" content="${this.source}" />
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.

2 participants