Moodle
  1. Moodle
  2. MDL-38166

Database activity URL field should have option to open link in new window

    Details

    • Testing Instructions:
      Hide
      • Create a new database activity
      • Add a URL field:
        • Set it to auto link
        • Do not set it to open in a new window
        • Save the form
      • Create a template based on the default options
      • Add an entry and view it
        • Confirm that the link appears correctly and does not have a target specified
      • Modify the URL field to make the link open in a new window
      • Refresh the view of the URL
        • Confirm that the link has a target of _blank and when clicked opens in a new window/tab
      • Modify the URL field and force a name for the link
      • Refresh the view of the URL
        • Confirm that a new link text is set, but the the _blank target still exists
      • Modify the URL field and prevent the link from auto-linking
      • Refresh the view of the URL
        • Confirm that the link is now just printed
      • Modify the URL field and re-enable auto-linking. Disable the 'Open in a new window' option
      • Refresh the view of the URL
        • Confirm that a new link text is set, but the the _blank target is no longer set
      Show
      Create a new database activity Add a URL field: Set it to auto link Do not set it to open in a new window Save the form Create a template based on the default options Add an entry and view it Confirm that the link appears correctly and does not have a target specified Modify the URL field to make the link open in a new window Refresh the view of the URL Confirm that the link has a target of _blank and when clicked opens in a new window/tab Modify the URL field and force a name for the link Refresh the view of the URL Confirm that a new link text is set, but the the _blank target still exists Modify the URL field and prevent the link from auto-linking Refresh the view of the URL Confirm that the link is now just printed Modify the URL field and re-enable auto-linking. Disable the 'Open in a new window' option Refresh the view of the URL Confirm that a new link text is set, but the the _blank target is no longer set
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
    • Rank:
      47994

      Description

      It would be really useful if a database activity URL field had the option to open the link in new window and maybe in a popup too.

        Issue Links

          Activity

          Hide
          Helen Foster added a comment -

          Linking to MDL-26129 which also relates to URL field settings.

          Show
          Helen Foster added a comment - Linking to MDL-26129 which also relates to URL field settings.
          Hide
          Andrew Nicols added a comment -

          Hi Adrian, hope you don't mind the theft.
          I offered to this for Helen at moot.ie

          I've taken the opportunity whilst working in this area to switch it to use html_writer as it made this simpler to implement.

          Show
          Andrew Nicols added a comment - Hi Adrian, hope you don't mind the theft. I offered to this for Helen at moot.ie I've taken the opportunity whilst working in this area to switch it to use html_writer as it made this simpler to implement.
          Hide
          Andrew Nicols added a comment -

          I've rolled in the re-ordering suggested in MDL-26129

          Show
          Andrew Nicols added a comment - I've rolled in the re-ordering suggested in MDL-26129
          Hide
          Adrian Greeve added a comment -

          [Y] Syntax
          [Y] Output
          [Y] Whitespace
          [Y] Language
          [-] Databases
          [Y] Testing
          [-] Security
          [-] Documentation
          [Y] Git
          [Y] Sanity check

          Hello Andrew,

          No problem with taking this issue, I have plenty on my backlog to finish. The code for this looks spot on and I agree with slowly changing the current code bit by bit to use html_writer. Perhaps the only think that I would change is the commit message to read 'option' instead of 'optional' (really minor thing).

          +1 for integration when you're ready.

          Show
          Adrian Greeve added a comment - [Y] Syntax [Y] Output [Y] Whitespace [Y] Language [-] Databases [Y] Testing [-] Security [-] Documentation [Y] Git [Y] Sanity check Hello Andrew, No problem with taking this issue, I have plenty on my backlog to finish. The code for this looks spot on and I agree with slowly changing the current code bit by bit to use html_writer. Perhaps the only think that I would change is the commit message to read 'option' instead of 'optional' (really minor thing). +1 for integration when you're ready.
          Hide
          Andrew Nicols added a comment -

          Thanks for that Adrian. Have corrected the commit message. Pushing for IR.

          Show
          Andrew Nicols added a comment - Thanks for that Adrian. Have corrected the commit message. Pushing for IR.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (master only), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (master only), thanks!
          Hide
          Ankit Agarwal added a comment -

          Works as described.
          Thanks

          Show
          Ankit Agarwal added a comment - Works as described. Thanks
          Hide
          Damyon Wiese added a comment -

          This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads).

          Thanks for your contributions!

          Show
          Damyon Wiese added a comment - This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads). Thanks for your contributions!
          Hide
          Helen Foster added a comment -

          Thanks Andrew for this little improvement. It made me so happy that I just had to add it to http://docs.moodle.org/dev/Moodle_2.5_release_notes right away!

          Show
          Helen Foster added a comment - Thanks Andrew for this little improvement. It made me so happy that I just had to add it to http://docs.moodle.org/dev/Moodle_2.5_release_notes right away!
          Hide
          Mary Cooch added a comment -

          Removing qa_test_required label as a test has been written here MDLQA-5250 for inclusion in the next QA testing cycle.

          Show
          Mary Cooch added a comment - Removing qa_test_required label as a test has been written here MDLQA-5250 for inclusion in the next QA testing cycle.
          Hide
          Mary Cooch added a comment -

          Removing docs_required label as this is documented here http://docs.moodle.org/25/en/Building_Database

          Show
          Mary Cooch added a comment - Removing docs_required label as this is documented here http://docs.moodle.org/25/en/Building_Database

            People

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

              Dates

              • Created:
                Updated:
                Resolved: