From 5614186e266e57057d3e437a661a97e787ddfe83 Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Tue, 12 Dec 2023 10:06:42 -0500 Subject: [PATCH 01/10] Added question bank functionality to creator and player side --- src/creator.coffee | 17 ++++++++++++++--- src/creator.html | 19 ++++++++++++++++++- src/player.coffee | 12 ++++++++++-- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/creator.coffee b/src/creator.coffee index 4260b4e..4c0c25a 100755 --- a/src/creator.coffee +++ b/src/creator.coffee @@ -28,7 +28,7 @@ Hangman.directive('focusMe', ['$timeout', '$parse', ($timeout, $parse) -> ]) Hangman.factory 'Resource', ['$sanitize', ($sanitize) -> - buildQset: (title, items, partial, attempts, random) -> + buildQset: (title, items, partial, attempts, random, enableQuestionBank, questionBankVal) -> qsetItems = [] qset = {} @@ -47,7 +47,7 @@ Hangman.factory 'Resource', ['$sanitize', ($sanitize) -> Materia.CreatorCore.cancelSave 'Word #'+(i+1)+' needs to contain at least one letter or number.' return false - qset.options = {partial: partial, attempts: attempts, random: random} + qset.options = {partial: partial, attempts: attempts, random: random, enableQuestionBank: enableQuestionBank, questionBankVal: questionBankVal} qset.assets = [] qset.rand = false qset.name = title @@ -97,6 +97,9 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.partial = false $scope.random = false $scope.attempts = 5 + $scope.questionBankDialog = false + $scope.enableQuestionBank = false + $scope.questionBankVal = 0 # for use with paginating results $scope.currentPage = 0; @@ -202,12 +205,14 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.attempts = ~~qset.options.attempts or 5 $scope.partial = qset.options.partial $scope.random = qset.options.random + $scope.enableQuestionBank = qset.options.enableQuestionBank + $scope.questionBankVal = qset.options.questionBankVal $scope.onQuestionImportComplete qset.items[0].items $scope.$apply() $scope.onSaveClicked = (mode = 'save') -> - qset = Resource.buildQset $sanitize($scope.title), $scope.items, $scope.partial, $scope.attempts, $scope.random + qset = Resource.buildQset $sanitize($scope.title), $scope.items, $scope.partial, $scope.attempts, $scope.random, $scope.enableQuestionBank, $scope.questionBankVal if qset then Materia.CreatorCore.save $sanitize($scope.title), qset $scope.onSaveComplete = (title, widget, qset, version) -> true @@ -234,6 +239,12 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re , 400 + $scope.openQuestionBankDialog = -> + $scope.questionBankDialog = true + + $scope.closeQuestionBankDialog = -> + $scope.questionBankDialog = false + $scope.addItem = (ques = "", ans = "", id = "") -> pages = $scope.numberOfPages() $scope.items.push {ques:ques, ans:ans, foc:false, id: id } diff --git a/src/creator.html b/src/creator.html index b19b59c..5634c31 100644 --- a/src/creator.html +++ b/src/creator.html @@ -169,7 +169,24 @@

Phrase

{{currentPage+1}}/{{numberOfPages()}} - + +
+
+
+ Enable Question Bank? + + No {{enableQuestionBank}} + Yes {{enableQuestionBank}} + + + How many questions do you want to ask? + + Out of {{items.length}} annnd {{questionBankVal}} + +
+ +
+
Click here to add your first question
diff --git a/src/player.coffee b/src/player.coffee index 095b873..ccdf3c5 100755 --- a/src/player.coffee +++ b/src/player.coffee @@ -285,6 +285,9 @@ HangmanEngine.controller 'HangmanEngineCtrl', ['$scope', '$timeout', 'Parse', 'R Hangman.Draw.playAnimation 'torso', 'pander' $scope.anvilStage = 1 + $scope.prepareQuestionBank = (qsetArr, questionBankVal) -> + return _shuffle(qsetArr.items).slice(0, questionBankVal) + $scope.startQuestion = -> $scope.$apply -> @@ -323,10 +326,10 @@ HangmanEngine.controller 'HangmanEngineCtrl', ['$scope', '$timeout', 'Parse', 'R $scope.max = Reset.attempts ~~_qset.options.attempts $scope.keyboard = Reset.keyboard() ), 500 - + _shuffle = (a) -> - for i in [1...a.length] + for i in [0...a.length] j = Math.floor Math.random() * (a.length) [a[i], a[j]] = [a[j], a[i]] a @@ -344,6 +347,11 @@ HangmanEngine.controller 'HangmanEngineCtrl', ['$scope', '$timeout', 'Parse', 'R if _qset.options.random _qset.items[0].items = _shuffle _qset.items[0].items + if(_qset.options.random and _qset.options.enableQuestionBank) + _qset.items[0].items = _qset.items[0].items.slice(0, _qset.options.questionBankVal) + else if(qset.options.enableQuestionBank) + _qset.items[0].items = window.scope.prepareQuestionBank(qset.items[0], qset.options.questionBankVal) + $scope.total = _qset.items[0].items.length $scope.max = Reset.attempts ~~_qset.options.attempts $scope.keyboard = Reset.keyboard() From a58620a2865ef5d7f97427a24f20bc03a4763394 Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Tue, 12 Dec 2023 17:51:10 -0500 Subject: [PATCH 02/10] Polished the functionality and added styling --- src/creator.coffee | 1 + src/creator.html | 29 ++++++++++++++------------ src/creator.scss | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 13 deletions(-) diff --git a/src/creator.coffee b/src/creator.coffee index 4c0c25a..efc1b14 100755 --- a/src/creator.coffee +++ b/src/creator.coffee @@ -241,6 +241,7 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.openQuestionBankDialog = -> $scope.questionBankDialog = true + $scope.enableQuestionBank = false $scope.closeQuestionBankDialog = -> $scope.questionBankDialog = false diff --git a/src/creator.html b/src/creator.html index 5634c31..e273a3f 100644 --- a/src/creator.html +++ b/src/creator.html @@ -27,6 +27,7 @@

+

Incorrect guesses per phrase

@@ -169,23 +170,25 @@

Phrase

{{currentPage+1}}/{{numberOfPages()}}
- -
-
-
- Enable Question Bank? +
+
+
+ Enable question bank? +
- No {{enableQuestionBank}} - Yes {{enableQuestionBank}} + No + Yes - - How many questions do you want to ask? - - Out of {{items.length}} annnd {{questionBankVal}} +

+ + How many questions to ask? +
+ + out of {{items.length}}
+
- -
+
Click here to add your first question diff --git a/src/creator.scss b/src/creator.scss index ba2d8eb..01c1158 100644 --- a/src/creator.scss +++ b/src/creator.scss @@ -619,6 +619,14 @@ button.add-question { top: 28px; background: #fff; } + + .questionBankButton { + position: absolute; + background-color: #5a5a5a; + right: 550px; + top: 35px; + } + .attempts { position: absolute; right: 355px; @@ -772,6 +780,49 @@ button.add-question { } } +.questionBank-wrapper { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + border: 5px solid greenyellow; + border-radius: 5px; + background-color: white; + color: black; + height: 300px; + width: 300px; + z-index: 10000; + display: flex; + justify-content: center; + align-items: center; + + .questionBank-content { + .numInput { + width: 35px; + } + margin: 15px; + } + + .dialogCloseButton { + position: absolute; + bottom: 10px; + background-color: rgb(26, 244, 171); + color: black; + } + +} + +// To blur the background while the dialog is open +.overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 9000; + backdrop-filter: blur(5px); + } + .question-tip { position: absolute; right: 28px; From a0166e7f429d3fbfe9017cda0d39b7d415f53335 Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Thu, 14 Dec 2023 15:28:27 -0500 Subject: [PATCH 03/10] Replaced question dialog function calls with ng-click attributes --- src/creator.coffee | 7 ------- src/creator.html | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/creator.coffee b/src/creator.coffee index efc1b14..6ee292b 100755 --- a/src/creator.coffee +++ b/src/creator.coffee @@ -239,13 +239,6 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re , 400 - $scope.openQuestionBankDialog = -> - $scope.questionBankDialog = true - $scope.enableQuestionBank = false - - $scope.closeQuestionBankDialog = -> - $scope.questionBankDialog = false - $scope.addItem = (ques = "", ans = "", id = "") -> pages = $scope.numberOfPages() $scope.items.push {ques:ques, ans:ans, foc:false, id: id } diff --git a/src/creator.html b/src/creator.html index e273a3f..cbed807 100644 --- a/src/creator.html +++ b/src/creator.html @@ -27,7 +27,7 @@

- +

Incorrect guesses per phrase

@@ -188,7 +188,7 @@

Phrase


- +
Click here to add your first question From 4cef684647cbec7d92531c8e5a02d119bf36958b Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Thu, 14 Dec 2023 16:45:07 -0500 Subject: [PATCH 04/10] WIP: making enableQuestionBank initially false --- src/creator.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/creator.coffee b/src/creator.coffee index 6ee292b..088ca67 100755 --- a/src/creator.coffee +++ b/src/creator.coffee @@ -205,8 +205,8 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.attempts = ~~qset.options.attempts or 5 $scope.partial = qset.options.partial $scope.random = qset.options.random - $scope.enableQuestionBank = qset.options.enableQuestionBank - $scope.questionBankVal = qset.options.questionBankVal + $scope.enableQuestionBank = false + $scope.questionBankVal = if qset.options.questionBankVal then qset.options.questionBankVal else false $scope.onQuestionImportComplete qset.items[0].items $scope.$apply() From 3c98421f97509206387e3df0e496cdc3e8adfd17 Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Thu, 14 Dec 2023 18:06:28 -0500 Subject: [PATCH 05/10] Fixed questionBankVal initial value and added input safeguards --- src/creator.coffee | 6 +++--- src/creator.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/creator.coffee b/src/creator.coffee index 088ca67..af36b39 100755 --- a/src/creator.coffee +++ b/src/creator.coffee @@ -99,7 +99,7 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.attempts = 5 $scope.questionBankDialog = false $scope.enableQuestionBank = false - $scope.questionBankVal = 0 + $scope.questionBankVal = 1 # for use with paginating results $scope.currentPage = 0; @@ -205,8 +205,8 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.attempts = ~~qset.options.attempts or 5 $scope.partial = qset.options.partial $scope.random = qset.options.random - $scope.enableQuestionBank = false - $scope.questionBankVal = if qset.options.questionBankVal then qset.options.questionBankVal else false + $scope.enableQuestionBank = if qset.options.enableQuestionBank then qset.options.enableQuestionBank else false + $scope.questionBankVal = if qset.options.questionBankVal then qset.options.questionBankVal else 1 $scope.onQuestionImportComplete qset.items[0].items $scope.$apply() diff --git a/src/creator.html b/src/creator.html index cbed807..4723171 100644 --- a/src/creator.html +++ b/src/creator.html @@ -184,11 +184,11 @@

Phrase

How many questions to ask?
- out of {{items.length}} + out of {{items.length}}
- +
Click here to add your first question From d28bfc99d7245a9392632d6dab213be6e1e20ae8 Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Fri, 15 Dec 2023 16:51:13 -0500 Subject: [PATCH 06/10] Removed break statements and added visual padding in the dialog --- src/creator.html | 36 ++++++++++++++++++++---------------- src/creator.scss | 18 +++++++++++++----- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/creator.html b/src/creator.html index 4723171..82049fc 100644 --- a/src/creator.html +++ b/src/creator.html @@ -171,22 +171,26 @@

Phrase

-
-
- Enable question bank? -
- - No - Yes - -

- - How many questions to ask? -
- - out of {{items.length}} -
-
+
+
+
+ Enable question bank? +
+ + No + Yes + +
+
+
+ + How many questions to ask? +
+ + out of {{items.length}} +
+
+
diff --git a/src/creator.scss b/src/creator.scss index 01c1158..83c913d 100644 --- a/src/creator.scss +++ b/src/creator.scss @@ -780,7 +780,7 @@ button.add-question { } } -.questionBank-wrapper { +.questionBankDialog-wrapper { position: fixed; top: 50%; left: 50%; @@ -790,17 +790,25 @@ button.add-question { background-color: white; color: black; height: 300px; - width: 300px; + width: 250px; z-index: 10000; display: flex; justify-content: center; align-items: center; - .questionBank-content { + .questionBankDialog { + margin: 15px; + .numInput { - width: 35px; + width: 30px; + margin-top: 10px; } - margin: 15px; + + .enable-qb-question { + margin-top: 15px; + margin-bottom: 15px; + } + } .dialogCloseButton { From 088a39dd0293fb58bf8f1b2bd8df0b3a63833e70 Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Tue, 13 Feb 2024 12:27:35 -0500 Subject: [PATCH 07/10] Added lots of css changes to dialog and changed functionality --- src/creator.coffee | 2 +- src/creator.html | 57 +++++++++-------- src/creator.scss | 156 ++++++++++++++++++++++++++++++--------------- 3 files changed, 136 insertions(+), 79 deletions(-) diff --git a/src/creator.coffee b/src/creator.coffee index af36b39..93834d7 100755 --- a/src/creator.coffee +++ b/src/creator.coffee @@ -194,7 +194,7 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.hideCover() $scope.hideCover = -> - $scope.showTitleDialog = $scope.showIntroDialog = false + $scope.showTitleDialog = $scope.showIntroDialog = $scope.questionBankDialog = false $scope.initNewWidget = (widget, baseUrl) -> $scope.$apply -> diff --git a/src/creator.html b/src/creator.html index 82049fc..1b96ccf 100644 --- a/src/creator.html +++ b/src/creator.html @@ -27,7 +27,12 @@

- +

Incorrect guesses per phrase

@@ -170,34 +175,10 @@

Phrase

{{currentPage+1}}/{{numberOfPages()}}
-
-
-
-
- Enable question bank? -
- - No - Yes - -
-
-
- - How many questions to ask? -
- - out of {{items.length}} -
-
-
-
- -
Click here to add your first question
-
+

Guess the Phrase

@@ -213,5 +194,29 @@

Guess the Phrase

+
+
+ Enable question bank? +
+ + No + Yes + +
+
+
+ + How many questions to ask? +
+ + out of {{items.length}} +
+
+
+ +
+ diff --git a/src/creator.scss b/src/creator.scss index 83c913d..0b9173e 100644 --- a/src/creator.scss +++ b/src/creator.scss @@ -483,6 +483,81 @@ button.add-question { } } +.questionBankDialog { + + position: fixed; + top: 50%; + left: 50%; + margin: 0; + transform: translate(-50%, -50%); + background-color: white; + padding: 0; + height: 200px; + width: 300px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + + input { + margin-top: 0; + padding: 0; + width: unset; + background: white; + font-size: 17px; + text-align: center; + border: none; + vertical-align: unset; + font-family: 'Lato'; + } + .num-input-wrapper { + display: flex; + justify-content: center; + width: 100%; + align-items: center; + margin-bottom: 15px; + + .numInput { + color: black; + outline: 1px solid black; + width: 35px; + margin: 2px 5px 0 0; + } + } + + .enable-qb-question { + margin-top: 15px; + margin-bottom: 15px; + + .enable-qb-options { + display: flex; + justify-content: center; + } + } + + .dialogCloseButton { + position: relative; + margin-top: 5px; + margin-bottom: 5px; + font-size: 15px; + width: 100px; + background-color: #70bd34; + color: black; + + &:hover { + background-color: #88df45; + border: 1px solid #88df45; + color: black; + cursor: pointer; + } + + &:disabled { + background-color: #cccccc; + color: white; + } + } +} + .arrow-box { position: absolute; background: #fbf767; @@ -622,9 +697,37 @@ button.add-question { .questionBankButton { position: absolute; - background-color: #5a5a5a; + background-color: $green; + color: #fff; + width: unset; right: 550px; top: 35px; + + &:hover { + background-color: #7AD038; + cursor: pointer; + } + + &:disabled { + background-color: #ccc; + border: 1px solid #ccc; + color: #fff; + cursor: not-allowed; + } + + &.gray-out:not(:disabled) { + background-color: #5a5a5a; + border: 1px solid #5a5a5a; + color: #fff; + + &:hover { + background-color: #938f8f; + border: 1px solid #938f8f; + cursor: pointer; + } + + } + } .attempts { @@ -780,57 +883,6 @@ button.add-question { } } -.questionBankDialog-wrapper { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - border: 5px solid greenyellow; - border-radius: 5px; - background-color: white; - color: black; - height: 300px; - width: 250px; - z-index: 10000; - display: flex; - justify-content: center; - align-items: center; - - .questionBankDialog { - margin: 15px; - - .numInput { - width: 30px; - margin-top: 10px; - } - - .enable-qb-question { - margin-top: 15px; - margin-bottom: 15px; - } - - } - - .dialogCloseButton { - position: absolute; - bottom: 10px; - background-color: rgb(26, 244, 171); - color: black; - } - -} - -// To blur the background while the dialog is open -.overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 9000; - backdrop-filter: blur(5px); - } - .question-tip { position: absolute; right: 28px; From ff0c079a9c56ae32157a52292dded5a6821f6436 Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Tue, 13 Feb 2024 16:17:23 -0500 Subject: [PATCH 08/10] visual improvements for the dialog and semantic html changes --- src/creator.coffee | 12 ++++++++++-- src/creator.html | 22 +++++++++++----------- src/creator.scss | 13 ++++++------- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/creator.coffee b/src/creator.coffee index 93834d7..847be2d 100755 --- a/src/creator.coffee +++ b/src/creator.coffee @@ -97,9 +97,10 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.partial = false $scope.random = false $scope.attempts = 5 - $scope.questionBankDialog = false + $scope.questionBankModal = false $scope.enableQuestionBank = false $scope.questionBankVal = 1 + $scope.questionBankValTemp = 1 # for use with paginating results $scope.currentPage = 0; @@ -194,7 +195,12 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.hideCover() $scope.hideCover = -> - $scope.showTitleDialog = $scope.showIntroDialog = $scope.questionBankDialog = false + $scope.showTitleDialog = $scope.showIntroDialog = $scope.questionBankModal = false + $scope.questionBankValTemp = $scope.questionBankVal + + $scope.validateQuestionBankVal = -> + if ($scope.questionBankValTemp >= 1 && $scope.questionBankValTemp <= $scope.items.length) + $scope.questionBankVal = $scope.questionBankValTemp $scope.initNewWidget = (widget, baseUrl) -> $scope.$apply -> @@ -207,6 +213,8 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.random = qset.options.random $scope.enableQuestionBank = if qset.options.enableQuestionBank then qset.options.enableQuestionBank else false $scope.questionBankVal = if qset.options.questionBankVal then qset.options.questionBankVal else 1 + $scope.questionBankValTemp = if qset.options.questionBankVal then qset.options.questionBankVal else 1 + $scope.onQuestionImportComplete qset.items[0].items $scope.$apply() diff --git a/src/creator.html b/src/creator.html index 1b96ccf..c5292ec 100644 --- a/src/creator.html +++ b/src/creator.html @@ -28,8 +28,8 @@

@@ -178,7 +178,7 @@

Phrase

Click here to add your first question
-
+

Guess the Phrase

@@ -194,28 +194,28 @@

Guess the Phrase

-
+
- Enable question bank? +
No - Yes + Yes
- How many questions to ask? +
- + out of {{items.length}}
- +
diff --git a/src/creator.scss b/src/creator.scss index 0b9173e..76590c0 100644 --- a/src/creator.scss +++ b/src/creator.scss @@ -483,7 +483,7 @@ button.add-question { } } -.questionBankDialog { +.question-bank-dialog { position: fixed; top: 50%; @@ -517,7 +517,7 @@ button.add-question { align-items: center; margin-bottom: 15px; - .numInput { + .num-input { color: black; outline: 1px solid black; width: 35px; @@ -527,7 +527,7 @@ button.add-question { .enable-qb-question { margin-top: 15px; - margin-bottom: 15px; + margin-bottom: 10px; .enable-qb-options { display: flex; @@ -535,10 +535,9 @@ button.add-question { } } - .dialogCloseButton { + .dialog-close-button { position: relative; - margin-top: 5px; - margin-bottom: 5px; + margin: 15 0 10 0; font-size: 15px; width: 100px; background-color: #70bd34; @@ -695,7 +694,7 @@ button.add-question { background: #fff; } - .questionBankButton { + .qb-button { position: absolute; background-color: $green; color: #fff; From 1d8e362f258d1dcf2cd2a319551d241bbaa49f5c Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Tue, 13 Feb 2024 16:19:42 -0500 Subject: [PATCH 09/10] Minor css changes --- src/creator.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/creator.scss b/src/creator.scss index 76590c0..80b1064 100644 --- a/src/creator.scss +++ b/src/creator.scss @@ -490,7 +490,7 @@ button.add-question { left: 50%; margin: 0; transform: translate(-50%, -50%); - background-color: white; + background-color: #ffffff; padding: 0; height: 200px; width: 300px; @@ -503,7 +503,7 @@ button.add-question { margin-top: 0; padding: 0; width: unset; - background: white; + background: #ffffff; font-size: 17px; text-align: center; border: none; @@ -552,7 +552,7 @@ button.add-question { &:disabled { background-color: #cccccc; - color: white; + color: #ffffff; } } } From 4bf05a0ab78dbf789056806d4447187040846641 Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Tue, 27 Feb 2024 17:27:51 -0500 Subject: [PATCH 10/10] Added tooltip for QB functionality and tweaked some css --- src/creator.html | 13 +++++++++++-- src/creator.scss | 27 +++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/creator.html b/src/creator.html index c5292ec..9867e38 100644 --- a/src/creator.html +++ b/src/creator.html @@ -58,8 +58,16 @@

Randomize Order

- - + + +
+
? +
+

+ If Question Bank is on then the check to randomize order is disabled. This is because the question bank + randomizes the question order already. +

+

Partial scoring

@@ -213,6 +221,7 @@

Guess the Phrase

+

If question bank is enabled, questions will be randomized.

diff --git a/src/creator.scss b/src/creator.scss index 80b1064..0479c57 100644 --- a/src/creator.scss +++ b/src/creator.scss @@ -515,7 +515,7 @@ button.add-question { justify-content: center; width: 100%; align-items: center; - margin-bottom: 15px; + margin-bottom: 5px; .num-input { color: black; @@ -534,6 +534,11 @@ button.add-question { justify-content: center; } } + .qb-warning { + font-size: 14px; + margin: 0; + text-align: center; + } .dialog-close-button { position: relative; @@ -699,7 +704,7 @@ button.add-question { background-color: $green; color: #fff; width: unset; - right: 550px; + right: 590px; top: 35px; &:hover { @@ -731,7 +736,7 @@ button.add-question { .attempts { position: absolute; - right: 355px; + right: 395px; cursor: pointer; top:0px; @@ -874,10 +879,17 @@ button.add-question { .random { position: absolute; top: 0px; - right: 185px; + right: 225px; font-family: "Lato"; + label.checktoggle { left: 24px; + + &.disabled-look { + background-color: #676363; + opacity: 0.5; + cursor: not-allowed; + } } } } @@ -898,6 +910,9 @@ button.add-question { transition: all 0.15s ease; + &.randomizer-tip { + right: 190px; + } &:hover { opacity: 1; background: #53a1d1; @@ -961,6 +976,10 @@ button.add-question { } } + &.randomize-tooltip { + right: 180px; + } + } .answer {