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

Properly deprecate get_file_url()

    XMLWordPrintable

    Details

    • Testing Instructions:
      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 .
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50268-master
    • Sprint:
      3.1 Stable Sprint 2

      Description

      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);
      

        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