mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
![]() This is part 1 that does the back-end: 1. New table role_allow_switch. 2. Upgrade that copies all the allows from role_allow_assign, and then drops the old CFG->allowuserswitchrolestheycantassign. 3. Old function get_assignable_roles_for_switchrole renamed to get_switchable_roles and changed to use the new table. Fixes MDL-18604 in HEAD. 4. Switch callers to use the new function name. 5. Unit tests for this new function. 6. To make those unit tests work, new switch_global_user_id and revert_global_user_id methods in UnitTestCaseUsingDatabase for toggling $USER->id. I still need to do the editing interface under Administration ► Users ► Permissions ► Define roles. That will be done as a second commit. |
||
---|---|---|
.. | ||
fixtures | ||
completion.manualtest.txt | ||
portfolio_testclass.php | ||
testaccesslib.php | ||
testajaxlib.php | ||
testbackuplib.php | ||
testcode.php | ||
testcompletionlib.php | ||
testconditionlib.php | ||
testeventslib.php | ||
testgradelib.php | ||
testmathslib.php | ||
testmoodlelib.php | ||
testportfolioaddbutton.php | ||
testportfoliolib.php | ||
testquestionlib.php | ||
testrepositorylib.php | ||
testsimpletestlib.php | ||
testunittestusingdb.php | ||
testweblib.php |