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

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

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_35_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
      1. Unit tests cover this.
    • 0
    • Internationals - 3.11 Sprint 8, Internationals - 3.11 Sprint 9

      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

            jpataleta Jun Pataleta
            stronk7 Eloy Lafuente (stronk7)
            Shamim Rezaie Shamim Rezaie
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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