uzh / marugoto

Marugoto: eLearning Framework for Story Telling
GNU General Public License v2.0
8 stars 6 forks source link

Problem with pageTransitions with criteria "visited" *and* time-settings #120

Closed martindusinberre closed 4 years ago

martindusinberre commented 4 years ago

This is a problem that has emerged in the trailer. When we play it in the live system, everything works fine. In the test environment, however, the following problem occurs:

On page 1.1.7.1.2 there are 2 pageTransition.json files; each have a "visited" criteria. pageTransition1.json should appear if you visited page 1.1.6.1B earlier: { "id": null, "from": null, "to": "trailer1/1.1.7.1.3B/page.json", "buttonText": "Call van Dijk back in to read your description", "time": { "time": 0 }, "money": { "amount": 0 }, "criteria": [ { "pageCriteria": "visited", "exerciseCriteria": null, "mailCriteria": null, "affectedExercise": null, "affectedPage": "trailer1/1.1.6.1B/page.json", "affectedMail": null } ] }

For pageTransition2.json you need to have been on page 1.1.6.2notB:

{ "id": null, "from": null, "to": "trailer1/1.1.7.1.3notB/page.json", "buttonText": "Call van Dijk back in to read your description", "time": { "time": 0 }, "money": { "amount": 0 }, "criteria": [ { "pageCriteria": "visited", "exerciseCriteria": null, "mailCriteria": null, "affectedExercise": null, "affectedPage": "trailer1/1.1.6.2notB/page.json", "affectedMail": null } ] }

It is impossible to have been on both pages; but when the player arrives on 1.1.7.1.2, the buttonTexts of both transitions are incorrectly displayed: 82829598-eb2ab280-9eb3-11ea-8325-b4a9275b3e9f

@Helena-LiT and I are at a loss to explain this: in Plantation Lives on the test environment, there are very similar pages (e.g. 2.1.8) and the transition works fine. The same is true of Madness. The only thing we can hypothesize is that when there is a choice of pageTransition.json files and other elements such as the autoTransitionOnTimerExpiration (in the page.json file) set to "true" (with the time defined), then there is a problem. Moreover, on 1.1.7.1.2, when the timer expires, it is always pageTransition1.json which is triggered, regardless of the page criteria (visited A or B) defined in the transition pages. These two elements--"visited" and "autoTransition"--are at play in the problematic 1.1.7.1.2 on the Trailer in the test environment. But this must be a new problem as it only occurs in the test environment and not on the live system.

@Helena-LiT also reports that in lit-madness on 4.5.15a the autotransition is never triggered after the timer runs out and the second transition (incorrectInput) never becomes available. In other words: if the page transitions involve multiple elements (timer, visited/notVisited, correct/incorrect solutions), then a bug appears.

yaslena commented 4 years ago

This a duplicate of #116

martindusinberre commented 4 years ago

@Helena-LiT It's not quite a duplicate because the radioButtonExercise transition, which was also part of #116 , is fixed.

nemtish commented 4 years ago

should be fixed with https://github.com/uzh/marugoto/commit/4ab23d121c75af9ec4caa31bb11e0e8aa78472b1

martindusinberre commented 4 years ago

Thanks so much, @nemtish we'll test it tomorrow. Best, Martin

yaslena commented 4 years ago

@Helena-LiT It's not quite a duplicate because the radioButtonExercise transition, which was also part of #116 , is fixed.

@martindusinberre The changes that presumably caused all these bugs were made at the same time and in the same instance (the trailer bug is not newer than the other transition bugs), so these two issues should be linked when people are looking for the cause of the problem. Adding a duplicate marker is just one way in GitHub to link two related issues, which makes sense when all of #120 is contained in #116.

yaslena commented 4 years ago

I would like to add some of my observations on the transition bug (autotransition + page criteria: visited) based on the Madness (Managing Lunacy storyline):

martindusinberre commented 4 years ago

Setting aside these other transition issues for a moment: the original bug, which appears with a combination of "visited"/"notVisited" criteria in pageTransition.json files and the timer/autoTransitionOnTimerExpiration being "true" in page.json files is still there (on the test system, not on the live system). Whereas previously (as described above) two buttonTexts appeared where they shouldn't, the problem tonight was different: the buttonTexts worked fine (i.e. only one appeared), but the timer counted me down from 12 minutes, even though it was set to 300 in the page.json file. See the two screenshots (top screenshot taken when there were 10 minutes left on the timer).

Screenshot 2020-06-05 at 20 04 16 Screenshot 2020-06-05 at 20 10 29
yaslena commented 4 years ago

I don't have the same problem with the timer in the trailer. I have tested this page in firefox and edge browsers and I always get the correct 5min displayed. Maybe it's a browser problem (chrome?) or the problem is already solved.

yaslena commented 4 years ago

I would like to add some of my observations on the transition bug (autotransition + page criteria: visited) based on the Madness (Managing Lunacy storyline):

* presence of **autotransition** on a page (in page.json) causes the game to **disregard** any **"page criteria" : "visted"** objects (in pageTransition.json) **displaying** pageTransitions (button text) that should not be available

* presence of **autotransition** on a page (in page.json) causes the game to **disregard** any **"page criteria" : "visted"** objects (in pageTransition.json) automatically **triggering** pageTransitions that should not be available

* presence of **autotransition** on a page **does not** cause the game to disregard other page criteria like **"exerciseCriteria": "correctInput"**

* **autotransition** can currently **only trigger Transition1** but will never automatically trigger Transition2, Transition3 and so on even when transition criteria for these other page transitions are met.

I think all of the above was already solved.

martindusinberre commented 4 years ago

I don't have the same problem with the timer in the trailer. I have tested this page in firefox and edge browsers and I always get the correct 5min displayed. Maybe it's a browser problem (chrome?) or the problem is already solved.

OK, many thanks for pointing this out: has just worked for me fine in Firefox, too. What I experienced may be connected to #126 (I was testing many games consecutively) so for the time being, I'll close this assuming that this particular issue (combination of criteria + timer) is fixed.