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

Editing permissions in feedback module on front page causes exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.3, 2.3
    • Component/s: Feedback
    • Labels:
    • Environment:
      CentOS / Apache

      Description

      Coding error detected, it must be fixed by a programmer: 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()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              grabs Andreas Grabs added a comment -

              Thank you for reporting this!
              Andreas

              Show
              grabs Andreas Grabs added a comment - Thank you for reporting this! Andreas
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              Hide
              nebgor Aparup Banerjee added a comment - - edited

              Hi all,
              Just last week we had a solution for this error , see MDL-31360. This should have been marked as duplicate, please have a look at the solution implemented there - basically, we've decided there that *_get_extra_capabilities() isn't mandatory.

              review comments:

              • do we really need the proposed list of permissions here?
              • @return needs to follow this format
              • note whitespace at end of function.

              I'm leaving this re-opened to comment but it seems we can close this based on reported issue, so please close if agreed.

              cheers,
              Aparup

              Show
              nebgor Aparup Banerjee added a comment - - edited Hi all, Just last week we had a solution for this error , see MDL-31360 . This should have been marked as duplicate, please have a look at the solution implemented there - basically, we've decided there that *_get_extra_capabilities() isn't mandatory. review comments: do we really need the proposed list of permissions here? @return needs to follow this format note whitespace at end of function. I'm leaving this re-opened to comment but it seems we can close this based on reported issue, so please close if agreed. cheers, Aparup
              Hide
              grabs Andreas Grabs added a comment -

              Hi,
              I would like to know whether there are some things I can/have to do so that these commits will be integrated.
              If it will never be integrated it would be nice to know .
              Best regards
              Andreas

              Show
              grabs Andreas Grabs added a comment - Hi, I would like to know whether there are some things I can/have to do so that these commits will be integrated. If it will never be integrated it would be nice to know . Best regards Andreas
              Hide
              nebgor Aparup Banerjee added a comment -

              Hi Andreas,

              I'm closing this issue as duplicate of MDL-31360 which has been already resolved.

              Show
              nebgor Aparup Banerjee added a comment - Hi Andreas, I'm closing this issue as duplicate of MDL-31360 which has been already resolved.
              Hide
              grabs Andreas Grabs added a comment -

              Hi Aparup,
              I don't know what I should do now. What is with my fixes.
              Will these be integrated or not?
              I think not. But it would be nice that I get any information about this.
              Should these fix-branches deleted on my repository?
              Andreas

              Show
              grabs Andreas Grabs added a comment - Hi Aparup, I don't know what I should do now. What is with my fixes. Will these be integrated or not? I think not. But it would be nice that I get any information about this. Should these fix-branches deleted on my repository? Andreas
              Hide
              nebgor Aparup Banerjee added a comment - - edited

              Hi Andreas,
              as mentioned in this comment:here this issue is a duplicate of MDL-31360.

              It has already been fixed in MDL-31360.
              The fixes can be seen here : http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-31360
              basically, in the fix, the empty array is merged so the query doesn't deal with any empty array now.

              feedback_get_extra_capabilities() that 'Returns all other caps used in module' seems not needed now as the issue with 'moodle_database::get_in_or_equal() does not accept empty arrays' has been solved by MDL-31360's fix.

              However, the code itself may be still helpful so i'm adding others (Eloy + SamH) here to comment.

              ps: This issue seems to have missed actual triaging and peer-reviews too.

              Show
              nebgor Aparup Banerjee added a comment - - edited Hi Andreas, as mentioned in this comment: here this issue is a duplicate of MDL-31360 . It has already been fixed in MDL-31360 . The fixes can be seen here : http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-31360 basically, in the fix, the empty array is merged so the query doesn't deal with any empty array now. feedback_get_extra_capabilities() that 'Returns all other caps used in module' seems not needed now as the issue with 'moodle_database::get_in_or_equal() does not accept empty arrays' has been solved by MDL-31360 's fix. However, the code itself may be still helpful so i'm adding others (Eloy + SamH) here to comment. ps: This issue seems to have missed actual triaging and peer-reviews too.

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/12