From 680b78e90420633367806512937e076adad13342 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 10 Feb 2020 15:37:03 +0100 Subject: [PATCH 1/3] Only show instruments that are live and not only a draft --- server/basicknowledge/queries.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/basicknowledge/queries.py b/server/basicknowledge/queries.py index 8f3f6a20..8fd40684 100644 --- a/server/basicknowledge/queries.py +++ b/server/basicknowledge/queries.py @@ -39,3 +39,6 @@ class BasicKnowledgeQuery(object): if slug is not None: return BasicKnowledge.objects.get(slug=slug) return None + + def resolve_instruments(self, info, **kwargs): + return BasicKnowledge.objects.all().live() From 919c0aec18b3b0d32924e01888eb75023ea037e4 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 12 Feb 2020 10:37:34 +0100 Subject: [PATCH 2/3] Add loading message for spellcheck --- .../content-blocks/assignment/Assignment.vue | 7 ++++++- .../assignment/SubmissionForm.vue | 21 ++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/client/src/components/content-blocks/assignment/Assignment.vue b/client/src/components/content-blocks/assignment/Assignment.vue index 42166111..9bc2b8b3 100644 --- a/client/src/components/content-blocks/assignment/Assignment.vue +++ b/client/src/components/content-blocks/assignment/Assignment.vue @@ -15,6 +15,7 @@ @changeDocumentUrl="changeDocumentUrl" @spellcheck="spellcheck" :user-input="submission" + :spellcheck-loading="spellcheckLoading" placeholder="Ergebnis erfassen" action="Ergebnis mit Lehrperson teilen" shared-msg="Das Ergebnis wurde mit der Lehrperson geteilt." @@ -191,6 +192,7 @@ }, spellcheck() { let self = this; + this.spellcheckLoading = true; this.$apollo.mutate({ mutation: SPELL_CHECK_MUTATION, variables: { @@ -202,6 +204,8 @@ update(store, {data: {spellCheck: {results}}}) { self.corrections = results; } + }).then(() => { + this.spellcheckLoading = false; }); } }, @@ -239,7 +243,8 @@ inputType: 'text', unsaved: false, saving: 0, - corrections: '' + corrections: '', + spellcheckLoading: false } } } diff --git a/client/src/components/content-blocks/assignment/SubmissionForm.vue b/client/src/components/content-blocks/assignment/SubmissionForm.vue index cdff5d19..985131bb 100644 --- a/client/src/components/content-blocks/assignment/SubmissionForm.vue +++ b/client/src/components/content-blocks/assignment/SubmissionForm.vue @@ -20,7 +20,7 @@ class="submission-form-container__submit submission-form-container__spellcheck button button--primary button--white-bg" v-if="spellcheck" @click="$emit('spellcheck')" - >Rechtschreibung prüfen + >{{spellcheckText}}
From a74fe9d7b0fdc5d710ca6d17af86c352a23b8c4e Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 24 Feb 2020 10:42:04 +0100 Subject: [PATCH 3/3] Fix pipelines --- bitbucket-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 6ea5f116..f79eaf72 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -14,6 +14,8 @@ definitions: services: postgres: image: postgres + variables: + POSTGRES_HOST_AUTH_METHOD: trust aliases: - &unittest-python