mirror of
https://github.com/moodle/moodle.git
synced 2025-02-15 21:36:58 +01:00
Avoid empty or unlinkable activity names.
Merged from MOODLE_15_STABLE
This commit is contained in:
parent
32a50e2833
commit
bcbebdc53b
@ -34,10 +34,14 @@
|
||||
|
||||
foreach ($resources as $resource) {
|
||||
$currentname = trim($resource->name);
|
||||
$resourcelist[] = new filterobject($currentname,
|
||||
'<a class="resource autolink" title="'.strip_tags($currentname).'" href="'.
|
||||
$CFG->wwwroot.'/mod/resource/view.php?r='.$resource->id.'">',
|
||||
'</a>', false, true);
|
||||
$strippedname = strip_tags($currentname);
|
||||
/// Avoid empty or unlinkable resource names
|
||||
if (!empty($strippedname)) {
|
||||
$resourcelist[] = new filterobject($currentname,
|
||||
'<a class="resource autolink" title="'.$strippedname.'" href="'.
|
||||
$CFG->wwwroot.'/mod/resource/view.php?r='.$resource->id.'">',
|
||||
'</a>', false, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user