Moodle
  1. Moodle
  2. MDL-9851

RSS block links open in same window - previously in new window

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.3, 1.9
    • Component/s: Blocks
    • Labels:
      None
    • Environment:
      any
    • Database:
      Any
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      26131

      Description

      Prior to 1.8 when one clicked on a link in a feed displayed in the block it opened in a new window. Since 1.8 it opens in the same window. This is a request to restore the old bahaviour. Tagged as "major" as this is causing confusion with every user I've encountered since the change.

        Activity

        Hide
        Chris Fryer added a comment -

        It might be nice to give the teacher/editor a choice, as they are given for other types of resources.

        Show
        Chris Fryer added a comment - It might be nice to give the teacher/editor a choice, as they are given for other types of resources.
        Hide
        Martin Dougiamas added a comment -

        Just for reference, the issue is XHTML strict compliance which disallows targets.

        http://moodle.org/mod/forum/discuss.php?d=75515

        RSS block should just be changed to use the link_to_popup_window() function so that our nasty hack can be leveraged.

        Show
        Martin Dougiamas added a comment - Just for reference, the issue is XHTML strict compliance which disallows targets. http://moodle.org/mod/forum/discuss.php?d=75515 RSS block should just be changed to use the link_to_popup_window() function so that our nasty hack can be leveraged.
        Hide
        Martin Dougiamas added a comment -

        Be aware of the cleaning of the data that goes on ... JS from our hack will not make it through the clean, so things need to be cleaned first before the call to that function.

        Show
        Martin Dougiamas added a comment - Be aware of the cleaning of the data that goes on ... JS from our hack will not make it through the clean, so things need to be cleaned first before the call to that function.
        Hide
        Dan Poltawski added a comment -

        Unfortunately link_to_popup_window seems to be focused on internal only urls.

        Show
        Dan Poltawski added a comment - Unfortunately link_to_popup_window seems to be focused on internal only urls.
        Hide
        Dan Poltawski added a comment -

        Attaching a patch to fix the issue, like Martin says clean_text will strip the javascript hack, so need to remove that call.

        Unfortunately get_rss_by_id() is messy..

        Show
        Dan Poltawski added a comment - Attaching a patch to fix the issue, like Martin says clean_text will strip the javascript hack, so need to remove that call. Unfortunately get_rss_by_id() is messy..
        Hide
        Dan Poltawski added a comment -

        Hi Petr,

        I'm assigning this issue to you - I wonder if you could review my patch. We need to remove a clean_text so that our js hack can make its way through to be outputted.

        get_rss_by_id is messy & could do with a check to see that everything is properly cleaned, or a refactor

        Show
        Dan Poltawski added a comment - Hi Petr, I'm assigning this issue to you - I wonder if you could review my patch. We need to remove a clean_text so that our js hack can make its way through to be outputted. get_rss_by_id is messy & could do with a check to see that everything is properly cleaned, or a refactor
        Hide
        Dan Poltawski added a comment -

        Users have complained reminding me of this issue.

        I've had another review of the the cleaning and it seems everything is covered so i'm going to commit the fix.

        Show
        Dan Poltawski added a comment - Users have complained reminding me of this issue. I've had another review of the the cleaning and it seems everything is covered so i'm going to commit the fix.
        Hide
        Dan Poltawski added a comment -

        I've fixed this in CVS for 1.8 stable and HEAD.

        Show
        Dan Poltawski added a comment - I've fixed this in CVS for 1.8 stable and HEAD.
        Hide
        Nicklas Lindgren added a comment -

        Note that forcing anything to open in a new window poses an accessibility problem.

        In MSIE7, for instance, popup blocking is enabled by default. Some users might not figure out how to disable this. Worse, screenreader users might be denied information on how to disable this.

        Show
        Nicklas Lindgren added a comment - Note that forcing anything to open in a new window poses an accessibility problem. In MSIE7, for instance, popup blocking is enabled by default. Some users might not figure out how to disable this. Worse, screenreader users might be denied information on how to disable this.
        Hide
        Ray Lawrence added a comment -

        Accessibility problem: As the person who raised this as an issue I accept this is a potential issue.

        Nicklas do you have any suggestions as to how this might be addressed? I can only think that this might be linked somehow to the "screen reader" option in the user profile so that if set to "yes" the behaviour here would be open in same window.

        If this was possible then thought would need to be given to how to deal with other pop ups e.g. glossary, secure quiz, resources.

        Dan, Nickas, other watchers any ideas......?

        Show
        Ray Lawrence added a comment - Accessibility problem: As the person who raised this as an issue I accept this is a potential issue. Nicklas do you have any suggestions as to how this might be addressed? I can only think that this might be linked somehow to the "screen reader" option in the user profile so that if set to "yes" the behaviour here would be open in same window. If this was possible then thought would need to be given to how to deal with other pop ups e.g. glossary, secure quiz, resources. Dan, Nickas, other watchers any ideas......?
        Hide
        Nicklas Lindgren added a comment -

        The screen reader option is not very prominent, and probably should not be relied upon to solve accessibility problems (at least as things stand now). But besides that, preventing opening new windows might be a good idea when the option is turned on.

        I think adding a configuration option for this behaviour in the RSS block is a reasonable solution.

        (Given all the usability and accessibility problems caused by forcing new browser windows, i would rather see the possibility of doing this removed everywhere in Moodle. But i doubt that would be appreciated.)

        Show
        Nicklas Lindgren added a comment - The screen reader option is not very prominent, and probably should not be relied upon to solve accessibility problems (at least as things stand now). But besides that, preventing opening new windows might be a good idea when the option is turned on. I think adding a configuration option for this behaviour in the RSS block is a reasonable solution. (Given all the usability and accessibility problems caused by forcing new browser windows, i would rather see the possibility of doing this removed everywhere in Moodle. But i doubt that would be appreciated.)
        Hide
        Ray Lawrence added a comment -

        I don't agree with your RSS block option suggestion. This forces one type of behaviour or another for all users. The issue of the opening of a new browser window is not one that is a problem for all users but is specific to individual users, therefore any option that affects this must be configurable at individual level IMO.

        Show
        Ray Lawrence added a comment - I don't agree with your RSS block option suggestion. This forces one type of behaviour or another for all users. The issue of the opening of a new browser window is not one that is a problem for all users but is specific to individual users, therefore any option that affects this must be configurable at individual level IMO.
        Hide
        Nicklas Lindgren added a comment -

        Yes, but something is only accessible if it is accessible by default.

        Therefore i suggest the default to be opening in the same window, and having the option for the case when there are users that already depend on the old behaviour.

        Show
        Nicklas Lindgren added a comment - Yes, but something is only accessible if it is accessible by default. Therefore i suggest the default to be opening in the same window, and having the option for the case when there are users that already depend on the old behaviour.
        Hide
        Ray Lawrence added a comment -

        Agreed.

        The best solution (as far as I can see) is still in the user's profile though, and an array of options for this type of thing would be a bit messy.

        Whatever, getting some consistency with the other pop up windows could be tricky.....

        Show
        Ray Lawrence added a comment - Agreed. The best solution (as far as I can see) is still in the user's profile though, and an array of options for this type of thing would be a bit messy. Whatever, getting some consistency with the other pop up windows could be tricky.....
        Hide
        Dan Poltawski added a comment -

        I agree this should be optional - I don't like popup windows

        It would be good to have an audit of all existing popup windows and see how this can be dealt with. I'm not sure what the best way to do this would be (yet another tiny complicated user profile field would seem complicated).

        In any case, I think someone should create a new issue for this and link it to this one as it doesn't just effect the RSS block and would need to be applied consistently to be useful.

        Show
        Dan Poltawski added a comment - I agree this should be optional - I don't like popup windows It would be good to have an audit of all existing popup windows and see how this can be dealt with. I'm not sure what the best way to do this would be (yet another tiny complicated user profile field would seem complicated). In any case, I think someone should create a new issue for this and link it to this one as it doesn't just effect the RSS block and would need to be applied consistently to be useful.
        Hide
        Nicklas Lindgren added a comment -

        Ray, would you elaborate on how a profile setting would work and how it will be used, as you see it?

        Show
        Nicklas Lindgren added a comment - Ray, would you elaborate on how a profile setting would work and how it will be used, as you see it?
        Hide
        David Horat added a comment -

        We are talking about this issue in MDL-17922

        Show
        David Horat added a comment - We are talking about this issue in MDL-17922

          People

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

            Dates

            • Created:
              Updated:
              Resolved: