Add-ons
  1. Add-ons
  2. CONTRIB-3360

OU wiki: Should define capabilities used: error get_in_or_equal() does not accept empty arrays

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      LAMP- PHP 5.3.8-1
      Moodle 2.2.1 (Build: 20120109)
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_22_STABLE
    • Rank:
      37796

      Description

      moodle_database::get_in_or_equal() does not accept empty arrays

      Stack trace:

      line 595 of /lib/dml/moodle_database.php: coding_exception thrown
      line 6410 of /lib/accesslib.php: call to moodle_database->get_in_or_equal()
      line 7161 of /lib/accesslib.php: call to context_module->get_capabilities()
      line 69 of /admin/roles/lib.php: call to fetch_context_capabilities()
      line 261 of /admin/roles/lib.php: call to capability_table_base->__construct()
      line 191 of /admin/roles/permissions.php: call to permissions_table->__construct()

        Issue Links

          Activity

          Hide
          philippe petitqueux added a comment -

          It happens when trying to set permissions.

          Show
          philippe petitqueux added a comment - It happens when trying to set permissions.
          Hide
          Sam Marshall added a comment -

          I don't see that error in our Moodle 2.1-based system. The error is happening outside ouwiki code within standard moodle but it may be a result of some option that isn't done in our module.

          We are going to be upgrading our developer systems to Moodle 2.2 in a few weeks, so I hope can fix this problem at that point.

          Just to clarify, exactly what are you doing when that error occurs - is it immediately when you click the 'Permissions' link from the ouwiki page, or is it only when you actually change a permission, or what?

          Show
          Sam Marshall added a comment - I don't see that error in our Moodle 2.1-based system. The error is happening outside ouwiki code within standard moodle but it may be a result of some option that isn't done in our module. We are going to be upgrading our developer systems to Moodle 2.2 in a few weeks, so I hope can fix this problem at that point. Just to clarify, exactly what are you doing when that error occurs - is it immediately when you click the 'Permissions' link from the ouwiki page, or is it only when you actually change a permission, or what?
          Hide
          Dan Marsden added a comment -

          FYI - I'm getting the same error with mod/feedback in 2.2 when clicking the "permissions" link too (found this bug with a google search)

          Show
          Dan Marsden added a comment - FYI - I'm getting the same error with mod/feedback in 2.2 when clicking the "permissions" link too (found this bug with a google search)
          Hide
          Dan Marsden added a comment -

          see MDL-31360 for more info

          Show
          Dan Marsden added a comment - see MDL-31360 for more info
          Hide
          Sam Marshall added a comment -

          awesome - thanks dan...

          Show
          Sam Marshall added a comment - awesome - thanks dan...
          Hide
          Sam Marshall added a comment -

          Although the system bug causing this error should be fixed, ouwiki should probably in fact define the function that Dan identified as missing to cause this problem. Otherwise you can't customise accessalllgroups behaviour on a wiki. Changing name of this bug slightly to reflect that.

          Show
          Sam Marshall added a comment - Although the system bug causing this error should be fixed, ouwiki should probably in fact define the function that Dan identified as missing to cause this problem. Otherwise you can't customise accessalllgroups behaviour on a wiki. Changing name of this bug slightly to reflect that.
          Hide
          Sam Marshall added a comment -

          I added the function and pushed the change to github. (Have only tested on 2.1, but thanks to Dan's detective work, it looks like this will probably fix the problem on 2.2.)

          Show
          Sam Marshall added a comment - I added the function and pushed the change to github. (Have only tested on 2.1, but thanks to Dan's detective work, it looks like this will probably fix the problem on 2.2.)
          Hide
          philippe petitqueux added a comment -

          Great. It works now perfectly.

          Thanks?

          Show
          philippe petitqueux added a comment - Great. It works now perfectly. Thanks?

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development