mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-65782 roles: allow several roles with user/frontpage archetype
This commit is contained in:
parent
29c395187f
commit
5ecbc5d9f7
5 changed files with 8 additions and 13 deletions
|
@ -76,7 +76,7 @@ class tool_lp_external_testcase extends externallib_advanced_testcase {
|
|||
* Setup function- we will create a course and add an assign instance to it.
|
||||
*/
|
||||
protected function setUp() {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
|
@ -91,9 +91,7 @@ class tool_lp_external_testcase extends externallib_advanced_testcase {
|
|||
$catcontext = context_coursecat::instance($category->id);
|
||||
|
||||
// Fetching default authenticated user role.
|
||||
$userroles = get_archetype_roles('user');
|
||||
$this->assertCount(1, $userroles);
|
||||
$authrole = array_pop($userroles);
|
||||
$authrole = $DB->get_record('role', array('id' => $CFG->defaultuserroleid));
|
||||
|
||||
// Reset all default authenticated users permissions.
|
||||
unassign_capability('moodle/competency:competencygrade', $authrole->id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue