mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
Merge branch 'MDL-81569' of https://github.com/marinaglancy/moodle
This commit is contained in:
commit
053506035a
@ -254,7 +254,7 @@ class course_test extends \advanced_testcase {
|
||||
$data = ['shortname' => 'newcourse', 'fullname' => 'New course', 'summary' => 'New', 'category' => 1];
|
||||
$co = new tool_uploadcourse_course($mode, $updatemode, $data);
|
||||
|
||||
if (in_array($role->shortname, $rolesallowed)) {
|
||||
if (in_array($role->archetype, $rolesallowed)) {
|
||||
$this->assertTrue($co->prepare());
|
||||
$co->proceed();
|
||||
$courseid = $DB->get_field('course', 'id', ['shortname' => 'newcourse'], MUST_EXIST);
|
||||
|
@ -59,17 +59,15 @@ class repository_equella_generator extends testing_repository_generator {
|
||||
if (!isset($record['equella_sharedsecret'])) {
|
||||
$record['equella_sharedsecret'] = 'secret';
|
||||
}
|
||||
if (!isset($record['equella_manager_shareid'])) {
|
||||
$record['equella_manager_shareid'] = '';
|
||||
}
|
||||
if (!isset($record['equella_manager_sharedsecret'])) {
|
||||
$record['equella_manager_sharedsecret'] = '';
|
||||
}
|
||||
if (!isset($record['equella_editingteacher_shareid'])) {
|
||||
$record['equella_editingteacher_shareid'] = '';
|
||||
}
|
||||
if (!isset($record['equella_editingteacher_sharedsecret'])) {
|
||||
$record['equella_editingteacher_sharedsecret'] = '';
|
||||
// Set defaults for all generated options for each role with editing capabilities.
|
||||
$editingroles = get_roles_with_capability('moodle/course:manageactivities', CAP_ALLOW);
|
||||
foreach ($editingroles as $role) {
|
||||
if (!isset($record["equella_{$role->shortname}_shareid"])) {
|
||||
$record["equella_{$role->shortname}_shareid"] = '';
|
||||
}
|
||||
if (!isset($record["equella_{$role->shortname}_sharedsecret"])) {
|
||||
$record["equella_{$role->shortname}_sharedsecret"] = '';
|
||||
}
|
||||
}
|
||||
return $record;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user