Skip to content

Commit

Permalink
Merge pull request #18 from isa-group/feature/#12-ImprovementsInSessi…
Browse files Browse the repository at this point in the history
…onAdmin

Feature/#12 improvements in session admin
  • Loading branch information
davbrican authored Jul 8, 2021
2 parents e1834fd + 82b328c commit 3f15c96
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions src/pages/ExerciseConfiguration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,26 +158,29 @@
>
Inputs / Solutions:
</label>
<div v-for="(item, index) in loopSolutions" :key="item">

<div v-for="(item, index) in inputsSolutions[this.selectedExerciseIndex]" :key="item">
<div>
<label style="font-weight: bold;" for="item">Input {{ index +1}}: </label>
<input
class="ml-2 appearance-none border rounded py-2 px-3 w-40 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
id="input"
v-model="
tests[selectedTest].exercises[selectedExerciseIndex].inputs[index]
"
/>
class="ml-2 appearance-none border rounded py-2 px-3 w-40 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
id="input"
v-model="
tests[selectedTest].exercises[selectedExerciseIndex].inputs[index]
"
/>
<label style="font-weight: bold;" for="item">Solution {{ index +1}}: </label>
<input
class="ml-2 appearance-none border rounded py-2 px-3 w-40 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
id="solution"
v-model="
tests[selectedTest].exercises[selectedExerciseIndex].solutions[index]
"
/>
class="ml-2 appearance-none border rounded py-2 px-3 w-40 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
id="solution"
v-model="
tests[selectedTest].exercises[selectedExerciseIndex].solutions[index]
"
/>
</div>
</div>


</div>
<div class="mt-4 max-w-xl mx-auto">
<label
Expand Down Expand Up @@ -266,7 +269,7 @@ export default {
},
data() {
return {
loopSolutions: [],
inputsSolutions: [],
loopText: "",
participants: [],
orderedTests: [],
Expand Down Expand Up @@ -366,11 +369,10 @@ export default {
this.orderedTests = orderedTests;
}
this.tests = tests;
if (this.loopSolutions.length == 0) {
for (let i = 0; i < this.tests[this.selectedTest].exercises[this.selectedExerciseIndex].solutions.length; i++) {
this.loopSolutions.push(this.tests[this.selectedTest].exercises[this.selectedExerciseIndex].solutions[i]);
}
this.inputsSolutions = []
for (let i = 0; i < this.tests[this.selectedTest].exercises.length; i++) {
this.inputsSolutions.push(this.tests[this.selectedTest].exercises[i].solutions);
}
});
Expand Down

0 comments on commit 3f15c96

Please sign in to comment.