diff --git a/src/controllers/ctl-creator.js b/src/controllers/ctl-creator.js
index d7e9e68..03753dd 100644
--- a/src/controllers/ctl-creator.js
+++ b/src/controllers/ctl-creator.js
@@ -16,11 +16,9 @@ export const ControllerThisOrThatCreator = function($scope, $timeout, $sanitize,
'Pick the answer type',
'CORRECT_ITEM_SELECT',
'CORRECT_ITEM_DESCRIPTION',
- 'Enter some optional feedback',
'Pick the answer type',
'INCORRECT_ITEM_SELECT',
'INCORRECT_ITEM_DESCRIPTION',
- 'Enter some optional feedback',
'Add another question'
]
}
@@ -329,11 +327,11 @@ export const ControllerThisOrThatCreator = function($scope, $timeout, $sanitize,
}
}
- $scope.tutorialIncrement(sideIndex ? 6 : 2)
+ $scope.tutorialIncrement(sideIndex ? 5 : 2)
switch (type) {
case 'image':
- $scope.tutorial.text[sideIndex ? 6 : 2] = `Upload the ${sideIndex ? 'in' : ''}correct image`
- $scope.tutorial.text[sideIndex ? 7 : 3] = `Describe the ${sideIndex ? 'in' : ''}correct image`
+ $scope.tutorial.text[sideIndex ? 5 : 2] = `Upload the ${sideIndex ? 'in' : ''}correct image`
+ $scope.tutorial.text[sideIndex ? 6 : 3] = `Describe the ${sideIndex ? 'in' : ''}correct image`
break
case 'text':
if (side == $scope.CORRECT) {
@@ -343,16 +341,16 @@ export const ControllerThisOrThatCreator = function($scope, $timeout, $sanitize,
{
$scope.questions[currIndex].incorrect.alt = '-'
}
- $scope.tutorial.text[sideIndex ? 6 : 2] = `Enter the ${sideIndex ? 'in' : ''}correct answer`
- $scope.tutorial.text[sideIndex ? 7 : 3] = ``
+ $scope.tutorial.text[sideIndex ? 5 : 2] = `Enter the ${sideIndex ? 'in' : ''}correct answer`
+ $scope.tutorial.text[sideIndex ? 6 : 3] = ``
break
case 'audio':
- $scope.tutorial.text[sideIndex ? 6 : 2] = `Upload the ${sideIndex ? 'in' : ''}correct audio`
- $scope.tutorial.text[sideIndex ? 7 : 3] = `Describe the ${sideIndex ? 'in' : ''}correct audio`
+ $scope.tutorial.text[sideIndex ? 5 : 2] = `Upload the ${sideIndex ? 'in' : ''}correct audio`
+ $scope.tutorial.text[sideIndex ? 6 : 3] = `Describe the ${sideIndex ? 'in' : ''}correct audio`
break
case 'video':
- $scope.tutorial.text[sideIndex ? 6 : 2] = `Link the ${sideIndex ? 'in' : ''}correct video`
- $scope.tutorial.text[sideIndex ? 7 : 3] = `Describe the ${sideIndex ? 'in' : ''}correct video`
+ $scope.tutorial.text[sideIndex ? 5 : 2] = `Link the ${sideIndex ? 'in' : ''}correct video`
+ $scope.tutorial.text[sideIndex ? 6 : 3] = `Describe the ${sideIndex ? 'in' : ''}correct video`
break
}
}
@@ -537,13 +535,13 @@ export const ControllerThisOrThatCreator = function($scope, $timeout, $sanitize,
$scope.tutorialIncrement = function(step) {
if ($scope.tutorial.step > 0) {
- if (step == $scope.tutorial.step)
+ if (step >= $scope.tutorial.step)
{
- if (step == 11) {
+ if (step == 9) {
return $scope.tutorial.step = null
}
else {
- return $scope.tutorial.step++
+ return $scope.tutorial.step = step + 1
}
}
} else {
diff --git a/src/creator.html b/src/creator.html
index 1068097..14c9c18 100755
--- a/src/creator.html
+++ b/src/creator.html
@@ -222,9 +222,9 @@
The correct choice
ng-if="questions[currIndex].correct.type != null"
placeholder="Optional feedback for a correct answer"
class="feedback"
- ng-change="validation('change', currIndex); tutorialIncrement(5);"
+ ng-change="validation('change', currIndex)"
ng-model="questions[currIndex].correct.options.feedback"
- ng-disabled="tutorial.step && tutorial.step < 5">
+ ng-disabled="tutorial.step && tutorial.step < 4">
@@ -233,24 +233,24 @@ The incorrect choice
{{tutorial.text[tutorial.step - 1]}}
@@ -423,15 +423,15 @@ The incorrect choice
class="rearrange-questions btn green"
aria-label="Rearrange Questions"
ng-click="dialog.rearrange = true"
- ng-disabled="randomizeOrder || (tutorial.step && tutorial.step < 10) || questions.length < 2">
+ ng-disabled="randomizeOrder || (tutorial.step && tutorial.step < 8) || questions.length < 2">
Rearrange Questions
diff --git a/src/creator.scss b/src/creator.scss
index 87d06ff..f6b40fa 100755
--- a/src/creator.scss
+++ b/src/creator.scss
@@ -366,71 +366,57 @@ input[type='text'] {
border-width: 8px;
margin: -8px 0 0 0;
}
-
+ // question
&.step1 {
top: 75px;
left: 390px;
opacity: 1;
animation: pounce-down 1s infinite;
}
-
+ // correct item type
&.step2 {
top: 405px;
left: 129px;
opacity: 1;
animation: pounce-down 1s infinite;
}
-
+ // correct item selection (image | text | audio | video)
&.step3 {
top: 405px;
left: 115px;
opacity: 1;
animation: pounce-down 1s infinite;
}
-
+ // correct item description
&.step4 {
top: 465px;
left: 105px;
opacity: 1;
animation: pounce-down 1s infinite;
}
-
+ // incorrect item type
&.step5 {
- top: 530px;
- left: 105px;
- opacity: 1;
- animation: pounce-down 1s infinite;
- }
-
- &.step6 {
top: 405px;
right: 130px;
opacity: 1;
animation: pounce-down 1s infinite;
}
-
- &.step7 {
+ // incorrect item selection (image | text | audio | video)
+ &.step6 {
top: 405px;
right: 105px;
opacity: 1;
animation: pounce-down 1s infinite;
}
-
- &.step8 {
+ // incorrect item description
+ &.step7 {
top: 465px;
right: 105px;
opacity: 1;
animation: pounce-down 1s infinite;
}
- // Feedback for incorrect
- &.step9 {
- top: 530px;
- right: 105px;
- opacity: 1;
- animation: pounce-down 1s infinite;
- }
// Add question
- &.step10 {
+ &.step8 {
right: 135px;
opacity: 1;
animation: pounce-left 1s infinite;
diff --git a/src/creator.test.js b/src/creator.test.js
index 103fcf5..9cfa12b 100644
--- a/src/creator.test.js
+++ b/src/creator.test.js
@@ -189,8 +189,6 @@ describe('Creator Controller', function() {
expect($scope.tutorial.step).toBe(2)
$scope.tutorialIncrement(1)
expect($scope.tutorial.step).toBe(2)
- $scope.tutorialIncrement(6)
- expect($scope.tutorial.step).toBe(2)
$scope.tutorialIncrement(2)
expect($scope.tutorial.step).toBe(3)
@@ -228,18 +226,8 @@ describe('Creator Controller', function() {
expect($scope.tutorial.step).toBe(9)
$scope.tutorialIncrement(9)
- expect($scope.tutorial.step).toBe(10)
- $scope.tutorialIncrement(9)
- expect($scope.tutorial.step).toBe(10)
-
- $scope.tutorialIncrement(10)
- expect($scope.tutorial.step).toBe(11)
- $scope.tutorialIncrement(10)
- expect($scope.tutorial.step).toBe(11)
-
- $scope.tutorialIncrement(11)
expect($scope.tutorial.step).toBeNull()
- $scope.tutorialIncrement(11)
+ $scope.tutorialIncrement(9)
expect($scope.tutorial.step).toBeNull()
})