diff --git a/src/adonisjs/public/infra/dcc-logger-manager.js b/src/adonisjs/public/infra/dcc-logger-manager.js
new file mode 100644
index 00000000..6f279ae9
--- /dev/null
+++ b/src/adonisjs/public/infra/dcc-logger-manager.js
@@ -0,0 +1,38 @@
+/* Logger DCC
+ ***********/
+
+class DCCLoggerManager extends DCCLight {
+ constructor() {
+ super()
+
+ this._notifyLogger = this._notifyLogger.bind(this)
+ this._subscribe('case/summary/#', this._notifyLogger)
+ }
+
+ async _notifyLogger (topic, message, track) {
+ if (track) {
+ console.log('=== logger DCC: ' + topic)
+ console.log(message)
+
+ console.log('========== creating logger ==========')
+ let logger = await MessageBus.i.request('logger/create/post',
+ {
+ caseId: message.caseId,
+ instanceId: MessageBus.extractLevel(topic, 3),
+ log: JSON.stringify(message.knotTrack)
+ }
+ )
+ if (logger.message.error) {
+ console.log('--- error')
+ console.log(logger.message.error)
+ } else {
+ console.log('=== success ===')
+ console.log(logger.message)
+ }
+ }
+ }
+}
+
+(function () {
+ DCCLoggerManager.i = new DCCLoggerManager()
+})()
diff --git a/src/adonisjs/public/infra/dcc-rest-proxy.js b/src/adonisjs/public/infra/dcc-rest-proxy.js
index f1e244b6..2d3665e3 100644
--- a/src/adonisjs/public/infra/dcc-rest-proxy.js
+++ b/src/adonisjs/public/infra/dcc-rest-proxy.js
@@ -639,4 +639,33 @@
}
)
+ DCC.component(
+ 'harena-create-logger',
+ 'dcc-rest',
+ {
+ environment: {
+ 'url-manager': HarenaConfig.manager.url + HarenaConfig.manager.api
+ },
+ oas: {
+ paths: {
+ '{url-manager}/logger': {
+ 'post': {
+ operationId: 'create-logger',
+ parameters: [
+ {name: 'url-manager',
+ in: 'path'},
+ {name: 'caseId',
+ in: 'query'},
+ {name: 'instanceId',
+ in: 'query'},
+ {name: 'log',
+ in: 'query'}
+ ]
+ }
+ }
+ }
+ }
+ }
+ )
+
})()
diff --git a/src/adonisjs/public/player/case/index.html b/src/adonisjs/public/player/case/index.html
index 8efb6956..1c9935bf 100644
--- a/src/adonisjs/public/player/case/index.html
+++ b/src/adonisjs/public/player/case/index.html
@@ -54,6 +54,7 @@
+
@@ -112,6 +113,7 @@
+
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) {