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

+ ng-disabled="tutorial.step && tutorial.step < 5"> @@ -272,8 +272,8 @@

The incorrect choice

@@ -288,9 +288,9 @@

The incorrect choice

+ ng-disabled="tutorial.step && tutorial.step < 7">
@@ -303,18 +303,18 @@

The incorrect choice

placeholder="Incorrect answer" maxlength="412" required - ng-change="validation('change', currIndex); tutorialIncrement(7); tutorialIncrement(8)" + ng-change="validation('change', currIndex); tutorialIncrement(7)" ng-model="questions[currIndex].incorrect.value" ng-blur="questions[currIndex].incorrect.alt = questions[currIndex].incorrect.value" - ng-disabled="tutorial.step && tutorial.step < 7"> + ng-disabled="tutorial.step && tutorial.step < 6">