From 04089d3e1eadce9b886a72cdcfd347d3b2bbb220 Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Thu, 8 Aug 2024 15:45:41 -0400 Subject: [PATCH 1/4] added generable flag and prompt to install yaml --- src/install.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/install.yaml b/src/install.yaml index b5b40ed..82fccd6 100755 --- a/src/install.yaml +++ b/src/install.yaml @@ -9,6 +9,7 @@ general: is_qset_encrypted: Yes is_answer_encrypted: Yes is_storage_enabled: No + is_generable: Yes api_version: 2 files: creator: creator.html @@ -41,3 +42,8 @@ meta_data: A Jeopardy-like study and quiz tool. Questions are separated into categorical rows. + generation_prompt: > + Each index in the outermost items array represents a subject matter category related to the overall topic, with individual + questions contained within the inner items array for each category. Ideally, each category should contain roughly the same number + of questions. For example, if eight questions are requested, there might be two categories with four questions each. Categories should be + distinct sub-topics of the overall widget topic, and their corresponding questions should relate to the category sub-topic. From d33afaecb368332cb002a3a18a9a2b3f0773f27d Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Wed, 21 Aug 2024 13:19:01 -0400 Subject: [PATCH 2/4] Adds history validation pass-through --- src/controllers/creator.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/creator.coffee b/src/controllers/creator.coffee index bfd908f..40fb401 100644 --- a/src/controllers/creator.coffee +++ b/src/controllers/creator.coffee @@ -565,7 +565,7 @@ Enigma.controller 'enigmaCreatorCtrl', ['$scope', '$timeout', '$sce', ($scope, $ $scope.onSaveClicked = (mode = 'save') -> qset = _buildSaveData() - msg = _validateQuestions qset + msg = if mode is 'history' then false else _validateQuestions qset if msg Materia.CreatorCore.cancelSave msg else From c3052ee90330a4b121e156cd6a1b842ede6d11e6 Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Thu, 17 Oct 2024 13:53:30 -0400 Subject: [PATCH 3/4] Fixes dynamic height recalculation. Fixed how several page elements are rendered. Tutorial modal BG can be clicked to dismiss. --- src/controllers/player.coffee | 11 +++++---- src/player.html | 5 ++-- src/player.scss | 45 ++++++++++++++++------------------- 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/src/controllers/player.coffee b/src/controllers/player.coffee index 9979b36..ee93409 100644 --- a/src/controllers/player.coffee +++ b/src/controllers/player.coffee @@ -22,8 +22,6 @@ Enigma.controller 'enigmaPlayerCtrl', ['$scope', '$timeout', '$sce', ($scope, $t $scope.showTutorial = true - $scope.delayedHeaderInit = false - $scope.instructionsOpen = false $scope.questionInstructionsOpen = false @@ -63,13 +61,16 @@ Enigma.controller 'enigmaPlayerCtrl', ['$scope', '$timeout', '$sce', ($scope, $t $scope.$apply() - Materia.Engine.setHeight() - # delay header draw until after gameboard is rendered, forcing recalculation of visible area. This appears to be a chrome 76 bug related to changing iframe height + # wait for content to render, then compute player height and pass it to the enginecore to update the height of the iframe $timeout -> - $scope.delayedHeaderInit = true + h = _getPlayerHeight() + Materia.Engine.setHeight(h) document.getElementById('tutorial-modal-dismiss').focus() + _getPlayerHeight = () -> + height = Math.ceil(parseFloat(window.getComputedStyle(document.querySelector('html')).getPropertyValue('height'))) + # randomize the order of a question's answers _shuffle = (a) -> for i in [1...a.length] diff --git a/src/player.html b/src/player.html index b7ce9cf..2faeda8 100755 --- a/src/player.html +++ b/src/player.html @@ -34,11 +34,10 @@ - +