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

Multiple calls to update_shipped_tours() in upgrade. Ways to avoid that.

XMLWordPrintable

    • MOODLE_37_STABLE

      With this is not critical at all, it's a good case exposing how there is some stuff, update_shipped_tours() for example, that can end being called multiple time in different steps of a component upgrade.php

      This is about see which alternatives are, and decide how to handle these cases in general, documenting it and, in particular, fixing the update_shipped_tours() case.

      There are various alternatives:

      A - Allow code to happen unconditionally out from upgrade savepoints. So arbitrary code can be executed and the beginning or the end.
      B - Achieve the arbitrary code execution by supporting my some new post-upgrade php script (similar to install.php).
      C - Build some mechanishm within the called code, so it' sonly executed once.
      D - Simply, remove the old calls, keeping always the last one.

      And that's all. Feel free to add more alternatives or comment about any of them.

      Ciao

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.