mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-7401 Course format database/backup/lang/stylesheet/capability support
This commit is contained in:
parent
b7e771ce20
commit
ae628043a0
15 changed files with 344 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue