Moodle
  1. Moodle
  2. MDL-28169

Add Moodle 2.1.0 upgrade line to all the upgrade.php scripts

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: 2.1.1
    • Component/s: Installation
    • Labels:
    • Rank:
      17783

      Description

      In order to have it properly detected for the future it would be great to add to all the upgrade.php scripts some lines like these:

      // Moodle v2.1.0 release upgrade line
      // Put any upgrade step following this
      

      exactly before the "return true;" present in all the scripts.

      I think it's ok to do that both in the 21_STABLE and master branches, so they will allow quickly find where 2.1.0 started and act once we decide the Moodle 2.2 requirements.

      Command to detect all the upgrade.php files not having those lines:

      find . -name upgrade.php | xargs grep -vl "Moodle v2.1.0 release upgrade line"
      

      Ciao

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          We should probably get rid of all the old upgrade stuff at the same time in 2.2.

          Btw what was the decision for 2.1 upgrades, does it run from 1.9.x? Did anybody test it actually?

          Show
          Petr Škoda added a comment - We should probably get rid of all the old upgrade stuff at the same time in 2.2. Btw what was the decision for 2.1 upgrades, does it run from 1.9.x? Did anybody test it actually?
          Hide
          Aparup Banerjee added a comment -

          Petr, how old is old in 'old upgrade stuff'?

          Show
          Aparup Banerjee added a comment - Petr, how old is old in 'old upgrade stuff'?
          Hide
          Petr Škoda added a comment -

          anything that is not executed any more

          Show
          Petr Škoda added a comment - anything that is not executed any more
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sorry Aparup, I know you are going to hate me but could you, please fix the patch a bit so:

          1) there is always one (and only one) blank line between the end of code and the start of comment.
          2) there is always one (and only one) blank like between the end of comment and the the return true sentence.

          I know I'm a bit paranoid, but specially the point 2) make me think people could interpret that new code must be "after" the return, leading to all sort of idiot problems.

          I was going to do it myself but thought that perhaps you had some script ready to do so.

          Don't worry about the 21_STABLE branch, I can cherry-pick from master later, as you want. Just provide 1 commit with everything (the original changes + the 1) and 2) above). Only 1 commit for master.

          Once again, apologises, I know it's only one comment but...

          Show
          Eloy Lafuente (stronk7) added a comment - Sorry Aparup, I know you are going to hate me but could you, please fix the patch a bit so: 1) there is always one (and only one) blank line between the end of code and the start of comment. 2) there is always one (and only one) blank like between the end of comment and the the return true sentence. I know I'm a bit paranoid, but specially the point 2) make me think people could interpret that new code must be "after" the return, leading to all sort of idiot problems. I was going to do it myself but thought that perhaps you had some script ready to do so. Don't worry about the 21_STABLE branch, I can cherry-pick from master later, as you want. Just provide 1 commit with everything (the original changes + the 1) and 2) above). Only 1 commit for master. Once again, apologises, I know it's only one comment but...
          Hide
          Aparup Banerjee added a comment -

          OK thats done Eloy , script = regex in netbeans

          Show
          Aparup Banerjee added a comment - OK thats done Eloy , script = regex in netbeans
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks! (21 and master)

          Offtopic: There is one excess of 1 blank line in feedback but, after hard evaluation, I decided to be magnanimous, LOL. Many thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (21 and master) Offtopic: There is one excess of 1 blank line in feedback but, after hard evaluation, I decided to be magnanimous, LOL. Many thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Passed, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Passed, thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          All this cool stuff is now part of Moodle, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - All this cool stuff is now part of Moodle, thanks!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: