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');
|
||||
// // });
|
||||
//
|
||||
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.startGraphQLCapture();
|
||||
cy.route('POST', '/api/graphql/').as('graphQL');
|
||||
|
|
|
|||
|
|
@ -34,14 +34,15 @@
|
|||
|
||||
<div class="module-navigation__toggle-menu">
|
||||
<toggle-editing></toggle-editing>
|
||||
</div>
|
||||
|
||||
<!--toggle-solutions-for-module
|
||||
<toggle-solutions-for-module
|
||||
v-if="onModulePage && module.id"
|
||||
:module="module.id"
|
||||
:enabled="module.solutionsEnabled"
|
||||
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>
|
||||
|
||||
</template>
|
||||
|
|
@ -163,6 +164,8 @@
|
|||
|
||||
&__toggle-menu {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
<template>
|
||||
<div class="toggle-editing">
|
||||
<checkbox label="Modul anpassen" :checked="checked" @input="toggle"></checkbox>
|
||||
</div>
|
||||
<checkbox class="toggle-editing" label="Modul anpassen" :checked="checked" @input="toggle"></checkbox>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Checkbox from '@/components/Checkbox';
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
import {mapGetters, mapActions} from 'vuex';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
const variables = {
|
||||
id: module
|
||||
};
|
||||
console.log(variables);
|
||||
const query = MODULE_QUERY;
|
||||
const data = store.readQuery({query, variables});
|
||||
data.module.solutionsEnabled = solutionsEnabled;
|
||||
|
|
|
|||
Loading…
Reference in New Issue