Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Moodle Qtype Moopt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
Moodle Qtype Moopt
Commits
dd6344a8
Commit
dd6344a8
authored
1 year ago
by
Isabel Uffinger
Browse files
Options
Downloads
Patches
Plain Diff
show wrong proformaversion as error
parent
7c4f019f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
externallib.php
+3
-5
3 additions, 5 deletions
externallib.php
with
3 additions
and
5 deletions
externallib.php
+
3
−
5
View file @
dd6344a8
...
@@ -42,7 +42,7 @@ class qtype_moopt_external extends external_api {
...
@@ -42,7 +42,7 @@ class qtype_moopt_external extends external_api {
'taskuuid'
=>
new
external_value
(
PARAM_RAW
,
'task\'s uuid'
,
VALUE_OPTIONAL
),
'taskuuid'
=>
new
external_value
(
PARAM_RAW
,
'task\'s uuid'
,
VALUE_OPTIONAL
),
'maxscoregradinghints'
=>
new
external_value
(
PARAM_FLOAT
,
'maximum score'
,
VALUE_OPTIONAL
),
'maxscoregradinghints'
=>
new
external_value
(
PARAM_FLOAT
,
'maximum score'
,
VALUE_OPTIONAL
),
'filesdisplayedingeneralfeedback'
=>
new
external_value
(
PARAM_RAW
,
'general feedback'
,
VALUE_OPTIONAL
),
'filesdisplayedingeneralfeedback'
=>
new
external_value
(
PARAM_RAW
,
'general feedback'
,
VALUE_OPTIONAL
),
'enablefileinput'
=>
new
external_value
(
PARAM_BOOL
,
'Enable file submissions'
),
'enablefileinput'
=>
new
external_value
(
PARAM_BOOL
,
'Enable file submissions'
,
VALUE_OPTIONAL
),
'freetextfilesettings'
=>
new
external_multiple_structure
(
'freetextfilesettings'
=>
new
external_multiple_structure
(
new
external_single_structure
(
new
external_single_structure
(
array
(
array
(
...
@@ -56,7 +56,6 @@ class qtype_moopt_external extends external_api {
...
@@ -56,7 +56,6 @@ class qtype_moopt_external extends external_api {
)
)
,
'Free text settings'
,
VALUE_OPTIONAL
),
,
'Free text settings'
,
VALUE_OPTIONAL
),
'moodleValidationProformaNamespace'
=>
new
external_value
(
PARAM_TEXT
,
'detected namespace'
,
VALUE_OPTIONAL
),
'moodleValidationProformaNamespace'
=>
new
external_value
(
PARAM_TEXT
,
'detected namespace'
,
VALUE_OPTIONAL
),
'moodleValidationWarningInvalidNamespace'
=>
new
external_value
(
PARAM_TEXT
,
'warning message in case of invalid XML namespace'
,
VALUE_OPTIONAL
),
'moodleValidationWarnings'
=>
new
external_multiple_structure
(
'moodleValidationWarnings'
=>
new
external_multiple_structure
(
new
external_single_structure
(
new
external_single_structure
(
array
(
array
(
...
@@ -96,8 +95,7 @@ class qtype_moopt_external extends external_api {
...
@@ -96,8 +95,7 @@ class qtype_moopt_external extends external_api {
$returnval
=
array
();
$returnval
=
array
();
if
(
$namespace
==
null
)
{
if
(
$namespace
==
null
)
{
$returnval
[
'error'
]
=
get_string
(
'invalidproformanamespace'
,
'qtype_moopt'
,
$returnval
[
'moodleValidationWarningInvalidNamespace'
]
=
get_string
(
'invalidproformanamespace'
,
'qtype_moopt'
,
implode
(
", "
,
PROFORMA_TASK_XML_NAMESPACES
));
implode
(
", "
,
PROFORMA_TASK_XML_NAMESPACES
));
}
else
{
}
else
{
...
@@ -196,7 +194,7 @@ class qtype_moopt_external extends external_api {
...
@@ -196,7 +194,7 @@ class qtype_moopt_external extends external_api {
$filecontent
=
get_text_content_from_file
(
$usercontext
,
$draftid
,
$keepfilename
,
$filecontent
=
get_text_content_from_file
(
$usercontext
,
$draftid
,
$keepfilename
,
$pathinfo
[
'dirname'
]
.
'/'
,
$pathinfo
[
'basename'
],
true
,
$encoding
);
$pathinfo
[
'dirname'
]
.
'/'
,
$pathinfo
[
'basename'
],
true
,
$encoding
);
if
(
$filecontent
===
null
){
if
(
$filecontent
===
null
){
$returnval
[
'error'
]
=
"
Das
Encoding
der Datei
"
.
$pathinfo
[
'basename'
]
.
"
konnte nicht erkannt werden
"
;
$returnval
[
'error'
]
=
"Encoding
of file
"
.
$pathinfo
[
'basename'
]
.
"
couldn't be detected.
"
;
}
}
$defaultfilename
=
basename
(
$child
->
nodeValue
);
$defaultfilename
=
basename
(
$child
->
nodeValue
);
$fileid
=
$file
->
attributes
->
getNamedItem
(
'id'
)
->
nodeValue
;
$fileid
=
$file
->
attributes
->
getNamedItem
(
'id'
)
->
nodeValue
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment