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

    • MOODLE_22_STABLE, MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • wip-MDL-31243-master
    • 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.

    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

              jb23347 John Beedell
              timhunt Tim Hunt
              Tim Hunt Tim Hunt
              Andrew Lyons Andrew Lyons
              CiBoT CiBoT
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/16