Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
callidus
Machina Callida
Commits
67289414
Commit
67289414
authored
Dec 16, 2020
by
Konstantin Schulz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added the Vischer vocabulary; and deep link navigation for the ranking page
parent
57a15c03
Pipeline
#14637
passed with stages
in 3 minutes and 14 seconds
Changes
45
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
6642 additions
and
288 deletions
+6642
-288
mc_backend/mcserver/app/api/fileAPI.py
mc_backend/mcserver/app/api/fileAPI.py
+7
-7
mc_backend/mcserver/app/assets/vocabulary/vocabulary_ancient_greek_latin_dependency_treebank.json
...y/vocabulary_ancient_greek_latin_dependency_treebank.json
+0
-0
mc_backend/mcserver/app/assets/vocabulary/vocabulary_bamberg_core.json
...server/app/assets/vocabulary/vocabulary_bamberg_core.json
+0
-0
mc_backend/mcserver/app/assets/vocabulary/vocabulary_proiel_treebank.json
...ver/app/assets/vocabulary/vocabulary_proiel_treebank.json
+0
-0
mc_backend/mcserver/app/assets/vocabulary/vocabulary_vischer.json
...nd/mcserver/app/assets/vocabulary/vocabulary_vischer.json
+5837
-0
mc_backend/mcserver/app/assets/vocabulary/vocabulary_viva.json
...ckend/mcserver/app/assets/vocabulary/vocabulary_viva.json
+0
-0
mc_backend/mcserver/app/models.py
mc_backend/mcserver/app/models.py
+1
-0
mc_backend/mcserver/app/services/customCorpusService.py
mc_backend/mcserver/app/services/customCorpusService.py
+1
-1
mc_backend/mcserver/app/services/fileService.py
mc_backend/mcserver/app/services/fileService.py
+1
-1
mc_backend/mcserver/config.py
mc_backend/mcserver/config.py
+2
-0
mc_backend/mcserver/mcserver_api.yaml
mc_backend/mcserver/mcserver_api.yaml
+1
-18
mc_backend/openapi/openapi_server/models/__init__.py
mc_backend/openapi/openapi_server/models/__init__.py
+1
-1
mc_backend/openapi/openapi_server/models/file_form.py
mc_backend/openapi/openapi_server/models/file_form.py
+150
-0
mc_backend/openapi/openapi_server/models/file_form_all_of.py
mc_backend/openapi/openapi_server/models/file_form_all_of.py
+150
-0
mc_backend/openapi/openapi_server/models/vocabulary_mc.py
mc_backend/openapi/openapi_server/models/vocabulary_mc.py
+1
-0
mc_backend/openapi/openapi_server/openapi/openapi.yaml
mc_backend/openapi/openapi_server/openapi/openapi.yaml
+23
-48
mc_backend/openapi_models.yaml
mc_backend/openapi_models.yaml
+21
-2
mc_frontend/openapi/model/fileForm.ts
mc_frontend/openapi/model/fileForm.ts
+33
-0
mc_frontend/openapi/model/fileFormAllOf.ts
mc_frontend/openapi/model/fileFormAllOf.ts
+33
-0
mc_frontend/openapi/model/models.ts
mc_frontend/openapi/model/models.ts
+1
-1
mc_frontend/openapi/model/vocabularyMC.ts
mc_frontend/openapi/model/vocabularyMC.ts
+3
-2
mc_frontend/src/app/author/author.page.html
mc_frontend/src/app/author/author.page.html
+0
-1
mc_frontend/src/app/corpus.service.spec.ts
mc_frontend/src/app/corpus.service.spec.ts
+7
-0
mc_frontend/src/app/corpus.service.ts
mc_frontend/src/app/corpus.service.ts
+9
-0
mc_frontend/src/app/exercise.service.spec.ts
mc_frontend/src/app/exercise.service.spec.ts
+38
-2
mc_frontend/src/app/exercise.service.ts
mc_frontend/src/app/exercise.service.ts
+36
-0
mc_frontend/src/app/helper.service.spec.ts
mc_frontend/src/app/helper.service.spec.ts
+37
-0
mc_frontend/src/app/helper.service.ts
mc_frontend/src/app/helper.service.ts
+14
-0
mc_frontend/src/app/models/enum.ts
mc_frontend/src/app/models/enum.ts
+2
-1
mc_frontend/src/app/models/mockMC.ts
mc_frontend/src/app/models/mockMC.ts
+2
-0
mc_frontend/src/app/models/vocabularyCheckParams.ts
mc_frontend/src/app/models/vocabularyCheckParams.ts
+8
-0
mc_frontend/src/app/preview/preview.page.html
mc_frontend/src/app/preview/preview.page.html
+5
-3
mc_frontend/src/app/preview/preview.page.spec.ts
mc_frontend/src/app/preview/preview.page.spec.ts
+6
-20
mc_frontend/src/app/preview/preview.page.ts
mc_frontend/src/app/preview/preview.page.ts
+1
-50
mc_frontend/src/app/ranking/ranking.page.html
mc_frontend/src/app/ranking/ranking.page.html
+23
-1
mc_frontend/src/app/ranking/ranking.page.spec.ts
mc_frontend/src/app/ranking/ranking.page.spec.ts
+18
-1
mc_frontend/src/app/ranking/ranking.page.ts
mc_frontend/src/app/ranking/ranking.page.ts
+31
-4
mc_frontend/src/app/show-text/show-text.page.ts
mc_frontend/src/app/show-text/show-text.page.ts
+22
-18
mc_frontend/src/app/vocabulary-check/vocabulary-check.page.html
...ntend/src/app/vocabulary-check/vocabulary-check.page.html
+3
-2
mc_frontend/src/app/vocabulary-check/vocabulary-check.page.spec.ts
...nd/src/app/vocabulary-check/vocabulary-check.page.spec.ts
+0
-35
mc_frontend/src/app/vocabulary-check/vocabulary-check.page.ts
...rontend/src/app/vocabulary-check/vocabulary-check.page.ts
+1
-64
mc_frontend/src/app/vocabulary.service.spec.ts
mc_frontend/src/app/vocabulary.service.spec.ts
+37
-1
mc_frontend/src/app/vocabulary.service.ts
mc_frontend/src/app/vocabulary.service.ts
+72
-2
mc_frontend/src/assets/i18n/de.json
mc_frontend/src/assets/i18n/de.json
+2
-1
mc_frontend/src/assets/i18n/en.json
mc_frontend/src/assets/i18n/en.json
+2
-1
No files found.
mc_backend/mcserver/app/api/fileAPI.py
View file @
67289414
...
...
@@ -13,6 +13,7 @@ from mcserver.app.models import FileType, ResourceType, DownloadableFile, MimeTy
from
mcserver.app.services
import
FileService
,
NetworkService
,
DatabaseService
from
mcserver.config
import
Config
from
mcserver.models_auto
import
Exercise
,
UpdateInfo
,
LearningResult
from
openapi.openapi_server.models
import
FileForm
def
clean_tmp_folder
():
...
...
@@ -40,9 +41,10 @@ def get(id: str, type: FileType, solution_indices: List[int]) -> Union[ETagRespo
file_name
:
str
=
id
+
"."
+
str
(
type
)
mime_type
:
str
=
MimeType
[
type
].
value
if
exercise
is
None
:
# try and see if a file is already cached on disk
#
there is no exercise in the database;
try and see if a file is already cached on disk
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
Config
.
TMP_DIRECTORY
,
file_name
)):
return
connexion
.
problem
(
404
,
Config
.
ERROR_TITLE_NOT_FOUND
,
Config
.
ERROR_MESSAGE_EXERCISE_NOT_FOUND
)
# there is a cached (non-exercise) file on disk, retrieve it and offer for download
return
send_from_directory
(
Config
.
TMP_DIRECTORY
,
file_name
,
mimetype
=
mime_type
,
as_attachment
=
True
)
exercise
.
last_access_time
=
datetime
.
utcnow
().
timestamp
()
DatabaseService
.
commit
()
...
...
@@ -59,17 +61,15 @@ def post(file_data: dict) -> Response:
""" The POST method for the File REST API.
It writes learning results or HTML content to the disk for later access. """
lr_string
:
str
=
f
ile
_data
.
get
(
"learning_result"
,
None
)
if
lr_string
:
lr_dict
:
dict
=
json
.
loads
(
lr_string
)
ff
:
FileForm
=
F
ile
Form
.
from_dict
(
file_data
)
if
ff
.
learning_result
:
lr_dict
:
dict
=
json
.
loads
(
ff
.
learning_result
)
for
exercise_id
in
lr_dict
:
xapi_statement
:
XapiStatement
=
XapiStatement
(
lr_dict
[
exercise_id
])
save_learning_result
(
xapi_statement
)
return
NetworkService
.
make_json_response
(
str
(
True
))
else
:
file_type
:
FileType
=
file_data
[
"file_type"
]
existing_file
:
DownloadableFile
=
FileService
.
make_tmp_file_from_html
(
file_data
[
"urn"
],
file_type
,
file_data
[
"html_content"
])
existing_file
:
DownloadableFile
=
FileService
.
make_tmp_file_from_html
(
ff
.
urn
,
ff
.
file_type
,
ff
.
html_content
)
return
NetworkService
.
make_json_response
(
existing_file
.
file_name
)
...
...
mc_backend/mcserver/app/assets/vocabulary_ancient_greek_latin_dependency_treebank.json
→
mc_backend/mcserver/app/assets/vocabulary
/vocabulary
_ancient_greek_latin_dependency_treebank.json
View file @
67289414
File moved
mc_backend/mcserver/app/assets/vocabulary_bamberg_core.json
→
mc_backend/mcserver/app/assets/vocabulary
/vocabulary
_bamberg_core.json
View file @
67289414
File moved
mc_backend/mcserver/app/assets/vocabulary_proiel_treebank.json
→
mc_backend/mcserver/app/assets/vocabulary
/vocabulary
_proiel_treebank.json
View file @
67289414
File moved
mc_backend/mcserver/app/assets/vocabulary/vocabulary_vischer.json
0 → 100644
View file @
67289414
This diff is collapsed.
Click to expand it.
mc_backend/mcserver/app/assets/vocabulary_viva.json
→
mc_backend/mcserver/app/assets/vocabulary
/vocabulary
_viva.json
View file @
67289414
File moved
mc_backend/mcserver/app/models.py
View file @
67289414
...
...
@@ -157,6 +157,7 @@ class VocabularyCorpus(Enum):
agldt
=
Config
.
VOCABULARY_AGLDT_FILE_NAME
bws
=
Config
.
VOCABULARY_BWS_FILE_NAME
proiel
=
Config
.
VOCABULARY_PROIEL_FILE_NAME
vischer
=
Config
.
VOCABULARY_VISCHER_FILE_NAME
viva
=
Config
.
VOCABULARY_VIVA_FILE_NAME
...
...
mc_backend/mcserver/app/services/customCorpusService.py
View file @
67289414
...
...
@@ -202,7 +202,7 @@ class CustomCorpusService:
annotations
=
CustomCorpusService
.
get_treebank_sub_annotations
(
urn
,
annotations
,
cc
)
# add an artificial punctuation sign at the end of each sentence
for
sent
in
annotations
:
sent
.
metadata
[
"urn"
]
=
":"
.
join
(
urn
.
split
(
":"
)[:
-
1
]
+
[
sent
.
tokens
[
0
][
"misc"
][
"ref"
]])
sent
.
metadata
[
"urn"
]
=
":"
.
join
(
[
cc
.
corpus
.
source_urn
,
sent
.
tokens
[
0
][
"misc"
][
"ref"
]])
if
sent
.
tokens
[
-
1
][
"form"
]
!=
"."
:
root_token
:
OrderedDict
=
next
(
x
for
x
in
sent
.
tokens
if
x
[
Config
.
AQL_DEPREL
]
==
"root"
)
sent
.
append
(
OrderedDict
(
...
...
mc_backend/mcserver/app/services/fileService.py
View file @
67289414
...
...
@@ -83,7 +83,7 @@ class FileService:
def
get_vocabulary_set
(
vocabulary_corpus
:
VocabularyCorpus
,
frequency_upper_bound
:
int
)
->
Set
[
str
]:
""" Retrieves a set of highly frequent lemmata from a specific vocabulary. """
vocabulary_file_content
:
str
=
FileService
.
get_file_content
(
os
.
path
.
join
(
Config
.
ASSETS
_DIRECTORY
,
vocabulary_corpus
.
value
))
os
.
path
.
join
(
Config
.
VOCABULARY
_DIRECTORY
,
vocabulary_corpus
.
value
))
vocabulary_list
:
List
[
str
]
=
json
.
loads
(
vocabulary_file_content
)
frequency_upper_bound
=
frequency_upper_bound
if
frequency_upper_bound
else
len
(
vocabulary_list
)
return
set
(
vocabulary_list
[:
frequency_upper_bound
])
...
...
mc_backend/mcserver/config.py
View file @
67289414
...
...
@@ -162,7 +162,9 @@ class Config(object):
UDPIPE_PATH_WIN64
=
os
.
path
.
join
(
ASSETS_DIRECTORY
,
"udpipe_win64.exe"
)
VOCABULARY_AGLDT_FILE_NAME
=
"vocabulary_ancient_greek_latin_dependency_treebank.json"
VOCABULARY_BWS_FILE_NAME
=
"vocabulary_bamberg_core.json"
VOCABULARY_DIRECTORY
=
os
.
path
.
join
(
ASSETS_DIRECTORY
,
"vocabulary"
)
VOCABULARY_PROIEL_FILE_NAME
=
"vocabulary_proiel_treebank.json"
VOCABULARY_VISCHER_FILE_NAME
=
"vocabulary_vischer.json"
VOCABULARY_VIVA_FILE_NAME
=
"vocabulary_viva.json"
...
...
mc_backend/mcserver/mcserver_api.yaml
View file @
67289414
...
...
@@ -203,24 +203,7 @@ paths:
content
:
application/x-www-form-urlencoded
:
schema
:
type
:
object
description
:
Data that should be serialized and persisted.
x-body-name
:
file_data
properties
:
file_type
:
$ref
:
'
../openapi_models.yaml#/components/schemas/FileType'
html_content
:
type
:
string
description
:
HTML content to be serialized.
example
:
<html></html>
learning_result
:
type
:
string
description
:
Serialized XAPI results for an interactive exercise.
example
:
"
{'0':
{}}"
urn
:
type
:
string
description
:
CTS URN for the text passage from which the HTML content was created.
example
:
urn:cts:latinLit:phi0448.phi001.perseus-lat2:1.1.1-1.1.1
$ref
:
'
../openapi_models.yaml#/components/schemas/FileForm'
/frequency
:
get
:
summary
:
Returns results for a frequency query from ANNIS for a given CTS URN.
...
...
mc_backend/openapi/openapi_server/models/__init__.py
View file @
67289414
...
...
@@ -10,11 +10,11 @@ from openapi.openapi_server.models.exercise_extension import ExerciseExtension
from
openapi.openapi_server.models.exercise_form
import
ExerciseForm
from
openapi.openapi_server.models.exercise_form_all_of
import
ExerciseFormAllOf
from
openapi.openapi_server.models.exercise_type_path
import
ExerciseTypePath
from
openapi.openapi_server.models.file_form
import
FileForm
from
openapi.openapi_server.models.file_type
import
FileType
from
openapi.openapi_server.models.frequency_item
import
FrequencyItem
from
openapi.openapi_server.models.graph_data
import
GraphData
from
openapi.openapi_server.models.h5_p_form
import
H5PForm
from
openapi.openapi_server.models.inline_object
import
InlineObject
from
openapi.openapi_server.models.kwic_form
import
KwicForm
from
openapi.openapi_server.models.link
import
Link
from
openapi.openapi_server.models.matching_exercise
import
MatchingExercise
...
...
mc_backend/openapi/openapi_server/models/file_form.py
0 → 100644
View file @
67289414
# coding: utf-8
from
__future__
import
absolute_import
from
datetime
import
date
,
datetime
# noqa: F401
from
typing
import
List
,
Dict
# noqa: F401
from
openapi.openapi_server.models.base_model_
import
Model
from
openapi.openapi_server.models.file_type
import
FileType
from
openapi.openapi_server
import
util
from
openapi.openapi_server.models.file_type
import
FileType
# noqa: E501
class
FileForm
(
Model
):
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Do not edit the class manually.
"""
def
__init__
(
self
,
file_type
=
None
,
html_content
=
None
,
learning_result
=
None
,
urn
=
None
):
# noqa: E501
"""FileForm - a model defined in OpenAPI
:param file_type: The file_type of this FileForm. # noqa: E501
:type file_type: FileType
:param html_content: The html_content of this FileForm. # noqa: E501
:type html_content: str
:param learning_result: The learning_result of this FileForm. # noqa: E501
:type learning_result: str
:param urn: The urn of this FileForm. # noqa: E501
:type urn: str
"""
self
.
openapi_types
=
{
'file_type'
:
FileType
,
'html_content'
:
str
,
'learning_result'
:
str
,
'urn'
:
str
}
self
.
attribute_map
=
{
'file_type'
:
'file_type'
,
'html_content'
:
'html_content'
,
'learning_result'
:
'learning_result'
,
'urn'
:
'urn'
}
self
.
_file_type
=
file_type
self
.
_html_content
=
html_content
self
.
_learning_result
=
learning_result
self
.
_urn
=
urn
@
classmethod
def
from_dict
(
cls
,
dikt
)
->
'FileForm'
:
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The FileForm of this FileForm. # noqa: E501
:rtype: FileForm
"""
return
util
.
deserialize_model
(
dikt
,
cls
)
@
property
def
file_type
(
self
):
"""Gets the file_type of this FileForm.
:return: The file_type of this FileForm.
:rtype: FileType
"""
return
self
.
_file_type
@
file_type
.
setter
def
file_type
(
self
,
file_type
):
"""Sets the file_type of this FileForm.
:param file_type: The file_type of this FileForm.
:type file_type: FileType
"""
self
.
_file_type
=
file_type
@
property
def
html_content
(
self
):
"""Gets the html_content of this FileForm.
HTML content to be serialized. # noqa: E501
:return: The html_content of this FileForm.
:rtype: str
"""
return
self
.
_html_content
@
html_content
.
setter
def
html_content
(
self
,
html_content
):
"""Sets the html_content of this FileForm.
HTML content to be serialized. # noqa: E501
:param html_content: The html_content of this FileForm.
:type html_content: str
"""
self
.
_html_content
=
html_content
@
property
def
learning_result
(
self
):
"""Gets the learning_result of this FileForm.
Serialized XAPI results for an interactive exercise. # noqa: E501
:return: The learning_result of this FileForm.
:rtype: str
"""
return
self
.
_learning_result
@
learning_result
.
setter
def
learning_result
(
self
,
learning_result
):
"""Sets the learning_result of this FileForm.
Serialized XAPI results for an interactive exercise. # noqa: E501
:param learning_result: The learning_result of this FileForm.
:type learning_result: str
"""
self
.
_learning_result
=
learning_result
@
property
def
urn
(
self
):
"""Gets the urn of this FileForm.
CTS URN for the text passage from which the HTML content was created. # noqa: E501
:return: The urn of this FileForm.
:rtype: str
"""
return
self
.
_urn
@
urn
.
setter
def
urn
(
self
,
urn
):
"""Sets the urn of this FileForm.
CTS URN for the text passage from which the HTML content was created. # noqa: E501
:param urn: The urn of this FileForm.
:type urn: str
"""
self
.
_urn
=
urn
mc_backend/openapi/openapi_server/models/file_form_all_of.py
0 → 100644
View file @
67289414
# coding: utf-8
from
__future__
import
absolute_import
from
datetime
import
date
,
datetime
# noqa: F401
from
typing
import
List
,
Dict
# noqa: F401
from
openapi.openapi_server.models.base_model_
import
Model
from
openapi.openapi_server.models.file_type
import
FileType
from
openapi.openapi_server
import
util
from
openapi.openapi_server.models.file_type
import
FileType
# noqa: E501
class
FileFormAllOf
(
Model
):
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Do not edit the class manually.
"""
def
__init__
(
self
,
file_type
=
None
,
html_content
=
None
,
learning_result
=
None
,
urn
=
None
):
# noqa: E501
"""FileFormAllOf - a model defined in OpenAPI
:param file_type: The file_type of this FileFormAllOf. # noqa: E501
:type file_type: FileType
:param html_content: The html_content of this FileFormAllOf. # noqa: E501
:type html_content: str
:param learning_result: The learning_result of this FileFormAllOf. # noqa: E501
:type learning_result: str
:param urn: The urn of this FileFormAllOf. # noqa: E501
:type urn: str
"""
self
.
openapi_types
=
{
'file_type'
:
FileType
,
'html_content'
:
str
,
'learning_result'
:
str
,
'urn'
:
str
}
self
.
attribute_map
=
{
'file_type'
:
'file_type'
,
'html_content'
:
'html_content'
,
'learning_result'
:
'learning_result'
,
'urn'
:
'urn'
}
self
.
_file_type
=
file_type
self
.
_html_content
=
html_content
self
.
_learning_result
=
learning_result
self
.
_urn
=
urn
@
classmethod
def
from_dict
(
cls
,
dikt
)
->
'FileFormAllOf'
:
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The FileForm_allOf of this FileFormAllOf. # noqa: E501
:rtype: FileFormAllOf
"""
return
util
.
deserialize_model
(
dikt
,
cls
)
@
property
def
file_type
(
self
):
"""Gets the file_type of this FileFormAllOf.
:return: The file_type of this FileFormAllOf.
:rtype: FileType
"""
return
self
.
_file_type
@
file_type
.
setter
def
file_type
(
self
,
file_type
):
"""Sets the file_type of this FileFormAllOf.
:param file_type: The file_type of this FileFormAllOf.
:type file_type: FileType
"""
self
.
_file_type
=
file_type
@
property
def
html_content
(
self
):
"""Gets the html_content of this FileFormAllOf.
HTML content to be serialized. # noqa: E501
:return: The html_content of this FileFormAllOf.
:rtype: str
"""
return
self
.
_html_content
@
html_content
.
setter
def
html_content
(
self
,
html_content
):
"""Sets the html_content of this FileFormAllOf.
HTML content to be serialized. # noqa: E501
:param html_content: The html_content of this FileFormAllOf.
:type html_content: str
"""
self
.
_html_content
=
html_content
@
property
def
learning_result
(
self
):
"""Gets the learning_result of this FileFormAllOf.
Serialized XAPI results for an interactive exercise. # noqa: E501
:return: The learning_result of this FileFormAllOf.
:rtype: str
"""
return
self
.
_learning_result
@
learning_result
.
setter
def
learning_result
(
self
,
learning_result
):
"""Sets the learning_result of this FileFormAllOf.
Serialized XAPI results for an interactive exercise. # noqa: E501
:param learning_result: The learning_result of this FileFormAllOf.
:type learning_result: str
"""
self
.
_learning_result
=
learning_result
@
property
def
urn
(
self
):
"""Gets the urn of this FileFormAllOf.
CTS URN for the text passage from which the HTML content was created. # noqa: E501
:return: The urn of this FileFormAllOf.
:rtype: str
"""
return
self
.
_urn
@
urn
.
setter
def
urn
(
self
,
urn
):
"""Sets the urn of this FileFormAllOf.
CTS URN for the text passage from which the HTML content was created. # noqa: E501
:param urn: The urn of this FileFormAllOf.
:type urn: str
"""
self
.
_urn
=
urn
mc_backend/openapi/openapi_server/models/vocabulary_mc.py
View file @
67289414
...
...
@@ -21,6 +21,7 @@ class VocabularyMC(Model):
AGLDT
=
"agldt"
BWS
=
"bws"
PROIEL
=
"proiel"
VISCHER
=
"vischer"
VIVA
=
"viva"
def
__init__
(
self
):
# noqa: E501
"""VocabularyMC - a model defined in OpenAPI
...
...
mc_backend/openapi/openapi_server/openapi/openapi.yaml
View file @
67289414
...
...
@@ -256,29 +256,10 @@ paths:
post
:
operationId
:
mcserver_app_api_file_api_post
requestBody
:
$ref
:
'
#/components/requestBodies/inline_object'
content
:
application/x-www-form-urlencoded
:
schema
:
description
:
Data that should be serialized and persisted.
properties
:
file_type
:
$ref
:
'
#/components/schemas/FileType'
html_content
:
description
:
HTML content to be serialized.
example
:
<html></html>
type
:
string
learning_result
:
description
:
Serialized XAPI results for an interactive exercise.
example
:
'
{'
'
0'
'
:
{}}'
type
:
string
urn
:
description
:
CTS URN for the text passage from which the HTML content
was created.
example
:
urn:cts:latinLit:phi0448.phi001.perseus-lat2:1.1.1-1.1.1
type
:
string
type
:
object
x-body-name
:
file_data
$ref
:
'
#/components/schemas/FileForm'
required
:
true
responses
:
"
200"
:
...
...
@@ -623,13 +604,6 @@ paths:
vocabulary.
x-openapi-router-controller
:
openapi_server.controllers.default_controller
components
:
requestBodies
:
inline_object
:
content
:
application/x-www-form-urlencoded
:
schema
:
$ref
:
'
#/components/schemas/inline_object'
required
:
true
schemas
:
TextComplexityFormExtension
:
allOf
:
...
...
@@ -1205,11 +1179,12 @@ components:
type
:
object
VocabularyMC
:
description
:
'
Reference
vocabularies:
Ancient
Greek
and
Latin
Dependency
Treebank,
Bamberger
Wortschatz,
PROIEL
treebank,
VIVA
textbook'
Bamberger
Wortschatz,
PROIEL
treebank,
Vischer
vocabulary,
VIVA
textbook'
enum
:
-
agldt
-
bws
-
proiel
-
vischer
-
viva
example
:
agldt
type
:
string
...
...
@@ -1281,6 +1256,26 @@ components:
-
zip
example
:
pdf
type
:
string
FileForm
:
description
:
Metadata for file content to be saved for later access.
properties
:
file_type
:
$ref
:
'
#/components/schemas/FileType'
html_content
:
description
:
HTML content to be serialized.
example
:
<html></html>
type
:
string
learning_result
:
description
:
Serialized XAPI results for an interactive exercise.
example
:
'
{'
'
0'
'
:
{}}'
type
:
string
urn
:
description
:
CTS URN for the text passage from which the HTML content was
created.
example
:
urn:cts:latinLit:phi0448.phi001.perseus-lat2:1.1.1-1.1.1
type
:
string
type
:
object
x-body-name
:
file_data
H5PForm
:
description
:
Metadata for the H5P exercise.
properties
:
...
...
@@ -1449,26 +1444,6 @@ components:
-
urn
type
:
object
x-body-name
:
complexity_data
inline_object
:
description
:
Data that should be serialized and persisted.
properties
:
file_type
:
$ref
:
'
#/components/schemas/FileType'
html_content
:
description
:
HTML content to be serialized.
example
:
<html></html>
type
:
string
learning_result
:
description
:
Serialized XAPI results for an interactive exercise.
example
:
'
{'
'
0'
'
:
{}}'
type
:
string
urn
:
description
:
CTS URN for the text passage from which the HTML content was
created.
example
:
urn:cts:latinLit:phi0448.phi001.perseus-lat2:1.1.1-1.1.1
type
:
string
type
:
object
x-body-name
:
file_data
ExerciseForm_allOf
:
description
:
Additional exercise data.
properties
:
...
...
mc_backend/openapi_models.yaml
View file @
67289414
...
...
@@ -258,6 +258,25 @@ components:
enum
:
[
drag_text
,
fill_blanks
,
mark_words
,
multi_choice
,
voc_list
]
description
:
Paths to the data directories for various H5P exercise types.
example
:
drag_text
FileForm
:
x-body-name
:
file_data
description
:
Metadata for file content to be saved for later access.
type
:
object
properties
:
file_type
:
$ref
:
'
#/components/schemas/FileType'
html_content
:
type
:
string
description
:
HTML content to be serialized.
example
:
<html></html>
learning_result
:
type
:
string
description
:
Serialized XAPI results for an interactive exercise.
example
:
"
{'0':
{}}"
urn
:
type
:
string
description
:
CTS URN for the text passage from which the HTML content was created.
example
:
urn:cts:latinLit:phi0448.phi001.perseus-lat2:1.1.1-1.1.1
FileType
:
type
:
string
enum
:
[
docx
,
json
,
pdf
,
xml
,
zip
]
...
...
@@ -775,9 +794,9 @@ components:
-
search_regex