Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31360

regression: cannot set permissions on feedback instances

    XMLWordPrintable

Details

    Description

      Crete a feedback on your 2.2 site - once created enter it and click the "permissions" link for this feedback instance - gets this error:
      Permissions in Feedback: feedback name

      Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays

      More information about this error
      Stack trace:

      line 595 of /lib/dml/moodle_database.php: coding_exception thrown
      line 6399 of /lib/accesslib.php: call to moodle_database->get_in_or_equal()
      line 7150 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()

      looks to be related to the way accesslib uses modulename_get_extra_capabilities() - Feedback mod doesn't have this function so it uses an empty array() - which it doesn't like.

      It seems to me that acceslib shouldn't be relying on this function to exist - it should handle itself a bit better when this function doesn't exist (many 3rd party mods won't have this function either for example ouwiki - see CONTRIB-3360 for details_

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              danmarsden Dan Marsden
              Andrew Davis Andrew Davis
              Aparup Banerjee Aparup Banerjee
              Aparup Banerjee Aparup Banerjee
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Mar/12