Re-add solution toggle to module navigation bar
This commit is contained in:
parent
5bdf5d53ee
commit
cb76318601
|
|
@ -7,7 +7,7 @@ describe('Solutions', () => {
|
||||||
// // cy.visit('/module/lohn-und-budget');
|
// // cy.visit('/module/lohn-und-budget');
|
||||||
// // });
|
// // });
|
||||||
//
|
//
|
||||||
it.skip('toggles the solution as teacher, then the student can display it', () => {
|
it('toggles the solution as teacher, then the student can display it', () => {
|
||||||
cy.exec("python ../server/manage.py hidesolutions");
|
cy.exec("python ../server/manage.py hidesolutions");
|
||||||
cy.startGraphQLCapture();
|
cy.startGraphQLCapture();
|
||||||
cy.route('POST', '/api/graphql/').as('graphQL');
|
cy.route('POST', '/api/graphql/').as('graphQL');
|
||||||
|
|
|
||||||
|
|
@ -34,14 +34,15 @@
|
||||||
|
|
||||||
<div class="module-navigation__toggle-menu">
|
<div class="module-navigation__toggle-menu">
|
||||||
<toggle-editing></toggle-editing>
|
<toggle-editing></toggle-editing>
|
||||||
</div>
|
<toggle-solutions-for-module
|
||||||
|
|
||||||
<!--toggle-solutions-for-module
|
|
||||||
v-if="onModulePage && module.id"
|
v-if="onModulePage && module.id"
|
||||||
:module="module.id"
|
:module="module.id"
|
||||||
:enabled="module.solutionsEnabled"
|
:enabled="module.solutionsEnabled"
|
||||||
class="module-navigation__solution-toggle"
|
class="module-navigation__solution-toggle"
|
||||||
data-cy="toggle-enable-solutions"></toggle-solutions-for-module-->
|
data-cy="toggle-enable-solutions"></toggle-solutions-for-module>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -163,6 +164,8 @@
|
||||||
|
|
||||||
&__toggle-menu {
|
&__toggle-menu {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="toggle-editing">
|
<checkbox class="toggle-editing" label="Modul anpassen" :checked="checked" @input="toggle"></checkbox>
|
||||||
<checkbox label="Modul anpassen" :checked="checked" @input="toggle"></checkbox>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Checkbox from '@/components/Checkbox';
|
import Checkbox from '@/components/Checkbox';
|
||||||
import { mapGetters, mapActions } from 'vuex';
|
import {mapGetters, mapActions} from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@
|
||||||
const variables = {
|
const variables = {
|
||||||
id: module
|
id: module
|
||||||
};
|
};
|
||||||
console.log(variables);
|
|
||||||
const query = MODULE_QUERY;
|
const query = MODULE_QUERY;
|
||||||
const data = store.readQuery({query, variables});
|
const data = store.readQuery({query, variables});
|
||||||
data.module.solutionsEnabled = solutionsEnabled;
|
data.module.solutionsEnabled = solutionsEnabled;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue