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

tool_replace: additional skip tables

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE
    • Pull 3.10 Branch:
      MDL-69746-MOODLE_310_STABLE
    • Pull Master Branch:
      MDL-69746-Master
    • Testing Instructions:
      Hide

      Additional skip tables

      1. Create a user with last name "MDL-00000 User"
      2. Create a course
      3. Create an assignment named "MDL-00000 Assignment"
      4. Create a quiz named "MDL-00000 Quiz"
      5. Run this cli:
        •  php admin/tool/replace/cli/replace.php --search="MDL-00000" --replace="MDL-69746" --skiptables="user, quiz"
      6. Expected:
        • Assignment name is changed to "MDL-69746 Assignment"
        • Quiz name is not changed:  "MDL-00000 Quiz"
        • User last name is not changed: "MDL-00000 User"
      7. Go to "http://your.moodle.site/admin/tool/replace/index.php". Enter these info
        • Search whole database for: "MDL-00000"
        • Replace with this string: "MDL-69746"
        • Additional skip tables: "user"
      8. Tick on "I understand the risks of this operation"
      9. Click on "Yes, do it"
      10. Expected:
        • Quiz name is changed to :  "MDL-69746 Quiz"
        • User last name is not changed: "MDL-00000 User"
      Show
      Additional skip tables Create a user with last name "MDL-00000 User" Create a course Create an assignment named "MDL-00000 Assignment" Create a quiz named "MDL-00000 Quiz" Run this cli:   php admin/tool/replace/cli/replace.php --search="MDL-00000" --replace=" MDL-69746 " --skiptables="user, quiz" Expected: Assignment name is changed to " MDL-69746 Assignment" Quiz name is not changed:  " MDL-00000 Quiz" User last name is not changed: " MDL-00000 User" Go to "http://your.moodle.site/admin/tool/replace/index.php". Enter these info Search whole database for: " MDL-00000 " Replace with this string: " MDL-69746 " Additional skip tables: "user" Tick on "I understand the risks of this operation" Click on "Yes, do it" Expected: Quiz name is changed to :  " MDL-69746 Quiz" User last name is not changed: " MDL-00000 User"

      Description

      I am looking to add extra tables to this list (via admin setting):

      https://github.com/moodle/moodle/blob/master/lib/adminlib.php#L9075

      There are some large tables (and we don't want to replace data in those tables) we want to skip so that it will take less time to run the replace script.

        Attachments

          Activity

            People

            Assignee:
            Nguyen Nathan Nguyen
            Reporter:
            Nguyen Nathan Nguyen
            Peer reviewer:
            Dmitrii Metelkin Dmitrii Metelkin
            Integrator:
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Tester:
            Anna Carissa Sadia Anna Carissa Sadia
            Participants:
            Component watchers:
            Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Nov/20

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 55 minutes
                1h 55m