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

Fix get_tag_moreurl_replacement to return the whole URL for 'Show more'

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • MDL-75521-master
    • Hide
      1. Create a new database activity
      2. Go to activity > Presets page.
      3. Select Image gallery preset and click on 'Use preset' button
      4. Click on 'Continue' button at 'Fields mapping' page.
      5. Go to Templates and uncheck 'Enable editor' checbox.
      6. Set 'Repeated entry' to:

        <div class="picturediv">
        <table class="pictureframe"><tr><td>
        <table class="picture">
        <tr><td><a href="##moreurl##">[[title]]</a></td></tr>
        <tr><td><div class="listimage">[[image]]</div></td></tr>
        <tr><td align="right">##more## ##edit## ##delete## ##approve## ##export## ##moreurl##</td></tr>
        </table>
        </td></tr></table>
        </div>
        

      7. Save template and add a new entry to the database filling all the fields.
      8. Go to List view of the database
      9. Confirm the URL on the bottom of the image is an absolute one starting by 'http'.
      10. Click on the title of the entry and confirm you are redirected to entry Single View.
      Show
      Create a new database activity Go to activity > Presets page. Select Image gallery preset and click on 'Use preset' button Click on 'Continue' button at 'Fields mapping' page. Go to Templates and uncheck 'Enable editor' checbox. Set 'Repeated entry' to: <div class = "picturediv" > <table class = "pictureframe" ><tr><td> <table class = "picture" > <tr><td><a href= "##moreurl##" >[[title]]</a></td></tr> <tr><td><div class = "listimage" >[[image]]</div></td></tr> <tr><td align= "right" >##more## ##edit## ##delete## ##approve## ##export## ##moreurl##</td></tr> </table> </td></tr></table> </div> Save template and add a new entry to the database filling all the fields. Go to List view of the database Confirm the URL on the bottom of the image is an absolute one starting by 'http'. Click on the title of the entry and confirm you are redirected to entry Single View.
    • 1
    • HQ Sprint 0.3 Database

      After MDL-75146 refactoring, the get_tag_moreurl_replacement() function returned value is not the absolute URL but the relative one. We should return the absolute URL as in Moodle 4.0

      Expected return: http://www.moodlesite.org/moodle/moodle_40/mod/data/view.php?d=1&rid=1

      Obtained return: view.php?d=1&rid=1

       

      Steps to reproduce it:

      1. Create a database and use a preset to fill it with fields and templates.
      2. Go to Templates -> List template and add somewhere in the template ##moreurl## tag
      3. Add an entry and check the result when moving to 'List template' view.

        1. 10_MDL-75521_master.png
          354 kB
          John Edward Pedregosa
        2. 9_MDL-75521_master.png
          133 kB
          John Edward Pedregosa

            amaia Amaia Anabitarte
            amaia Amaia Anabitarte
            Carlos Escobedo Carlos Escobedo
            Ferran Recio Ferran Recio
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 12 minutes
                6h 12m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.