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

Properly deprecate notify()

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 3.1
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide
      Test 1
      1. Review the patch and confirm it makes sense.
      Test 2
      1. Check there are no calls to the function notify() in core.
      Test 3
      1. Download the attached file notify_test.php and place it in your root directory. Visit <yoursite>/notify_test.php and confirm you get the below output -

      The course is empty
      WARNING: Cannot copy the file
      ERROR: The Common Cartridge import requires PHP 5 or higher.
      ERROR: The Common Cartridge import requires DOM extension.
      ERROR: The Common Cartridge import requires LIBXML extension.
      ERROR: The Common Cartridge import requires LIBXML version 2.6.30 or newer.
      ERROR: The Common Cartridge import requires XSL.
      ERROR: The Common Cartridge package requires authorization.
      The schema is not valid.
      Cannot load the XML manifest.
      Question sessions for questions 1, 2, 3 were missing when upgrading question usage.
      notify() is deprecated, please use $OUTPUT->notification() instead
       
          line 915 of /lib/deprecatedlib.php: call to debugging()
          line 64 of /notify_test.php: call to notify()
       
      Should get a debugging message.
      

      Show
      Test 1 Review the patch and confirm it makes sense. Test 2 Check there are no calls to the function notify() in core. Test 3 Download the attached file notify_test.php and place it in your root directory. Visit <yoursite>/notify_test.php and confirm you get the below output - The course is empty WARNING: Cannot copy the file ERROR: The Common Cartridge import requires PHP 5 or higher. ERROR: The Common Cartridge import requires DOM extension. ERROR: The Common Cartridge import requires LIBXML extension. ERROR: The Common Cartridge import requires LIBXML version 2.6.30 or newer. ERROR: The Common Cartridge import requires XSL. ERROR: The Common Cartridge package requires authorization. The schema is not valid. Cannot load the XML manifest. Question sessions for questions 1, 2, 3 were missing when upgrading question usage. notify() is deprecated, please use $OUTPUT->notification() instead   line 915 of /lib/deprecatedlib.php: call to debugging() line 64 of /notify_test.php: call to notify()   Should get a debugging message.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50269_master

      Description

      Properly deprecate notify()

      notify()

      backup/cc/cc2moodle.php:            notify('The course is empty');
       
      backup/cc/entities.class.php:                    notify('WARNING: Cannot copy the file ' . $source . ' to ' . $destination);
       
      backup/cc/restore_cc.php:                notify(get_string('cc_import_req_php5', 'imscc'));
       
      backup/cc/restore_cc.php:                notify(get_string('cc_import_req_dom', 'imscc'));
       
      backup/cc/restore_cc.php:                notify(get_string('cc_import_req_libxml', 'imscc'));
       
      backup/cc/restore_cc.php:                notify(get_string('cc_import_req_libxmlminversion', 'imscc'));
       
      backup/cc/restore_cc.php:                notify(get_string('cc_import_req_xsl', 'imscc'));
       
      backup/cc/restore_cc.php:                        notify(get_string('cc2moodle_req_auth', 'imscc'));
       
      backup/cc/restore_cc.php:                    notify(get_string('cc2moodle_invalid_schema', 'imscc'));
       
      backup/cc/restore_cc.php:                notify(get_string('cc2moodle_manifest_dont_load', 'imscc'));
       
      question/engine/upgrade/upgradelib.php:            notify("Question sessions for questions " .
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16