MDL-7401 Course format database/backup/lang/stylesheet/capability support

This commit is contained in:
sam_marshall 2006-12-11 15:47:23 +00:00
parent b7e771ce20
commit ae628043a0
15 changed files with 344 additions and 10 deletions

View file

@ -2445,6 +2445,16 @@ function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $force
}
}
if (!isset($THEME->courseformatsheets) || $THEME->courseformatsheets) { // Search for styles.php in course formats
if ($mods = get_list_of_plugins('format','',$CFG->dirroot.'/course')) {
foreach ($mods as $mod) {
if (file_exists($CFG->dirroot.'/course/format/'.$mod.'/styles.php')) {
$files[] = array($CFG->dirroot, '/course/format/'.$mod.'/styles.php');
}
}
}
}
if (!empty($THEME->langsheets)) { // Search for styles.php within the current language
if (file_exists($CFG->dirroot.'/lang/'.$lang.'/styles.php')) {
$files[] = array($CFG->dirroot, '/lang/'.$lang.'/styles.php');