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

Final deprecation of functions in mod/data/lib.php

    • MDL-75189_final-deprecation-of-functions-in_mod-data-lib.php
    • Hide
      1. Confirm all automated tasks are happy (Behat and Unittest)
      2. Execute the following: 

        git grep -n -C2 'data_print_template(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_preset_name(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_get_available_presets(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_get_available_site_presets(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_delete_site_preset(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'is_directory_a_preset(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_presets_save(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_presets_generate_xml(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_presets_export(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_user_can_delete_preset(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 'data_view(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        

      3. Confirm it returns nothing.
      4. Execute the following: 

        git grep -n -C2 'is_directory_a_preset(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        

      5. Confirm it only returns false positive of the new preset::is_directory_a_preset().
      6. Execute the following: 

        git grep -n -C2 'import_setting_mappings(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        

      7. Confirm it only returns the function stub in \mod_data_renderer.
      Show
      Confirm all automated tasks are happy (Behat and Unittest) Execute the following:  git grep -n -C2 'data_print_template(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_preset_name(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_get_available_presets(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_get_available_site_presets(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_delete_site_preset(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'is_directory_a_preset(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_presets_save(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_presets_generate_xml(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_presets_export(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_user_can_delete_preset(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 'data_view(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' Confirm it returns nothing. Execute the following:  git grep -n -C2 'is_directory_a_preset(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' Confirm it only returns false positive of the new preset::is_directory_a_preset() . Execute the following:  git grep -n -C2 'import_setting_mappings(' -- ':!lib/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' Confirm it only returns the function stub in \mod_data_renderer .
    • Hide

      Code verified against automated checks.

      Checked MDL-75189 using repository: https://github.com/ziegenberg/moodle

      More information about this report

      Built on: Mon Jan 13 11:50:14 AM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-75189 using repository: https://github.com/ziegenberg/moodle main (0 errors / 0 warnings) [branch: MDL-75189_final-deprecation-of-functions-in_mod-data-lib.php | CI Job ] More information about this report Built on: Mon Jan 13 11:50:14 AM UTC 2025

      In MDL-75059, MDL-75148 and MDL-75187 several improvements have been implemented to the Database activity. 

      A few functions have been deprecated in order to move them to the new API (to remove them from the legacy lib.php). This issue is for the final deprecation of all these functions.

            Daniel Ziegenberg Daniel Ziegenberg
            sarjona Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

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