From f9e69e143889b02db10709c361602eb628f96f88 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Sep 2018 14:31:51 +0530 Subject: [PATCH 1/7] Issue #16 fix: fixed scroll issue, the changing width on replay --- renderer/styles/style.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderer/styles/style.css b/renderer/styles/style.css index b67c9a6..44afa27 100644 --- a/renderer/styles/style.css +++ b/renderer/styles/style.css @@ -11,6 +11,8 @@ .qs-ftb-container { margin-top:10vh; + height: 80vh; + overflow-y: auto; } .qs-ftb-content { @@ -78,6 +80,7 @@ .ftb-question-text { text-align:left; line-height: 40px; + width: 80%; } .align-question { From 6fbf6cc4ab7125b36655d87e95830932e3d7f30d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Sep 2018 15:02:47 +0530 Subject: [PATCH 2/7] Issue #16 fix: Scroll bar styles --- renderer/styles/style.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/renderer/styles/style.css b/renderer/styles/style.css index 44afa27..7f6a479 100644 --- a/renderer/styles/style.css +++ b/renderer/styles/style.css @@ -15,6 +15,19 @@ overflow-y: auto; } +.qs-ftb-container::-webkit-scrollbar { + width: 0.5em; +} + +.qs-ftb-container::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); +} + +.qs-ftb-container::-webkit-scrollbar-thumb { + background-color: #65A0E6; + outline: 1px solid slategrey; +} + .qs-ftb-content { line-height: 3; } From 84e7a73a5b3ae52dba72d8c24924c9dac5c869ed Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Sep 2018 11:12:28 +0530 Subject: [PATCH 3/7] Issue #16 fix: Evaluation fails for special characters --- editor/controllers/ftb-controller.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/editor/controllers/ftb-controller.js b/editor/controllers/ftb-controller.js index 57c7683..ba9a9be 100644 --- a/editor/controllers/ftb-controller.js +++ b/editor/controllers/ftb-controller.js @@ -36,7 +36,7 @@ angular.module('ftbApp', ['org.ekstep.question']).controller('ftbQuestionFormCon contentsCss: CKEDITOR.basePath + "contents.css" // eslint-disable-line no-undef }); questionInput.on('change', function () { - $scope.ftbFormData.question.text = $("
").html(this.getData()).text(); + $scope.ftbFormData.question.text = this.getData(); }); questionInput.on('focus', function () { $scope.generateTelemetry({ @@ -122,9 +122,16 @@ angular.module('ftbApp', ['org.ekstep.question']).controller('ftbQuestionFormCon $scope.createAnswerArray = function () { var regexForAns = /(?:^|)\[\[(.*?)(?:\]\]|$)/g; $scope.ftbFormData.answer = $scope.splitAnswer($scope.ftbFormData.question.text, regexForAns, 1).map(function (a) { + a = $scope.extractHTML(a); return a.toLowerCase().trim(); }); } + + $scope.extractHTML = function(htmlElement) { + var divElement= document.createElement('div'); + divElement.innerHTML= htmlElement; + return divElement.textContent || divElement.innerText; + } /** * split answer into question text * @memberof org.ekstep.questionunit.ftb.horizontal_controller From ca54c1e66a73971f82030bf931e9bb07b5b1dda4 Mon Sep 17 00:00:00 2001 From: sivashanmugam-kannan Date: Tue, 18 Sep 2018 16:15:10 +0530 Subject: [PATCH 4/7] fix: image rendering in mobile --- manifest.json | 6 ++++++ renderer/ftbcontroller.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 3aa0ead..a39c316 100644 --- a/manifest.json +++ b/manifest.json @@ -54,6 +54,12 @@ { "type": "js", "src": "renderer/ftbcontroller.js" + }, + { + "id":"org.ekstep.questionunit.ftb.audioblue", + "type":"image", + "src":"/renderer/assets/audio-blue.png", + "assetId": "org.ekstep.questionunit.ftb.audioblue" } ] }, diff --git a/renderer/ftbcontroller.js b/renderer/ftbcontroller.js index 2186e57..9341207 100644 --- a/renderer/ftbcontroller.js +++ b/renderer/ftbcontroller.js @@ -20,7 +20,7 @@ FTBController.getQuestionTemplate = function () {
\ <% if ( question.data.question.image.length > 0 ){ %> \
\ - > \ + \
\ <% } %> \ <% if ( question.data.question.audio.length > 0 ){ %> \ From c7e2c806eea37e55be4063ebc202fe19ae77bc41 Mon Sep 17 00:00:00 2001 From: sivashanmugam-kannan Date: Thu, 20 Sep 2018 12:23:02 +0530 Subject: [PATCH 5/7] fix: Sending ASSESS and ASSESSEND telemetery(Part of fix SB-5895, scoring logic fixed --- renderer/plugin.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/renderer/plugin.js b/renderer/plugin.js index a359fa8..8397379 100644 --- a/renderer/plugin.js +++ b/renderer/plugin.js @@ -81,24 +81,32 @@ org.ekstep.questionunitFTB.RendererPlugin = org.ekstep.contentrenderer.questionU correctAnswer = true; } // Calculate partial score - var tempCount = 0; + var correctAnswersCount = 0; _.each(this._question.data.answer, function (ans, index) { // eslint-disable-line no-undef /*istanbul ignore else*/ if (ans.toLowerCase().trim() == answerArray[index].toLowerCase().trim()) { - tempCount++; + correctAnswersCount++; } }); - var partialScore = (tempCount / this._question.data.answer.length) * this._question.config.max_score; // eslint-disable-line no-undef - + var questionScore; + if(this._question.config.partial_scoring){ + questionScore = (correctAnswersCount / this._question.data.answer.length) * this._question.config.max_score; + }else{ + if((correctAnswersCount / this._question.data.answer.length) == 1){ + questionScore = this._question.config.max_score; + }else{ + questionScore = 0 + } + } var result = { eval: correctAnswer, state: { val: answerArray }, - score: partialScore, + score: questionScore, values: telemetryAnsArr, - noOfCorrectAns: tempCount, + noOfCorrectAns: correctAnswersCount, totalAns: this._question.data.answer.length }; From 097c39ee8679c3c674a4de87f248be98a0a8f0a1 Mon Sep 17 00:00:00 2001 From: Sachin Date: Sat, 22 Sep 2018 21:39:08 +0530 Subject: [PATCH 6/7] Issue #16 fix: Version change --- editor/controllers/ftb-controller.js | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/controllers/ftb-controller.js b/editor/controllers/ftb-controller.js index ba9a9be..dc1c9ae 100644 --- a/editor/controllers/ftb-controller.js +++ b/editor/controllers/ftb-controller.js @@ -31,7 +31,7 @@ angular.module('ftbApp', ['org.ekstep.question']).controller('ftbQuestionFormCon media: [] }; questionInput = CKEDITOR.replace('ftbQuestion', { // eslint-disable-line no-undef - customConfig: ecEditor.resolvePluginResource('org.ekstep.questionunit', '1.0', "editor/ckeditor-config.js"), + customConfig: ecEditor.resolvePluginResource('org.ekstep.questionunit', '1.1', "editor/ckeditor-config.js"), skin: 'moono-lisa,' + CKEDITOR.basePath + "skins/moono-lisa/", // eslint-disable-line no-undef contentsCss: CKEDITOR.basePath + "contents.css" // eslint-disable-line no-undef }); diff --git a/manifest.json b/manifest.json index a39c316..f4bee26 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "id": "org.ekstep.questionunit.ftb", - "ver": "1.0", + "ver": "1.1", "author": "Gourav More", "title": "FTB question", "description": "", From 072987f53998479bba7ce80935330e52be07b1de Mon Sep 17 00:00:00 2001 From: Sachin Date: Tue, 25 Sep 2018 14:02:24 +0530 Subject: [PATCH 7/7] Issue #16 fix: Version revert back --- editor/controllers/ftb-controller.js | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/controllers/ftb-controller.js b/editor/controllers/ftb-controller.js index dc1c9ae..ba9a9be 100644 --- a/editor/controllers/ftb-controller.js +++ b/editor/controllers/ftb-controller.js @@ -31,7 +31,7 @@ angular.module('ftbApp', ['org.ekstep.question']).controller('ftbQuestionFormCon media: [] }; questionInput = CKEDITOR.replace('ftbQuestion', { // eslint-disable-line no-undef - customConfig: ecEditor.resolvePluginResource('org.ekstep.questionunit', '1.1', "editor/ckeditor-config.js"), + customConfig: ecEditor.resolvePluginResource('org.ekstep.questionunit', '1.0', "editor/ckeditor-config.js"), skin: 'moono-lisa,' + CKEDITOR.basePath + "skins/moono-lisa/", // eslint-disable-line no-undef contentsCss: CKEDITOR.basePath + "contents.css" // eslint-disable-line no-undef }); diff --git a/manifest.json b/manifest.json index f4bee26..a39c316 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "id": "org.ekstep.questionunit.ftb", - "ver": "1.1", + "ver": "1.0", "author": "Gourav More", "title": "FTB question", "description": "",