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

Fix line breaks in block-rss_client cron task

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.1
    • Fix Version/s: None
    • Component/s: Blocks, RSS
    • Labels:
    • Testing Instructions:
      Hide
      1. Turn editing on in a course
      2. Add a new block of type "Remote RSS feed "
      3. Click the "Edit" icon in the block header, and choose "Configure remote news feed block"
      4. Click "Add/edit news feeds"
      5. Click "Add a new feed" button
      6. In the "Field URL" field, enter "http://feeds.bbci.co.uk/news/world/rss.xml?edition=uk" and click the "Add a new field" button to save it
      7. On the subsequent page, click the feed to verify it is parsed correctly
      8. Click the "Back" button in your browser, and return to the course home page
      9. Click the "Edit" icon in the block header, and choose "Configure remote news feed block" again
      10. Select the newly-added feed from the list, and leave all other fields at their defaults
      11. Click "Save changes"
      12. From a command line, change directory to your wwwroot
      13. Invoke the cron task as appropriate to your distribution, e.g. sudo -u www-data /usr/bin/php admin/cli/cron.php
      14. Observe a log line like the following:
        http://feeds.bbci.co.uk/news/world/rss.xml?edition=uk ... OK
      15. The line should be emitted all at once, with no pause between the RSS feed URL and the "OK" string
      Show
      Turn editing on in a course Add a new block of type "Remote RSS feed " Click the "Edit" icon in the block header, and choose "Configure remote news feed block" Click "Add/edit news feeds" Click "Add a new feed" button In the "Field URL" field, enter "http://feeds.bbci.co.uk/news/world/rss.xml?edition=uk" and click the "Add a new field" button to save it On the subsequent page, click the feed to verify it is parsed correctly Click the "Back" button in your browser, and return to the course home page Click the "Edit" icon in the block header, and choose "Configure remote news feed block" again Select the newly-added feed from the list, and leave all other fields at their defaults Click "Save changes" From a command line, change directory to your wwwroot Invoke the cron task as appropriate to your distribution, e.g. sudo -u www-data /usr/bin/php admin/cli/cron.php Observe a log line like the following: http://feeds.bbci.co.uk/news/world/rss.xml?edition=uk ... OK The line should be emitted all at once, with no pause between the RSS feed URL and the "OK" string
    • Affected Branches:
      MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-61247-master-fix-commit-message

      Description

      The RSS Client block uses mtrace to log the progress of the cron task.  The current implementation uses the empty string as the line end character in the mtrace call.  This means the URL of the RSS feed is logged, and then the status of the fetch call is logged after a pause.  This is a nice feature when you're tailing the log file, but if another cron task begins, it writes line end characters to the file, so the URL and fetch status end up on different lines.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chrisf Chris Fryer
              Peer reviewer:
              Mihail Geshoski
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: