$currentfile = substr($currentfile, 5);
$currentpathexp = explode('/', $currentfile);
if (count($currentpathexp) > 1) {
- $url = '/help.php?module='.$currentpathexp[0].'&file='.$currentpathexp[1];
+ $url = '/help.php?module='.implode('/',array_slice($currentpathexp,0,count($currentpathexp)-1)).'&file='.end($currentpathexp);
} else {
$url = '/help.php?module=moodle&file='.$currentfile;
}