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

Refactor similar SQL generation code from get_users_by_capability & get_enrolled_uses to make get_with_capability_sql

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Please note as this is just a refactoring of current code, there is no specific manual test. Automated tests should suffice. This issue will be used extensively within MDL-27072 where there will be manual and automated tests.

      Show
      Please note as this is just a refactoring of current code, there is no specific manual test. Automated tests should suffice. This issue will be used extensively within MDL-27072 where there will be manual and automated tests.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      wip-MDL-31243-master

      Description

      These two library functions contain very similar code that should be refactored out to avoid duplication.

      In addition, the proposed get_with_capability_sql will be useful in other places, for example the quiz reports.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16