Uploaded image for project: '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
    • Status: Closed
    • Priority: 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

      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()

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            poltawski 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
            poltawski 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 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 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 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 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
            samhemelryk Sam Hemelryk added a comment -

            Thanks Damyon, this has been integrated now.

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

            Tested and passed

            Show
            samhemelryk Sam Hemelryk added a comment - Tested and passed
            Hide
            stronk7 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
            stronk7 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:
                  Fix Release Date:
                  25/Jun/12