mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Slightly nicer trimming of section summaries
This commit is contained in:
parent
8b00b40692
commit
5932b3aa6d
1 changed files with 7 additions and 2 deletions
|
@ -136,9 +136,14 @@
|
|||
while ($section <= $course->numsections) {
|
||||
|
||||
if (!empty($displaysection) and $displaysection != $section) {
|
||||
$strsummary= "";
|
||||
if (!empty($sections[$section])) {
|
||||
$strsummary = " - ".substr($sections[$section]->summary, 0, 60);
|
||||
if (strlen($sections[$section]->summary < 57)) {
|
||||
$strsummary = " - ".$sections[$section]->summary;
|
||||
} else {
|
||||
$strsummary = " - ".substr($sections[$section]->summary, 0, 60)."...";
|
||||
}
|
||||
} else {
|
||||
$strsummary = "";
|
||||
}
|
||||
$sectionmenu["topic=$section"] = "$section$strsummary";
|
||||
$section++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue