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

Fix completion_info->get_data() behaviors and cover all combinations

    XMLWordPrintable

Details

    • 0
    • Internationals - 3.11 Sprint 8, Internationals - 3.11 Sprint 9

    Description

      This comes from MDL-46960, more exactly about this change performed by one of the commits there:

      https://github.com/moodle/moodle/commit/f797471#diff-bc62478f68c28220d49cc37b8c1b42657e92fe501b6e4687d13bac69fcf46d06L924-R924

      By joining the $usecache and $wholecourse conditions together, the method behavior changed dramatically and, since then, instead of running the "wholecourse" code, we are running the "simple" code. No apparent explanation about that change was found in code or tracker comments, so a question was raised there.

      Because of bogus unit tests covering that function... everything continued passing and only when some changes in phpunit were being worked (no issue yet, it's about phpunit9), is when tests started to fail.

      So this issue is about:

      1) split the $usecache and $wholecourse conditions if needed.
      2) ensure that the behavior is the correct one for all combinations of them.
      3) cover all behaviors with tests (mocked or no), so they become fixed 100% (in tests we trust).

      Ciao

      Attachments

        Issue Links

          Activity

            People

              jpataleta Jun Pataleta
              stronk7 Eloy Lafuente (stronk7)
              Shamim Rezaie Shamim Rezaie
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              CiBoT CiBoT
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/May/21

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 55 minutes
                  55m