Moodle

installation failing on infinite loop in forum_add_user_default_subscriptions()

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.7, 1.8
  • Fix 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...

Activity

Hide
Yu Zhang added a comment -

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.

Show
Yu Zhang added a comment - 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.
Hide
Petr Škoda (skodak) added a comment -

I am no expert on CONTEXT_SYSTEM - I believe you, closing now

Show
Petr Škoda (skodak) added a comment - I am no expert on CONTEXT_SYSTEM - I believe you, closing now

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: