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

Properly deprecate get_file_url()

XMLWordPrintable

    • MOODLE_29_STABLE
    • MOODLE_31_STABLE
    • MDL-50268-master
    • Easy
    • Hide

      Testing RSS - rss_get_url() changes

      The main purpose of this testing is make sure the usages rss_get_url() which used to call get_file_url() still works as expected and generate rss url correctly, the generated url should be similar to this one:

      http://localhost/stable_master/rss/file.php/241/c771a0e7665ed2aee4dd3430abae84cb/mod_data/2/rss.xml

      1. Search for RSS.
      2. On the Search Results page, enable:
        • Firstly enable site RSS feeds (enablerssfeeds) at site level, click on the checkbox and Save Changes.
          Once enabled, other RSS on course level options will be available.
        • Enable Database RSS feeds (data_enablerssfeeds).
        • Enable Forum RSS feeds (forum_enablerssfeeds), change RSS feed type to Discussions and select 5 on Number of RSS recent articles.
        • Enable Glossary RSS feeds (glossary_enablerssfeeds) and Save changes.
      3. In a given course, create a new forum, on the forum form expand RSS set RSS feed for this activity to Discussions and Number of RSS recent articles to 5 save and display.
      4. On the Forum administration, note the RSS feed of discussions option, click on the link.
      5. Make sure the XML file is opened.
      6. Create a new glossary, on the form expand RSS and set RSS feed for this activity to Concepts with author and Number of RSS recent articles to 5 save and display.
      7. On the Glossary administration, note the RSS feed for this activity option, click on the link.
      8. Make sure the XML file is opened.
      9. Create a new database activity, on the form expand RSS and set Entries in the RSS feed to 5 save and display.
      10. On the Database activity administration, note the RSS feed for this activity option, click on the link.
      11. Make sure the XML file is opened.

      Backup restore testing

      The affected change on the backup/util/helper/restore_structure_parser_processor.class.php is a bit hard to reproduce a good way to test this change is:

      1. Back up a course on a 2.2 instance (on 2.2 we had file.php on the root directory).
      2. Restore it on your master instance, making sure no error is displayed and the course was properly restored.

      Deprecation testing

      1. Grep for get_file_url() and verify the only occurrences is on lib/deprecationlib.php.
      2. Download and run the attached file on your browser and make sure the links are displayed correctly and similar and the debug message is displayed.
      Show
      Testing RSS - rss_get_url() changes The main purpose of this testing is make sure the usages rss_get_url() which used to call get_file_url() still works as expected and generate rss url correctly, the generated url should be similar to this one: http://localhost/stable_master/rss/file.php/241/c771a0e7665ed2aee4dd3430abae84cb/mod_data/2/rss.xml Search for RSS . On the Search Results page, enable: Firstly enable site RSS feeds (enablerssfeeds) at site level, click on the checkbox and Save Changes . Once enabled, other RSS on course level options will be available. Enable Database RSS feeds (data_enablerssfeeds). Enable Forum RSS feeds (forum_enablerssfeeds), change RSS feed type to Discussions and select 5 on Number of RSS recent articles . Enable Glossary RSS feeds (glossary_enablerssfeeds) and Save changes . In a given course, create a new forum , on the forum form expand RSS set RSS feed for this activity to Discussions and Number of RSS recent articles to 5 save and display. On the Forum administration, note the RSS feed of discussions option, click on the link. Make sure the XML file is opened. Create a new glossary, on the form expand RSS and set RSS feed for this activity to Concepts with author and Number of RSS recent articles to 5 save and display. On the Glossary administration, note the RSS feed for this activity option, click on the link. Make sure the XML file is opened. Create a new database activity, on the form expand RSS and set Entries in the RSS feed to 5 save and display. On the Database activity administration, note the RSS feed for this activity option, click on the link. Make sure the XML file is opened. Backup restore testing The affected change on the backup/util/helper/restore_structure_parser_processor.class.php is a bit hard to reproduce a good way to test this change is: Back up a course on a 2.2 instance (on 2.2 we had file.php on the root directory). Restore it on your master instance, making sure no error is displayed and the course was properly restored. Deprecation testing Grep for get_file_url() and verify the only occurrences is on lib/deprecationlib.php. Download and run the attached file on your browser and make sure the links are displayed correctly and similar and the debug message is displayed .
    • 3.1 Stable Sprint 2

      Properly deprecate get_file_url() with debugging message

      Usages
      get_file_url()

      backup/util/helper/restore_structure_parser_processor.class.php:        $replace = array(get_file_url($this->courseid));
       
      lib/rsslib.php:    return get_file_url($contextid.'/'.$usertoken.'/'.$componentname.'/'.$additionalargs.'/rss.xml', null, 'rssfile');
       
      lib/wiki_to_markdown.php:    $coursefileurl = get_file_url($this->courseid);
      

            lameze Simey Lameze
            ankit_frenz Ankit Agarwal
            cameron1729 cameron1729
            Andrew Lyons Andrew Lyons
            Ryan Wyllie Ryan Wyllie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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