Skip to content
Snippets Groups Projects
Commit f95f2811 authored by jojohoch's avatar jojohoch
Browse files

Revert "[player] Change VopMetaData to verona version 4.0"

This reverts commit 93e62a4a.
Teststudio does not accept verona 4 specification data
parent 33069f82
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ export class AppComponent implements OnInit { ...@@ -41,7 +41,7 @@ export class AppComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.initSubscriptions(); this.initSubscriptions();
this.veronaPostService.sendVopReadyNotification({ metadata: this.metaDataService.playerMetadata }); this.veronaPostService.sendVopReadyNotification(this.metaDataService.playerMetadata);
this.translateService.addLangs(['de']); this.translateService.addLangs(['de']);
this.translateService.setDefaultLang('de'); this.translateService.setDefaultLang('de');
registerLocaleData(localeDe); registerLocaleData(localeDe);
...@@ -76,7 +76,7 @@ export class AppComponent implements OnInit { ...@@ -76,7 +76,7 @@ export class AppComponent implements OnInit {
data: { data: {
title: this.translateService.instant('dialogTitle.wrongUnitDefinitionType'), title: this.translateService.instant('dialogTitle.wrongUnitDefinitionType'),
content: this.translateService.instant('dialogContent.wrongUnitDefinitionType', content: this.translateService.instant('dialogContent.wrongUnitDefinitionType',
{ version: this.metaDataService.playerMetadata }) { version: this.metaDataService.playerMetadata.supportedUnitDefinitionTypes })
} }
}); });
} }
......
...@@ -95,7 +95,10 @@ export interface VopReadyNotification extends VopMetaData{ ...@@ -95,7 +95,10 @@ export interface VopReadyNotification extends VopMetaData{
} }
export interface VopMetaData { export interface VopMetaData {
metadata: string; apiVersion: string;
notSupportedApiFeatures?: string;
supportedUnitDefinitionTypes?: string;
supportedUnitStateDataTypes?: string;
} }
export interface VopStateChangedNotification { export interface VopStateChangedNotification {
......
...@@ -5,12 +5,12 @@ import { DOCUMENT } from '@angular/common'; ...@@ -5,12 +5,12 @@ import { DOCUMENT } from '@angular/common';
providedIn: 'root' providedIn: 'root'
}) })
export class MetaDataService { export class MetaDataService {
playerMetadata!: string; playerMetadata!: any;
constructor(@Inject(DOCUMENT) private document: Document) { constructor(@Inject(DOCUMENT) private document: Document) {
const playerMetadata: string | null | undefined = document.getElementById('meta_data')?.textContent; const playerMetadata: string | null | undefined = document.getElementById('meta_data')?.textContent;
if (playerMetadata) { if (playerMetadata) {
this.playerMetadata = JSON.stringify(playerMetadata); this.playerMetadata = JSON.parse(playerMetadata);
} }
} }
......
...@@ -34,7 +34,7 @@ export class VeronaPostService { ...@@ -34,7 +34,7 @@ export class VeronaPostService {
private send(message: VopMessage): void { private send(message: VopMessage): void {
// prevent posts in local (dev) mode // prevent posts in local (dev) mode
if (this.isStandalone()) { if (!this.isStandalone()) {
window.parent.postMessage(message, '*'); window.parent.postMessage(message, '*');
} else { } else {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
......
...@@ -15,47 +15,32 @@ ...@@ -15,47 +15,32 @@
<script type="application/ld+json" id="meta_data" > <script type="application/ld+json" id="meta_data" >
{ {
"$schema": "https://raw.githubusercontent.com/verona-interfaces/metadata/master/verona-module-metadata.json", "@context": "https://w3id.org/iqb/verona-modules",
"type": "player", "@type": "player",
"id": "iqb-player-aspect", "@id": "iqb-player-aspect",
"name": [ "name": {
{ "de": "IQB-Player (Aspect)",
"value": "IQB-Player (Aspect)", "en": "IQB player (Aspect)"
"lang": "de" },
},
{
"value": "IQB-Player (Aspect)",
"lang": "en"
}
],
"version": "version-placeholder",
"specVersion": "4.0",
"description": [
{
"value": "Dieser Player wird vom IQB für komplexe Testaufgaben in der Kompetenzdiagnostik verwendet.",
"lang": "de"
}
],
"maintainer": { "maintainer": {
"name": [ "name": {
{ "de": "IQB - Institut zur Qualitätsentwicklung im Bildungswesen",
"value": "IQB - Institut zur Qualitätsentwicklung im Bildungswesen", "en": "IQB - Institute for Educational Quality Improvement"
"lang": "de" },
},
{
"value": "IQB - Institute for Educational Quality Improvement",
"lang": "en"
}
],
"url": "https://www.iqb.hu-berlin.de", "url": "https://www.iqb.hu-berlin.de",
"email": "iqb-tbadev@hu-berlin.de" "email": "iqb-tbadev@hu-berlin.de"
}, },
"code": { "description": {
"repositoryType": "git", "de": "TODO",
"repositoryUrl": "https://github.com/iqb-berlin/verona-modules-aspect", "en": "TODO"
"licenseType": "MIT", },
"licenseUrl": "https://opensource.org/licenses/MIT" "version": "version-placeholder",
} "apiVersion": "3.0.0",
"repository": {
"type": "git",
"url": "https://github.com/iqb-berlin/verona-modules-apect"
},
"notSupportedFeatures": []
} }
</script> </script>
<link rel="stylesheet" href="player.css"> <link rel="stylesheet" href="player.css">
......
...@@ -7,44 +7,32 @@ ...@@ -7,44 +7,32 @@
{ {
"$schema": "https://raw.githubusercontent.com/verona-interfaces/metadata/master/verona-module-metadata.json", "$schema": "https://raw.githubusercontent.com/verona-interfaces/metadata/master/verona-module-metadata.json",
"type": "player", "type": "player",
"id": "iqb-player-aspect", "id": "verona-player-aspect",
"name": [ "version": "placeholder",
{ "specVersion": "4.0.0",
"value": "IQB-Player (Aspect)", "name": [{
"lang": "de" "lang": "de",
}, "value": "Verona-Player (Aspect)"
{ }],
"value": "IQB-Player (Aspect)",
"lang": "en"
}
],
"version": "version-placeholder",
"specVersion": "4.0",
"description": [
{
"value": "Dieser Player wird vom IQB für komplexe Testaufgaben in der Kompetenzdiagnostik verwendet.",
"lang": "de"
}
],
"maintainer": { "maintainer": {
"name": [ "name": [
{ {
"value": "IQB - Institut zur Qualitätsentwicklung im Bildungswesen", "lang": "de",
"lang": "de" "value": "IQB - Institut zur Qualitätsentwicklung im Bildungswesen"
},
{
"value": "IQB - Institute for Educational Quality Improvement",
"lang": "en"
} }
], ],
"url": "https://www.iqb.hu-berlin.de", "url": "https://www.iqb.hu-berlin.de",
"email": "iqb-tbadev@hu-berlin.de" "email": "iqb-tbadev@hu-berlin.de"
}, },
"code": { "description": [
"repositoryType": "git", {
"repositoryUrl": "https://github.com/iqb-berlin/verona-modules-aspect", "lang": "de",
"licenseType": "MIT", "value": "TODO"
"licenseUrl": "https://opensource.org/licenses/MIT" }
],
"repository": {
"type": "git",
"url": "https://github.com/iqb-berlin/verona-modules-apect"
} }
} }
</script> </script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment