Skip to content

Course globals are declared where the framework does not read them #57

Open

Description

@taylortom

Subject of the issue

schema/course.schema.json declares the plugin's course globals at _globals._vimeo, but the plugin reads them from _globals._components._vimeo:

  • templates/vimeo.hbs renders {{_globals._components._vimeo.skipToTranscript}}
  • js/adapt-vimeo.js reads Adapt.course.get('_globals')?._components?._vimeo?.ariaLabel
  • core's component_description helper reads _globals._components._vimeo.ariaRegion

Most other components declare their globals under _globals._components._<targetAttribute>, which is also where the framework writes them in course.json.

Your environment

  • adapt-vimeo 3.5.1

Steps to reproduce

  1. In a framework course, customise _globals._components._vimeo.skipToTranscript (or ariaLabel / ariaRegion) in course.json.
  2. Import the course into the authoring tool.
  3. Inspect the course globals after import.

Expected behaviour

The customised labels are kept and rendered.

Actual behaviour

The nested _globals._components._vimeo values are not in the schema, so they are dropped on import and the labels fall back to their defaults without any warning. Labels edited in the authoring tool are stored at the flat _globals._vimeo path, which the plugin itself does not read.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions