mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
Merge branch 'MDL-52530' of git://github.com/eugeneventer/moodle-fixes
This commit is contained in:
commit
1c042d38ea
@ -327,8 +327,8 @@ class core_files_file_storage_testcase extends advanced_testcase {
|
||||
$repositorypluginname = 'user';
|
||||
// Override repository permission.
|
||||
$capability = 'repository/' . $repositorypluginname . ':view';
|
||||
$allroles = $DB->get_records_menu('role', array(), 'id', 'archetype, id');
|
||||
assign_capability($capability, CAP_ALLOW, $allroles['guest'], $syscontext->id, true);
|
||||
$guestroleid = $DB->get_field('role', 'id', array('shortname' => 'guest'));
|
||||
assign_capability($capability, CAP_ALLOW, $guestroleid, $syscontext->id, true);
|
||||
|
||||
$args = array();
|
||||
$args['type'] = $repositorypluginname;
|
||||
|
@ -44,8 +44,8 @@ class core_repositorylib_testcase extends advanced_testcase {
|
||||
$repositorypluginname = 'boxnet';
|
||||
// override repository permission
|
||||
$capability = 'repository/' . $repositorypluginname . ':view';
|
||||
$allroles = $DB->get_records_menu('role', array(), 'id', 'archetype, id');
|
||||
assign_capability($capability, CAP_ALLOW, $allroles['guest'], $syscontext->id, true);
|
||||
$guestroleid = $DB->get_field('role', 'id', array('shortname' => 'guest'));
|
||||
assign_capability($capability, CAP_ALLOW, $guestroleid, $syscontext->id, true);
|
||||
|
||||
$plugintype = new repository_type($repositorypluginname);
|
||||
$pluginid = $plugintype->create(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user