Moodle

Rewrite RSS block

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: RSS
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Update simplepie lib to latest version and use it instead of magpie. Rewrite role-related code so that the block finally works well for student submissions and on the MyMoodle page.

Issue Links

Activity

Hide
Charles Fulton added a comment -

There's traction on #7946--a patch for using simple instead of magpie has been submitted. This has no effect on the role issue.

Show
Charles Fulton added a comment - There's traction on #7946--a patch for using simple instead of magpie has been submitted. This has no effect on the role issue.
Hide
Dan Poltawski added a comment - - edited

I am in the middle of doing this, converting to simplepie and refactoring the block a lot

see:
http://git.danpoltawski.co.uk/?p=moodle.git;a=shortlog;h=refs/heads/simplepie

Show
Dan Poltawski added a comment - - edited I am in the middle of doing this, converting to simplepie and refactoring the block a lot see: http://git.danpoltawski.co.uk/?p=moodle.git;a=shortlog;h=refs/heads/simplepie
Hide
Dan Poltawski added a comment -

Please review the attached rework of the RSS block.

With this refactor i've:

  • Moved to simplepie
  • Done a big cleanup of code, fixing some issues like lack of sesskey protection/proper capability checking
  • Tried not to change the output at this stage

I've tried to leave alone bits which might be affected by tims navigation 2.0 stuff alone & keep the output/weird behaviour as it was.

You can see a log of the commits here:
http://git.danpoltawski.co.uk/?p=moodle.git;a=shortlog;h=88ee1346b1092767f9ca90fde015102242664881

blocks/rss_client/block_rss_client.php | 477 +-
blocks/rss_client/block_rss_client_action.php | 384 +-
blocks/rss_client/block_rss_client_error.php | 10 +-
blocks/rss_client/config_instance.html | 10 +-
blocks/rss_client/db/upgrade.php | 13 +-
blocks/rss_client/locallib.php | 177 +
blocks/rss_client/settings.php | 11 +-
lang/en_utf8/block_rss_client.php | 1 +
lib/blocklib.php | 2 +-
lib/rsslib.php | 197 +-
lib/simplepie/moodle_simplepie.php | 112 +
lib/simplepie/readme_moodle.txt | 11 +
lib/simplepie/simplepie.inc |13672 +++++++++++++++++++++++++
lib/simpletest/testrss.php | 76 +
14 files changed, 14476 insertions, 677 deletions

Show
Dan Poltawski added a comment - Please review the attached rework of the RSS block. With this refactor i've:
  • Moved to simplepie
  • Done a big cleanup of code, fixing some issues like lack of sesskey protection/proper capability checking
  • Tried not to change the output at this stage
I've tried to leave alone bits which might be affected by tims navigation 2.0 stuff alone & keep the output/weird behaviour as it was. You can see a log of the commits here: http://git.danpoltawski.co.uk/?p=moodle.git;a=shortlog;h=88ee1346b1092767f9ca90fde015102242664881 blocks/rss_client/block_rss_client.php | 477 +- blocks/rss_client/block_rss_client_action.php | 384 +- blocks/rss_client/block_rss_client_error.php | 10 +- blocks/rss_client/config_instance.html | 10 +- blocks/rss_client/db/upgrade.php | 13 +- blocks/rss_client/locallib.php | 177 + blocks/rss_client/settings.php | 11 +- lang/en_utf8/block_rss_client.php | 1 + lib/blocklib.php | 2 +- lib/rsslib.php | 197 +- lib/simplepie/moodle_simplepie.php | 112 + lib/simplepie/readme_moodle.txt | 11 + lib/simplepie/simplepie.inc |13672 +++++++++++++++++++++++++ lib/simpletest/testrss.php | 76 + 14 files changed, 14476 insertions, 677 deletions
Hide
Dan Poltawski added a comment -

Uploading rssrework02.patch as i've now commited the simplepie library as suggested by Petr

blocks/rss_client/block_rss_client.php | 477 +++++++++++++------------
blocks/rss_client/block_rss_client_action.php | 384 ++++++++------------
blocks/rss_client/config_instance.html | 10 +-
blocks/rss_client/db/upgrade.php | 13 +-
blocks/rss_client/locallib.php | 177 +++++++++
blocks/rss_client/settings.php | 11 +-
lang/en_utf8/block_rss_client.php | 1 +
lib/rsslib.php | 197 +----------
8 files changed, 599 insertions, 671 deletions

Show
Dan Poltawski added a comment - Uploading rssrework02.patch as i've now commited the simplepie library as suggested by Petr blocks/rss_client/block_rss_client.php | 477 +++++++++++++------------ blocks/rss_client/block_rss_client_action.php | 384 ++++++++------------ blocks/rss_client/config_instance.html | 10 +- blocks/rss_client/db/upgrade.php | 13 +- blocks/rss_client/locallib.php | 177 +++++++++ blocks/rss_client/settings.php | 11 +- lang/en_utf8/block_rss_client.php | 1 + lib/rsslib.php | 197 +---------- 8 files changed, 599 insertions, 671 deletions
Hide
Dan Poltawski added a comment -

Revised to fix the casing problems

Show
Dan Poltawski added a comment - Revised to fix the casing problems
Hide
Petr Škoda (skodak) added a comment -

The patch is confusing my Netbeans, it just creates dev/null directory in my checkout :-O
I suppose the problem is in:
— a/blocks/rss_client/block_rss_client.php
+++ b/blocks/rss_client/block_rss_client.php

Show
Petr Škoda (skodak) added a comment - The patch is confusing my Netbeans, it just creates dev/null directory in my checkout :-O I suppose the problem is in: — a/blocks/rss_client/block_rss_client.php +++ b/blocks/rss_client/block_rss_client.php
Hide
Dan Poltawski added a comment -

Finally - a patch which applies to CVS atm..

Show
Dan Poltawski added a comment - Finally - a patch which applies to CVS atm..
Hide
Dan Poltawski added a comment -

Note to readers: cvs-compatible03.patch is the patch of interest atm

(I can't remove the existing patches)

Show
Dan Poltawski added a comment - Note to readers: cvs-compatible03.patch is the patch of interest atm (I can't remove the existing patches)
Hide
Dan Poltawski added a comment -

Attaching latest patch against head which works with Tims pagelib changes.

Show
Dan Poltawski added a comment - Attaching latest patch against head which works with Tims pagelib changes.
Hide
Tim Hunt added a comment -

I just did a huge chunk of changes to the manage feeds UI in head. I hope it is not too badly broken. The code is certainly cleaner (but could probably do with a few more comments).

Show
Tim Hunt added a comment - I just did a huge chunk of changes to the manage feeds UI in head. I hope it is not too badly broken. The code is certainly cleaner (but could probably do with a few more comments).
Hide
Dan Poltawski added a comment -

I took the next step and commited the switch to simplepie using a subset of my previous changes. I will remove some of the other obsolete references and wait for a final OK before removing magpie completely

Show
Dan Poltawski added a comment - I took the next step and commited the switch to simplepie using a subset of my previous changes. I will remove some of the other obsolete references and wait for a final OK before removing magpie completely
Hide
Dan Poltawski added a comment -

Closing this and going to file seperate issues for problems as I find them.

Show
Dan Poltawski added a comment - Closing this and going to file seperate issues for problems as I find them.

People

Dates

  • Created:
    Updated:
    Resolved: