Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validPages hat ein falsches Format #666

Closed
paflov opened this issue Jun 14, 2024 · 2 comments
Closed

validPages hat ein falsches Format #666

paflov opened this issue Jun 14, 2024 · 2 comments
Labels
bug Something isn't working Player

Comments

@paflov
Copy link

paflov commented Jun 14, 2024

validPages Format von Verona 2 - 5

This data is structured as "page key" => "page label", so we have (1) keys for navigation commands or state notifications and (2) strings as labels of navigation buttons if needed.

wird z. B. vom Simple 4, Aspect 1.9, Dan 3.0 so interpretiert:

export interface Verona5ValidPages {
  [id: string]: string
}
# also so
{
    "0": "Seite 1",
    "1": "Seite 2",
    "2": "Seite 3"
}

validPages Format Verona 6

export interface Verona6ValidPage {
  id: string;
  label?: string;
}

[
  {
    "id": "1" ,
    "label": "seite1"
  },
  {
    "id": "2" ,
    "label": "seite2"
  },
]
export type Verona6ValidPages = Array<Verona6ValidPage>;

Format von Aspect Player 2.4.11

[
  {
    "0": "Seite 1"
  },
  {
    "1": "Seite 2"
  },
  {
    "2": "Seite 3"
  }
]

Entspricht also keiner Version des Verona-Standards. Führt in der aktuellen Version nur dazu, dass Page-Labels im Testcenter nicht korrekt angezeigt werden.

Dieses Format taucht schon mal in Aspect 1.2.4 auf, während in 1.9.0 das richtige Format ausgegeben wird. Dieser liefert allerdings dafür einen falschen Wert für currentPage, nämlich, wie alle getesteten Versionen von Aspect einen stringifizierten Index ab 0 zurück, also z. B. "0". Als Seiten-Ids liefert er jedoch "page1", "page2" usw. Beides ist nicht zusammenzubringen, daher funktioniert in dieser Version das Anzeigen und Wiederherstellen der aktuellen Seite und die Navigation allgemein nicht.

@paflov
Copy link
Author

paflov commented Jun 14, 2024

@jojohoch
Copy link
Collaborator

jojohoch commented Jun 24, 2024

Kann ich nicht bestätigen. Player 2.4.11 schickt diese Object:
{
"0": "Seite 1",
"1": "Seite 2",
"2": "Seite 3"
}

bzw. diesen playerState:
{
"playerState": {
"currentPage": "2",
"validPages": {
"0": "Seite 1",
"1": "Seite 2",
"2": "Seite 3"
}
}
}

@jojohoch jojohoch closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Player
Projects
None yet
Development

No branches or pull requests

2 participants