Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
d6b6c21d
Commit
d6b6c21d
authored
3 years ago
by
Till Glöggler
Committed by
Elmar Ludwig
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixes #489
parent
c32dfa3e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/models/Courseware/BlockTypes/Text.php
+17
-1
17 additions, 1 deletion
lib/models/Courseware/BlockTypes/Text.php
with
17 additions
and
1 deletion
lib/models/Courseware/BlockTypes/Text.php
+
17
−
1
View file @
d6b6c21d
...
...
@@ -35,6 +35,22 @@ class Text extends BlockType
return
[
'text'
=>
''
];
}
public
function
getPayload
()
{
$payload
=
parent
::
getPayload
();
$payload
[
'text'
]
=
\Studip\Markup
::
purifyHtml
(
\Studip\Markup
::
markAsHtml
(
$payload
[
'text'
]));
return
$payload
;
}
public
function
setPayload
(
$payload
):
void
{
$payload
[
'text'
]
=
\Studip\Markup
::
purifyHtml
(
\Studip\Markup
::
markAsHtml
(
$payload
[
'text'
]));
parent
::
setPayload
(
$payload
);
}
public
static
function
getJsonSchema
():
Schema
{
$schemaFile
=
__DIR__
.
'/Text.json'
;
...
...
@@ -42,7 +58,7 @@ class Text extends BlockType
return
Schema
::
fromJsonString
(
file_get_contents
(
$schemaFile
));
}
/**
/**
* get all files related to this block.
*
* @return \FileRef[] list of file references realted to this block
...
...
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