[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
Open
[oer-schema] Migrate embedded vocab to v1.2.0 + wire pedagogical elements to emit OER Schema#816btopro wants to merge 13 commits into
btopro wants to merge 13 commits into
Conversation
…/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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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-schemaauthoring 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(), eachRubricCriterionis emitted as a standalone typed node, but it’s not connected to the parentRubricviaoer:hasCriterion. Addproperty="oer:hasCriterion"so the rubric actually references its criteria.
<span typeof="oer:RubricCriterion">
elements/citation-element/citation-element.js:79
- The
oer:nameproperty on the citation link is currently scoped to the citation-element’s subject (noabout), but other citation metadata is scoped torelatedResource. Addabout="${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}" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SchemaBehaviorsRDFa idiom (typeof/property+oer:prefix).Phase 1 — Vocabulary foundation (
elements/oer-schema/)lib/oerschema.js: bump0.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(onTask),rubric(onAssessment/Activity). Renameprerequisite → coursePrerequisites; dropduration; fixname.domain(resource → Resource),hasComponent.label(forComponent → hasComponent),LearningObjective.commenttypo (commnet). Widen thetypeofdropdown filter to includeTableOfContents/TableOfContentsEntry/Rubric family/AssociatedMaterial family.oer-schema.js: expandoerPropertyauthoring 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/propertyRDFa + HAX authoring fields)QuestionElement+ 6 subclasshaxProperties.json): keepoer:Assessment; addgradingFormat/hasLearningObjective/forCourseemission + authoring fields. Existingoer:answer/oer:correctFeedback/oer:incorrectFeedbackleft intact (non-vocab; deferred tooerschema-schema-author).citation-elementoer:Text → oer:ReferencedMaterial(fixes DataType mis-classification) +name/uri;license-elementoer:SupportingMaterial;bibliography-builder/bibliography-itemoer:LearningComponent/oer:ReferencedMaterial.video-player/a11y-media-playeroer:MediaObject+name/uri;audio-playerinherits via VideoPlayer;media-playlistoer:LearningComponent+hasComponent/forCourse.outline-designer/page-contents-menuoer:TableOfContents+ per-entryoer:TableOfContentsEntry/entry/title/forComponent;outline-player/map-menuwrapperoer:TableOfContents(per-entry rendered by child sub-components, not in scope).editable-tableopt-inrubric-mode → oer:Rubric+RubricCriterion/RubricScale/RubricLevel(ordinal/points/weight);star-ratingopt-inrubric-scale-mode → oer:RubricScale+RubricLevel;grade-bookper-rowoer:Assessment+gradingFormat/forCourse;self-checkoer:Assessment+hasLearningObjective/assessing.flash-cardoer:Practice+typeOfAction/hasLearningObjective;stop-noteoer:LearningComponent+mainContent;merit-badgeoer:LearningObjective+skill;un-sdgoer:Topic+name/image;lrn-vocab/vocab-termoer:LearningComponent+name/description;ai-usage-licenseoer:SupportingMaterial+uri;course-designoer:Course+courseIdentifier/primaryInstructor/termOffered/syllabus/deliveryFormat;course-modeloer:MediaObject(NOT Course — it is a 3D model viewer) +name/image;lrndesign-timeline/career-timelineoer:LearningComponent+ per-eventname/description;person-testimonialoer:SupportingMaterial+name/description/image.Validation
node --checkpasses on all 30 changed.jsfiles;JSON.parsepasses on all 12 changed.jsonfiles.typeofdropdown widened,prerequisite/durationremoved, typos fixed.subClassOfdomain inheritance.?.) introduced;globalThisused; nobuild//dist//node_modulesedits; no ubiquity/top-of-monorepo build run (none of these are HAXCMSLitElement themes;custom-elements.jsonregen left to the ubiquity flow).Notes for review
outline-player/map-menuonly get the wrappertypeof(per-entry markup is rendered by their child sub-componentssite-menu/map-menu-builder, which were out of scope).audio-playerneeds no edit — it extendsVideoPlayerwithout overridingrender()/firstUpdated(), so it inherits theMediaObjectemission.oer:answer/oer:correctFeedback/oer:incorrectFeedbackemissions in the question family are intentionally left in place to avoid breaking already-authored content; adding those to the vocabulary is a separateoerschema-schema-authorfollow-up.custom-elements.jsonwill regenerate via the ubiquity build (not run here).Co-Authored-By: Oz oz-agent@warp.dev