Skip to content

Commit

Permalink
Merge pull request #58 from ucfopen/dev/2.3.0
Browse files Browse the repository at this point in the history
Dev/2.3.0
  • Loading branch information
clpetersonucf authored Dec 11, 2024
2 parents e9bba94 + c51708c commit 8a97f0b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/controllers/creator.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions src/controllers/player.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Enigma.controller 'enigmaPlayerCtrl', ['$scope', '$timeout', '$sce', ($scope, $t

$scope.showTutorial = true

$scope.delayedHeaderInit = false

$scope.instructionsOpen = false
$scope.questionInstructionsOpen = false

Expand Down Expand Up @@ -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]
Expand Down
6 changes: 6 additions & 0 deletions src/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
5 changes: 2 additions & 3 deletions src/player.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@
</div>
<button id="tutorial-modal-dismiss" class="button modal-dismiss" ng-click="dismissTutorial()" aria-describedby="tutorial-content">Start</button>
</dialog>
<div id="modal-cover" ng-show="showTutorial"></div>
<div id="modal-cover" ng-show="showTutorial" ng-click="dismissTutorial()"></div>
<header aria-hidden="{{ finalTab ? 'true' : 'false' }}"
id="header"
ng-attr-inert="{{ showTutorial || currentQuestion || instructionsOpen == true || finalTab ? 'true' : undefined}}"
ng-show="delayedHeaderInit">
ng-attr-inert="{{ showTutorial || currentQuestion || instructionsOpen == true || finalTab ? 'true' : undefined}}">
<h1>{{ title }}</h1>
<div class='divider'>
<span id="show-keyboard-instructions-button"
Expand Down
50 changes: 24 additions & 26 deletions src/player.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ $dblue: #1a2b3f;
}

html {
height: 100vh;
overflow: auto;
height: auto;
overflow: visible;
}

body {
position: relative;
height: 100vh;
overflow: hidden;
height: auto;
min-height: 548px;
overflow: visible;
display: flex;
flex-direction: column;
justify-content: flex-start;
}

html, body {
Expand All @@ -62,15 +66,20 @@ html, body {
}

.invisible-until-focused {
position: absolute;
bottom: 15px;
opacity: 0;
height: 0;
width: 0;
padding: 0.5em;
text-align: center;
pointer-events: none;

&:focus {
opacity: 1;
height: auto;
width: auto;
height: 2em;
width: 90%;
left: 3%;
background: #eff0f2;
border: 3px solid #697393;
}
}

Expand Down Expand Up @@ -131,11 +140,10 @@ dialog.modal-dialog {
}

header {
position: fixed;
top: 0;
z-index: 1;
display: flex;
flex-direction:column;
justify-content: flex-start;
width: 100%;
height: 115px;
background: $blue;
color: #fff;
background: -moz-linear-gradient(top, $blue 0%, $dblue 100%);
Expand All @@ -147,14 +155,12 @@ header {
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='${blue}', endColorstr='${dblue}',GradientType=0 );

h1 {
line-height: 50px;
height: 50px;
width: calc(100% - 14px);
margin: 25px 0 0;
padding: 0;
margin-left: 14px;
position: absolute;
overflow: hidden;
width: 77%;

line-height: 4rem;
font-size: 25px;
font-weight: normal;
span {
Expand Down Expand Up @@ -210,7 +216,6 @@ header {
.divider {
background-color: #4d5355;
height: 25px;
position: absolute;
top: 90px;
width: 100%;
padding-left: 10px;
Expand All @@ -228,8 +233,7 @@ header {
}

.gameboard {
padding: 5px;
margin: 120px 0 0 0;
padding: 5px 5px 2em 5px;
@include boxSizing();
.category {
clear:both;
Expand Down Expand Up @@ -336,12 +340,6 @@ header {
}
}
}

.invisible-until-focused:focus {
background: #eff0f2;
border: 3px solid #697393;
padding: 20px 10px;
}
}

#t-question-page:focus {
Expand Down

0 comments on commit 8a97f0b

Please sign in to comment.