mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-81359 core_courseformat: Availability 'Show more' unwelcome outing
If the availability restriction includes a link, then 'Show more' always appeared even when the entire text is already shown.
This commit is contained in:
parent
342319339f
commit
1fb9ff333f
@ -209,7 +209,7 @@ class availability implements named_templatable, renderable {
|
||||
$text = info::format_info($availabilityinfo, $course);
|
||||
$data = ['text' => $text];
|
||||
|
||||
if (strlen(html_to_text($text)) > self::AVAILABILITY_EXCERPT_MAXSIZE) {
|
||||
if (strlen(html_to_text($text, 0, false)) > self::AVAILABILITY_EXCERPT_MAXSIZE) {
|
||||
$data['excerpt'] = shorten_text($text, self::AVAILABILITY_EXCERPT_MAXSIZE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user