diff --git a/src/adonisjs/public/player/js/player.js b/src/adonisjs/public/player/js/player.js index ee509333..f5881c39 100644 --- a/src/adonisjs/public/player/js/player.js +++ b/src/adonisjs/public/player/js/player.js @@ -99,14 +99,14 @@ class PlayerManager { this._state.historyRecord(startKnot) this.knotLoad(startKnot) break - case 'knot/navigate/>': const nextKnot = this._state.nextKnot() + case 'knot/navigate/>': + const nextKnot = this._state.nextKnot() this._state.historyRecord(nextKnot) this.knotLoad(nextKnot) break - case 'flow/navigate/>': const flowNext = this._nextFlowKnot() + case 'flow/navigate/>': + const flowNext = this._nextFlowKnot() if (flowNext != null) { - // console.log('=== flow next') - // console.log(flowNext) this._state.historyRecord(flowNext.target) this.knotLoad(flowNext.target) } @@ -144,6 +144,7 @@ class PlayerManager { result.message) } this._state.historyRecord(target) + // this._updateFlowKnot(target) if (message.value) { this._state.parameter = message.value this.knotLoad(target, message.value) @@ -173,6 +174,20 @@ class PlayerManager { return next } + _updateFlowKnot (knot) { + // console.log('=== knot & flow') + // console.log(knot) + // console.log(this._state.flow.slice()) + if (this._state.flow) { + let next + do { + next = this._state.flow.shift() + } while (this._state.flow.length > 0 && next.target != knot) + if (this._state.flow.length == 0) { delete this._state.flow } + } + // console.log(this._state.flow.slice()) + } + async startPlayer (caseid) { const preCaseOff = true this._mainPanel = document.querySelector('#player-panel') @@ -330,7 +345,8 @@ class PlayerManager { } c++ } - if (flow != null && flow.length > 0) { this._state.flow = flow } + if (flow != null && flow.length > 0) + this._state.flow = flow } } diff --git a/src/adonisjs/public/templates/simple/case/tbl-dynamic.md b/src/adonisjs/public/templates/simple/case/tbl-dynamic.md index 9e084616..b06da1ca 100644 --- a/src/adonisjs/public/templates/simple/case/tbl-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/tbl-dynamic.md @@ -100,11 +100,14 @@ Write here the **stem**. **Complementary Exams** > Choose the 3 most relevant complementary exams to solve this case: -+ Exam 1 <-> Exam 1 -+ Exam 2 <-> Exam 2 -+ Exam 3 <-> Exam 3 -+ Exam 4 <-> Exam 4 -+ Exam 5 <-> Exam 5 +? exams + * type: choice + * reveal: partial +* Exam 1 <-> Exam 1 +* Exam 2 <-> Exam 2 +* Exam 3 <-> Exam 3 +* Exam 4 <-> Exam 4 +* Exam 5 <-> Exam 5 * Next -> Conclusion @@ -234,11 +237,14 @@ Write here the **stem**. **Complementary Exams** > Choose the 3 most relevant complementary exams to solve this case: -+ Exam 1 <-> Exam 1 -+ Exam 2 <-> Exam 2 -+ Exam 3 <-> Exam 3 -+ Exam 4 <-> Exam 4 -+ Exam 5 <-> Exam 5 +? exams + * type: choice + * reveal: partial +* Exam 1 <-> Exam 1 +* Exam 2 <-> Exam 2 +* Exam 3 <-> Exam 3 +* Exam 4 <-> Exam 4 +* Exam 5 <-> Exam 5 * Next -> Conclusion diff --git a/src/adonisjs/public/templates/simple/knot/tbl_case.md b/src/adonisjs/public/templates/simple/knot/tbl_case.md index edd99344..c5e910c8 100644 --- a/src/adonisjs/public/templates/simple/knot/tbl_case.md +++ b/src/adonisjs/public/templates/simple/knot/tbl_case.md @@ -40,11 +40,14 @@ Write here the **stem**. **Complementary Exams** > Choose the 3 most relevant complementary exams to solve this case: -+ Exam 1 <-> Exam 1 -+ Exam 2 <-> Exam 2 -+ Exam 3 <-> Exam 3 -+ Exam 4 <-> Exam 4 -+ Exam 5 <-> Exam 5 +? exams + * type: choice + * reveal: partial +* Exam 1 <-> Exam 1 +* Exam 2 <-> Exam 2 +* Exam 3 <-> Exam 3 +* Exam 4 <-> Exam 4 +* Exam 5 <-> Exam 5 * Next -> Conclusion diff --git a/src/adonisjs/public/translator/translator.js b/src/adonisjs/public/translator/translator.js index 4f799ee0..fed9c43d 100644 --- a/src/adonisjs/public/translator/translator.js +++ b/src/adonisjs/public/translator/translator.js @@ -726,8 +726,6 @@ class Translator { for (let c = 1; c < compiled.length; c++) { const pr = (c > 1 && compiled[c - 1].type == 'linefeed') ? c - 2 : c - 1 if (compiled[c].type == 'option') { - console.log('=== previous') - console.log(compiled[pr]) let stype = compiled[c].subtype if (compiled[pr].type == 'input' && compiled[pr].subtype && compiled[pr].subtype == 'choice' && compiled[pr].options == null) {