Moodle
  1. Moodle
  2. MDL-32780

Code cleanup in tool_assignmentupgrade. Change manual sql to use get_in_or_equal() and count_records_sql()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide

      View the assignment upgrade tool with 0 instances of mod_assignment.

      View the assignment upgrade tool with 1 instance of mod_assignment.

      View the assignment upgrade tool with > 1 instance of mod_assignment.

      (Site Administration -> Assignment upgrade helper)

      Should not report any SQL errors to the page.

      Show
      View the assignment upgrade tool with 0 instances of mod_assignment. View the assignment upgrade tool with 1 instance of mod_assignment. View the assignment upgrade tool with > 1 instance of mod_assignment. (Site Administration -> Assignment upgrade helper) Should not report any SQL errors to the page.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-32780-CLEAN
    • Rank:
      39780

      Description

      Use Moodle functions for creating SQL rather than building the queries manually in functions:

      tool_assignmentupgrade_load_all_upgradable_assignmentids() and
      tool_assignmentupgrade_any_upgradable_assignments()

        Activity

        Hide
        Dan Poltawski added a comment -

        Looks good to me Damyon, submitting for integration review.

        It'd be great if you could do this against the master branch too as I think its still based off your WIP branch.

        Show
        Dan Poltawski added a comment - Looks good to me Damyon, submitting for integration review. It'd be great if you could do this against the master branch too as I think its still based off your WIP branch.
        Hide
        Damyon Wiese added a comment -

        Hi Dan,

        I have cherry-picked this onto my master branch and updated the git diff url.

        Regards, Damyon

        Show
        Damyon Wiese added a comment - Hi Dan, I have cherry-picked this onto my master branch and updated the git diff url. Regards, Damyon
        Hide
        Damyon Wiese added a comment -

        Sorry - I misread this. Just changed to a separate branch based off master - I have updated the git diff URL and branch.

        Show
        Damyon Wiese added a comment - Sorry - I misread this. Just changed to a separate branch based off master - I have updated the git diff URL and branch.
        Hide
        Sam Hemelryk added a comment -

        Thanks Damyon, this has been integrated now.

        Show
        Sam Hemelryk added a comment - Thanks Damyon, this has been integrated now.
        Hide
        Sam Hemelryk added a comment -

        Tested and passed

        Show
        Sam Hemelryk added a comment - Tested and passed
        Hide
        Eloy Lafuente (stronk7) added a comment -

        This is now part of Moodle and a few millions people around the globe will be using it soon. Isn't that awesome?

        Many, many thanks and don't forget http://youtu.be/4N7dPaP5Z8U

        Closing, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - This is now part of Moodle and a few millions people around the globe will be using it soon. Isn't that awesome? Many, many thanks and don't forget http://youtu.be/4N7dPaP5Z8U Closing, ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: