diff --git a/client/src/components/content-blocks/assignment/SpellCheck.vue b/client/src/components/content-blocks/assignment/SpellCheck.vue index c72aefc3..31d59692 100644 --- a/client/src/components/content-blocks/assignment/SpellCheck.vue +++ b/client/src/components/content-blocks/assignment/SpellCheck.vue @@ -22,8 +22,7 @@ parts.push({ correct: true, text: this.text.substring(index, realOffset) - }); - parts.push({ + }, { correct: false, text: this.text.substring(realOffset, realOffset + current.length) }); diff --git a/client/src/components/content-blocks/assignment/SubmissionForm.vue b/client/src/components/content-blocks/assignment/SubmissionForm.vue index 96945c18..cdff5d19 100644 --- a/client/src/components/content-blocks/assignment/SubmissionForm.vue +++ b/client/src/components/content-blocks/assignment/SubmissionForm.vue @@ -16,9 +16,10 @@ @click="$emit('turnIn')" >{{action}} -
@@ -53,13 +54,6 @@ import DocumentBlock from '@/components/content-blocks/DocumentBlock'; export default { - components: { - SubmissionInput, - FinalSubmission, - SimpleFileUpload, - DocumentBlock - }, - props: { userInput: Object, saved: Boolean, @@ -68,12 +62,19 @@ reopen: Function, document: String, spellcheck: { - tyoe: Boolean, + type: Boolean, default: false }, sharedMsg: String }, + components: { + SubmissionInput, + FinalSubmission, + SimpleFileUpload, + DocumentBlock + }, + computed: { final() { return !!this.userInput && this.userInput.final diff --git a/server/spellcheck/client.py b/server/spellcheck/client.py index 563a5ee7..f9a20a93 100644 --- a/server/spellcheck/client.py +++ b/server/spellcheck/client.py @@ -7,6 +7,9 @@ import requests # client = TaskbaseClient('info@iterativ.ch', 'myverysafepassword1234', 'https://dev-iterativ.taskbase.com') # client.spellcheck('aOciP9H7tNu7pLsR4ohllk', 'Dies ist ein Sats mit filen Felern') +class TaskbaseException(Exception): + pass + class TaskbaseClient: # def __init__(self, resource_url): # # resource url should be in the form https://username:password@baseurl @@ -59,9 +62,9 @@ class TaskbaseClient: headers=headers) if response.status_code != 200: - raise Exception('Something went wrong') + raise TaskbaseException('Something went wrong') else: # todo: define what to do here - raise Exception('Something went wrong') + raise TaskbaseException('Something went wrong') def spellcheck(self, task, text): if self.token is None: