Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.7, 1.8
-
Component/s: Installation
-
Labels:None
-
Affected Branches:MOODLE_17_STABLE, MOODLE_18_STABLE
-
Fixed Branches:MOODLE_17_STABLE, MOODLE_18_STABLE
Description
installation failing on infinite loop in admin/user.php when creating admin account in forum_add_user_default_subscriptions(), cause by recent improvement in get_context_instance() -
// This is really a systen context
if ($contextlevel == CONTEXT_COURSE && $instance == SITEID) {
$contextlevel = CONTEXT_SYSTEM;
}
I am going to commit some quick fix - please review and find better solution...
Hi,
I really think this logic is ok, the site context should be 1 context instead of being separate. If they are 2, some capabilities needs to be set in CONTEXT_SYSTEM (site:config for example) while others needs to be set in CONTEXT_COURSE (all the mod capabilities), or set all capabilities at both contexts. I am not sure there are benefits of keep them separate.
I have seen your patch in forum, and I don't really know how to make it better.