Merge branch 'w36_MDL-29014_m22_str' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk 2011-09-13 12:45:34 +12:00
commit 62b214d9a6
10 changed files with 22 additions and 22 deletions

View file

@ -2233,10 +2233,10 @@ function navmenulist($course, $sections, $modinfo, $strsection, $strjumpto, $wid
if ($course->format == 'weeks' or empty($thissection->summary)) {
$item = $strsection ." ". $mod->sectionnum;
} else {
if (strlen($thissection->summary) < ($width-3)) {
if (textlib::strlen($thissection->summary) < ($width-3)) {
$item = $thissection->summary;
} else {
$item = substr($thissection->summary, 0, $width).'...';
$item = textlib::substr($thissection->summary, 0, $width).'...';
}
}
$menu[] = '<li class="section"><span>'.$item.'</span>';
@ -2252,8 +2252,8 @@ function navmenulist($course, $sections, $modinfo, $strsection, $strjumpto, $wid
$url = $mod->modname .'/view.php?id='. $mod->id;
$mod->name = strip_tags(format_string($mod->name ,true));
if (strlen($mod->name) > ($width+5)) {
$mod->name = substr($mod->name, 0, $width).'...';
if (textlib::strlen($mod->name) > ($width+5)) {
$mod->name = textlib::substr($mod->name, 0, $width).'...';
}
if (!$mod->visible) {
$mod->name = '('.$mod->name.')';