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

Front page is broken for upgrade due to completionpassgrade available only after upgrade

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull Master Branch:
      MDL-72851-master
    • Testing Instructions:
      Hide

      Note: You need a 3.11 site installation.

      1. Login as admin in your 3.11 site and go to front page.
      2. Switch branch to 4.0. (Make sure the 4.0 has the patch applied).
      3. Visit any of index.php, login/index.php, my/index.php, admin/search.php.
      4. Ensure you are logged out and prompted to upgrade and no errors are presented.
      5. Follow the instructions and upgrade the site.
      6. Login as admin and go to front page.
      7. Ensure no errors is presented.
      Show
      Note:  You need a 3.11 site installation. Login as admin in your 3.11 site and go to front page. Switch branch to 4.0. (Make sure the 4.0 has the patch applied). Visit any of index.php, login/index.php, my/index.php, admin/search.php. Ensure you are logged out and prompted to upgrade and no errors are presented. Follow the instructions and upgrade the site. Login as admin and go to front page. Ensure no errors is presented.

      Description

      It is possible to get error for front page if site is upgraded to 4.0. Unfortunately I don't have exact steps to reproduce - it depends on data - activities setup I assume. But when you logged in as admin, switch to 4.0 branch from 3.11 and reload front page you might end up with

      Notice: Undefined property: stdClass::$completionpassgrade in /Users/stronk7/git_moodle/integration/course/lib.php on line 464
      

      After running upgrade (view going to admin/index.php or cli) the error goes away. So it seems that the front page is trying to access to stuff that still not exists. Best course of action seems to update is_major_upgrade_required since 52206 introduced big db changes for modules

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ilyatregubov Ilya Tregubov
              Reporter:
              ilyatregubov Ilya Tregubov
              Peer reviewer:
              Carlos Escobedo Carlos Escobedo
              Integrator:
              Andrew Lyons Andrew Lyons
              Tester:
              Angelia Dela Cruz Angelia Dela Cruz
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 38 minutes
                  38m