mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
Merge branch 'w36_MDL-29014_m22_str' of git://github.com/skodak/moodle
This commit is contained in:
commit
62b214d9a6
10 changed files with 22 additions and 22 deletions
|
@ -3264,11 +3264,11 @@ function make_editing_buttons(stdClass $mod, $absolute = true, $moveselect = tru
|
|||
function course_format_name ($course,$max=100) {
|
||||
|
||||
$str = $course->shortname.': '. $course->fullname;
|
||||
if (strlen($str) <= $max) {
|
||||
if (textlib::strlen($str) <= $max) {
|
||||
return $str;
|
||||
}
|
||||
else {
|
||||
return substr($str,0,$max-3).'...';
|
||||
return textlib::substr($str,0,$max-3).'...';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -181,8 +181,8 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select
|
|||
}
|
||||
$section = $mod->section;
|
||||
$mod->name = strip_tags(format_string($mod->name, true));
|
||||
if (strlen($mod->name) > 55) {
|
||||
$mod->name = substr($mod->name, 0, 50)."...";
|
||||
if (textlib::strlen($mod->name) > 55) {
|
||||
$mod->name = textlib::substr($mod->name, 0, 50)."...";
|
||||
}
|
||||
if (!$mod->visible) {
|
||||
$mod->name = "(".$mod->name.")";
|
||||
|
@ -394,8 +394,8 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate='today'
|
|||
}
|
||||
$section = $mod->section;
|
||||
$mod->name = strip_tags(format_string($mod->name, true));
|
||||
if (strlen($mod->name) > 55) {
|
||||
$mod->name = substr($mod->name, 0, 50)."...";
|
||||
if (textlib::strlen($mod->name) > 55) {
|
||||
$mod->name = textlib::substr($mod->name, 0, 50)."...";
|
||||
}
|
||||
if (!$mod->visible) {
|
||||
$mod->name = "(".$mod->name.")";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue