diff --git a/projects/common/models/unit.ts b/projects/common/models/unit.ts index d3797c26991b0a83f9fb374a01835e4ef8f90999..537d2b82a4962a05e54c97d96197a2f02e2c1043 100644 --- a/projects/common/models/unit.ts +++ b/projects/common/models/unit.ts @@ -1,14 +1,13 @@ import { Page } from './page'; import { moveArrayItem } from '../util/array'; -const EXPORTED_MODULE_VERSION = 'iqb-aspect-module@0.1.1'; +export const EXPORTED_MODULE_VERSION = 'iqb-aspect-definition@1.0.0'; export class Unit { - veronaModuleVersion: string; + unitDefinitionType = EXPORTED_MODULE_VERSION; pages: Page[] = []; constructor(serializedUnit?: Unit) { - this.veronaModuleVersion = EXPORTED_MODULE_VERSION; if (serializedUnit && serializedUnit.pages.length > 0) { serializedUnit?.pages.forEach((page: Page) => { this.pages.push(new Page(page)); diff --git a/projects/editor/src/app/services/verona-api.service.ts b/projects/editor/src/app/services/verona-api.service.ts index eb112843d168becadf3d7892532402b3e6185d1e..221c53ea6795540e160de06f33c6db560ee6b606 100644 --- a/projects/editor/src/app/services/verona-api.service.ts +++ b/projects/editor/src/app/services/verona-api.service.ts @@ -1,5 +1,6 @@ import { Injectable } from '@angular/core'; import { fromEvent, Observable, Subject } from 'rxjs'; +import { EXPORTED_MODULE_VERSION } from '../../../../common/models/unit'; @Injectable({ providedIn: 'root' @@ -46,7 +47,7 @@ export class VeronaAPIService { type: 'voeReadyNotification', apiVersion: '1.1.0', notSupportedApiFeatures: '', - supportedUnitDefinitionTypes: 'iqb-aspect-module@0.1.0' + supportedUnitDefinitionTypes: EXPORTED_MODULE_VERSION }); } @@ -56,7 +57,7 @@ export class VeronaAPIService { sessionId: this.sessionID, timeStamp: String(Date.now()), unitDefinition: unitDefinition, - unitDefinitionType: 'iqb-aspect-module@0.1.0' + unitDefinitionType: EXPORTED_MODULE_VERSION }); } diff --git a/projects/editor/src/html_wrapper/index.html b/projects/editor/src/html_wrapper/index.html index f7a24fb1a1d14479f719f96d6d685c2294949390..6d989651d7898c5530f3a6a9643313b397f92a2a 100644 --- a/projects/editor/src/html_wrapper/index.html +++ b/projects/editor/src/html_wrapper/index.html @@ -8,7 +8,7 @@ data-version="version-placeholder" data-api-version="2.0.0" data-repository-url="https://github.com/iqb-berlin/verona-modules-apect" - data-supported-unit-definition-types="iqb-aspect-module@0.1.0"/> + data-supported-unit-definition-types="iqb-aspect-definition@1.0.0"/> <script type="application/ld+json"> { "@context": "https://w3id.org/iqb/verona-modules", diff --git a/projects/player/src/app/app.component.ts b/projects/player/src/app/app.component.ts index ccb97b70aa6427279c4cbdd62ce6a191918f8dc8..90c4c0d29d00bb404338ee79ca80dea5b59fa5b0 100644 --- a/projects/player/src/app/app.component.ts +++ b/projects/player/src/app/app.component.ts @@ -62,7 +62,7 @@ export class AppComponent implements OnInit { if (message.unitDefinition) { const unitDefinition: Unit = new Unit(JSON.parse(message.unitDefinition)); this.unitStateElementMapperService.registerDropListValueIds(unitDefinition); - if (this.metaDataService.verifyUnitDefinitionVersion(unitDefinition.veronaModuleVersion)) { + if (this.metaDataService.verifyUnitDefinitionVersion(unitDefinition.unitDefinitionType)) { this.playerConfig = message.playerConfig || {}; this.veronaPostService.sessionId = message.sessionId; this.veronaPostService.stateReportPolicy = message.playerConfig?.stateReportPolicy || 'none'; diff --git a/projects/player/src/html_wrapper/index.html b/projects/player/src/html_wrapper/index.html index 1dc570efd61b3f7d57985062295998fbf5acae20..d569724d8a09b2b2cb5480bb1751be07af313145 100644 --- a/projects/player/src/html_wrapper/index.html +++ b/projects/player/src/html_wrapper/index.html @@ -8,7 +8,7 @@ data-repository-url="https://github.com/iqb-berlin/verona-modules-apect" data-api-version="3.0.0" data-not-supported-api-features="" - data-supported-unit-definition-types="iqb-aspect-module@0.1.1" + data-supported-unit-definition-types="iqb-aspect-definition@1.0.0" data-supported-unit-state-data-types="iqb-standard@1.0" data-supported-browsers='{"Firefox": 69, "Chrome": 72, "Edge": 79}' />