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

@ -2140,6 +2140,11 @@ function load_capability_def($component) {
$defpath = $CFG->dirroot.'/'.$compparts[0].
's/'.$compparts[1].'/db/access.php';
$varprefix = $compparts[0].'_'.$compparts[1];
} else if ($compparts[0] == 'format') {
// Similar to the above, course formats are 'format' while they
// are stored in 'course/format'.
$defpath = $CFG->dirroot.'/course/'.$component.'/db/access.php';
$varprefix = $compparts[0].'_'.$compparts[1];
} else {
$defpath = $CFG->dirroot.'/'.$component.'/db/access.php';
$varprefix = str_replace('/', '_', $component);
@ -2694,6 +2699,10 @@ function get_capability_string($capabilityname) {
case 'enrol':
$string = get_string($stringname, 'enrol_'.$componentname);
break;
case 'format':
$string = get_string($stringname, 'format_'.$componentname);
break;
default:
$string = get_string($stringname);