Rename solution_revealed to correction_visible
Needed a rename for clarification, because a feature will be added to actually show the final solution.
This commit is contained in:
parent
49f87908c4
commit
8a578e44ed
@ -39,7 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<div class="helptext" v-if="!all_inserted || solution_revealed">{{ helptext }}</div>
|
<div class="helptext" v-if="!all_inserted || correction_visible">{{ helptext }}</div>
|
||||||
<button v-if="revealing_text != null" v-on:click="reveal_solution">{{ revealing_text }}</button>
|
<button v-if="revealing_text != null" v-on:click="reveal_solution">{{ revealing_text }}</button>
|
||||||
<button v-if="next_column_text != null" v-on:click="open_next_column">{{ next_column_text }}</button>
|
<button v-if="next_column_text != null" v-on:click="open_next_column">{{ next_column_text }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
14
quiz.js
14
quiz.js
@ -186,11 +186,11 @@ var app = new Vue({
|
|||||||
items: shuffle_cards(0),
|
items: shuffle_cards(0),
|
||||||
},
|
},
|
||||||
solution: [],
|
solution: [],
|
||||||
solution_revealed: false,
|
correction_visible: false,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
helptext: function() {
|
helptext: function() {
|
||||||
if (this.solution_revealed) {
|
if (this.correction_visible) {
|
||||||
if (this.solution_correct) {
|
if (this.solution_correct) {
|
||||||
return [
|
return [
|
||||||
"Perfekt! Die Reihenfolge ist korrekt.",
|
"Perfekt! Die Reihenfolge ist korrekt.",
|
||||||
@ -223,7 +223,7 @@ var app = new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
revealing_text: function() {
|
revealing_text: function() {
|
||||||
if (this.all_inserted && !this.solution_revealed) {
|
if (this.all_inserted && !this.correction_visible) {
|
||||||
if (this.store.section == 0) {
|
if (this.store.section == 0) {
|
||||||
return "Reihenfolge prüfen";
|
return "Reihenfolge prüfen";
|
||||||
} else {
|
} else {
|
||||||
@ -261,7 +261,7 @@ var app = new Vue({
|
|||||||
return this.store.section == 0 && this.store.selected != null;
|
return this.store.section == 0 && this.store.selected != null;
|
||||||
},
|
},
|
||||||
incorrects: function() {
|
incorrects: function() {
|
||||||
if (!this.solution_revealed) {
|
if (!this.correction_visible) {
|
||||||
return this.solution.map(elem => false);
|
return this.solution.map(elem => false);
|
||||||
}
|
}
|
||||||
if (this.store.section == 0) {
|
if (this.store.section == 0) {
|
||||||
@ -275,7 +275,7 @@ var app = new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
solution_correct: function() {
|
solution_correct: function() {
|
||||||
return this.solution_revealed && this.all_inserted && !this.incorrects.includes(true);
|
return this.correction_visible && this.all_inserted && !this.incorrects.includes(true);
|
||||||
},
|
},
|
||||||
reduced_store: function() {
|
reduced_store: function() {
|
||||||
let width = 2;
|
let width = 2;
|
||||||
@ -345,13 +345,13 @@ var app = new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
reveal_solution: function() {
|
reveal_solution: function() {
|
||||||
this.solution_revealed = true;
|
this.correction_visible = true;
|
||||||
},
|
},
|
||||||
open_next_column: function() {
|
open_next_column: function() {
|
||||||
this.store.section++;
|
this.store.section++;
|
||||||
this.store.selected = null;
|
this.store.selected = null;
|
||||||
this.store.items = shuffle_cards(this.store.section);
|
this.store.items = shuffle_cards(this.store.section);
|
||||||
this.solution_revealed = false;
|
this.correction_visible = false;
|
||||||
},
|
},
|
||||||
add_card_to: function(row) {
|
add_card_to: function(row) {
|
||||||
this.solution[row].idx.push(this.store.selected);
|
this.solution[row].idx.push(this.store.selected);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user