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

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

XMLWordPrintable

    • MOODLE_500_STABLE
    • 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 -P '(?<!::)data_print_template\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_preset_name\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_get_available_presets\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_get_available_site_presets\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_delete_site_preset\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_presets_save\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_presets_generate_xml\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_presets_export\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_user_can_delete_preset\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt'
        git grep -n -C2 -P '(?<!::)data_view\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' 

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

        git grep -n -C2 -P '(?<!::)is_directory_a_preset\(' -- ':!mod/data/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 -P '(?<!::)import_setting_mappings\(' -- ':!mod/data/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 -P '(?<!::)data_print_template\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_preset_name\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_get_available_presets\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_get_available_site_presets\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_delete_site_preset\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_presets_save\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_presets_generate_xml\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_presets_export\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_user_can_delete_preset\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' git grep -n -C2 -P '(?<!::)data_view\(' -- ':!mod/data/deprecatedlib.php' ':!.upgradenotes/MDL-75189-2024100107115232.yml' ':!mod/data/upgrade.txt' Confirm it returns nothing. Execute the following:  git grep -n -C2 -P '(?<!::)is_directory_a_preset\(' -- ':!mod/data/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 -P '(?<!::)import_setting_mappings\(' -- ':!mod/data/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: Fri Jan 24 09:26:27 PM 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: Fri Jan 24 09:26:27 PM UTC 2025
    • Show
      Launching automatic jobs for branch MDL-75189 _final-deprecation-of-functions-in_mod-data-lib.php https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18081/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61774/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61775/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61776/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61777/ App tests (stable app version) Built on: Mon Jan 27 12:30:36 PM 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)
            Paul Holden Paul Holden
            Ferran Recio Ferran Recio
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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