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

The activity name auto-linking filter should not create links to webpages it was created on.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.16, 2.0.2, 2.1, 2.2.1
    • Fix Version/s: 2.5
    • Component/s: Filters
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide
      1. Create a page with the name 'Introduction'
      2. Fill the content of the page with something like 'This introduction is ...', check "display description on the course page"
      3. Enable the activity name auto-linking (enabled by default)
      4. Make sure that the word introduction is not changed into a link both on course page and on module page
      Show
      Create a page with the name 'Introduction' Fill the content of the page with something like 'This introduction is ...', check "display description on the course page" Enable the activity name auto-linking (enabled by default) Make sure that the word introduction is not changed into a link both on course page and on module page
    • Workaround:
      Hide

      filter/activitynames/filter.php

       
      - if ($activity->mod != "label" and $activity->visible and empty($activity->groupmembersonly)) {
       
      + if ($activity->mod != "label" and 
      +    $activity->cm != $this->context->instanceid and
      +    $activity->visible and 
      +    empty($activity->groupmembersonly)) {

      Show
      filter/activitynames/filter.php   - if ($activity->mod != "label" and $activity->visible and empty($activity->groupmembersonly)) {   + if ($activity->mod != "label" and + $activity->cm != $this->context->instanceid and + $activity->visible and + empty($activity->groupmembersonly)) {
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-31885-smartcache

      Description

      A link on a webpage that refers to the webpage itself, provide no extra information at all. Links should refer to anchors on the same page, or other pages on the site or internet.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/13