Moodle

Require delimiters for autolinking

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6
  • Component/s: Filters
  • Labels:
    None
  • Environment:
    PHP 5.2.8/Apache 2 Redhat Linux. MSSQL running on IIS.
  • Database:
    Microsoft SQL
  • Difficulty:
    Moderate
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

We had to disable autolinking because it was creating links when instructors weren't intending it. This actually caused problems on quizzes where, for instance, an instructor might ask "What is the definition of glycosylation?". If the instructor has an activity called glycosylation, it will link to it in the quiz, potentially giving away answers.

However, teachers like the autolinking because it is easier than copying the hard coded links. In addition, if we ever copy a course, all of the hard coded links have to be updated.

So what I've done is add a setting to the filter page that, if checked, only autolinks words that have double square brackets around them (e.g., [[glycosylation]]). This way, instructors don't accidently create links they didn't intend to.

I've attached a patch file with all of the changes.

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Hi Lucian, some comments:

  • note that it's possible to enclose text with <nolink> tags, to avoid it being linked at all (exactly the opposite solution to the one implemented by you).
  • about the use of double square brackets... be warned about them "conflicting" with wiki syntax (they are used for links too) and, while that doesn't cause problems in 1.9.x, it's highly possible to have 2.0 with a new "wiki" text format. In that case... they will conflict for sure. In fact they are already conflicting in current 1.9 wikis. See http://moodle.org/mod/forum/discuss.php?d=103370
  • Moodle 2.0 will have (it's implemented right now) the ability to enable/disable individual filters by activity. That should fix this problem once and forever. http://docs.moodle.org/en/Development:Filter_enable/disable_by_context

So, I'm inclined to close this as won't fix... thanks a lot anyway!

Show
Eloy Lafuente (stronk7) added a comment - Hi Lucian, some comments:
  • note that it's possible to enclose text with <nolink> tags, to avoid it being linked at all (exactly the opposite solution to the one implemented by you).
  • about the use of double square brackets... be warned about them "conflicting" with wiki syntax (they are used for links too) and, while that doesn't cause problems in 1.9.x, it's highly possible to have 2.0 with a new "wiki" text format. In that case... they will conflict for sure. In fact they are already conflicting in current 1.9 wikis. See http://moodle.org/mod/forum/discuss.php?d=103370
  • Moodle 2.0 will have (it's implemented right now) the ability to enable/disable individual filters by activity. That should fix this problem once and forever. http://docs.moodle.org/en/Development:Filter_enable/disable_by_context
So, I'm inclined to close this as won't fix... thanks a lot anyway!
Hide
Lucian DiPeso added a comment -

Hi Eloy,

Thanks for the comments! The changes in Moodle 2.0 look interesting; however, I still feel that it's best that links are only created when a teacher actually shows intent for a link to be there, e.g. with square brackets, rather than the opposite (automatic linking except when there are <nolink> tags).

I did want to copy the wiki-style format, to maintain consistency, but that could certainly be changed to something else (or even specified by the site admin) if that causes conflicts.

Thanks!

Show
Lucian DiPeso added a comment - Hi Eloy, Thanks for the comments! The changes in Moodle 2.0 look interesting; however, I still feel that it's best that links are only created when a teacher actually shows intent for a link to be there, e.g. with square brackets, rather than the opposite (automatic linking except when there are <nolink> tags). I did want to copy the wiki-style format, to maintain consistency, but that could certainly be changed to something else (or even specified by the site admin) if that causes conflicts. Thanks!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: