We have come across an inconsistency in the way URL resources are handled by the "Auto" display method.
One of our users logged an issue with our Helpdesk because different URLs were behaving differently - one was just opening up when the link was clicked, the other was going to another Moodle page with the link displayed again, meaning a second click was required to get to the destination URL.
This was initially somewhat baffling, but once I had gone through the code at became apparent that this was the result of an interaction between some of the "rules" built into URL/link handling, namely in:
So a link containing "//" and no further slashes, or a link ending in a slash ends up as mime-type "text/html" and that is treated as a link to download, meaning it ends up going to url_print_workaround() and therefore displays on another page.
Our expectation around URL handling is that "Auto" will handle a straightforward URL like "http://www.cam.ac.uk" in the same way that "Open" does, and the extra page load plus extra click is, we feel, inconvenient.
Does anyone have any insight into why this is the chosen behaviour, and does anyone else find this undesirable?
UIS & ICE Moodle Technical Developer/DBA
Turnitin Support Specialist
Learning Systems Team,
University Information Services,
Roger Needham Building, 7 JJ Thomson Avenue,
Cambridge CB3 0RB UK
T: +44 (0)1223 760905