Feature Wiki
Tabs
Introducing Shortlinks
Page Overview
[Hide]- 1 Initial Problem
- 2 Conceptual Summary
- 3 User Interface Modifications
- 4 Technical Information
- 5 Privacy
- 6 Security
- 7 Contact
- 8 Funding
- 9 Discussion
- 10 Initial situation Static "deep" links in ILIAS
- 11 Remarks on the feature request
- 12 Alternative proposal
- 13 Implications for this feature request
- 14 Implementation
Depends on Revision of Goto Links and Static Links
1 Initial Problem
Permanent links allow communicating links to specific ILIAS objects. However, permanent links are cryptic and cannot be remembered.
For marketing material intelligible links are needed. Examples for this can be found in the ILIAS booklet:
- sigs.ilias.de leads to https://docu.ilias.de/goto_docu_cat_2856.html
- blog.ilias.de leads to https://docu.ilias.de/goto_docu_blog_3439.html
2 Conceptual Summary
In order to be able to generate simple and understandable cutom links, the entry Shortlink should be added in the Administration » Layout and Navigation.
If you open the Shortlink entry, you can generate a new shortlink by clicking the "Add Shortlink" button in the toolbar. In a modal, title and target URL can be entered and the Active status can be set.
If users link to a category that contains all courses and name the link courses, the category can be accessed at https://test7.ilias.de/ilias.php/courses. They no longer need to use the permanent link.
To be able to manage even a large number of shortlinks, a filter is displayed above the table. By default, you can filter by the title of the shortlinks.
If you want to delete a shortlink, the deletion must be confirmed in a modal.
3 User Interface Modifications
3.1 List of Affected Views
- Administration > Layout und Navigation > Shortlink (new)
3.2 User Interface Details
Please see mock-ups above
3.3 New User Interface Concepts
No new interface concepts required.
3.4 Accessibility Implications
There are no foreseeable accessibility implications.
4 Technical Information
{ The maintainer has to provide necessary technical information, e.g. dependencies on other ILIAS components, necessary modifications in general services/architecture, potential security or performance issues. }
5 Privacy
No additional personal data will be processed or stored.
6 Security
There are no foreseeable security implications.
7 Contact
- Author of the Request: Zenzen, Enrico [ezenzen]
- Maintainer: Killing, Alexander [alex], Meyer, Stefan [smeyer]
- Implementation of the feature is done by: {The maintainer must add the name of the implementing developer.}
8 Funding
If you are interest in funding this feature, please add your name and institution to this list.
- …
9 Discussion
Kunkel, Matthias [mkunkel], 26 JUN 2023: Is there already an idea about the syntax of such a shortlink?
Schmid, Fabian [fschmid], 2023-06-30: In the workshop, I presented my ideas to use the shortlinks as a reason to revise the general handling of "Goto links" or what ILIAS currently has in terms of static URLs. In the following, I would like to concretise my ideas and also explain why I see the present feature request as partially problematic.
10 Initial situation Static "deep" links in ILIAS
For some places it is possible to generate a corresponding goto-link via ilLink::_getStaticLink, but on the one hand the implementation is very inflexible (see for example the implementation in goto.php). The goto.php triages the goto URLs via a large switch statement, which is not scaled and not generic. The goto links also come from a class that is currently only implicitly maintained, but actually provides a very important function in ILIAS: deep linking.
For some other places there are also links that are practically static, namely those that only contain a baseClass from ilCtrl (e.g. ilias.php?baseClass=ilDashboardGUI). These links only change if the name of the baseClass changes. However, these are generally also ilCtrl URLs.
Apart from these two forms of links, there are actually only ilCtrl URLs, which are currently not static. ilCtrl is to be further developed so that ilCtrl can also generally generate static URLs. However, this is still a long way off.
11 Remarks on the feature request
The feature request as it currently exists has the following problems in my opinion:
- it introduces another layer of links, besides the ilCtrl URLs and the goto URLs. There are then already three concepts for links/URLs
- the introduction of shortlinks stands in the way of a later general reorganisation of the routing.
- By entering arbitrary URLs in the shortlink administration, the attack vector of open redirects is created.
12 Alternative proposal
As mentioned at the beginning, goto.php and ilLink are practically unmaintained, but provide very important functionality in ILIAS, namely deep linking which is to be understood as aliases to certain ilCtrl URLs. I would like to bring this functionality to a better level and could also imagine to take over the implementation and later maintainership for it. I could implement it for ILIAS 9 with some funding. In the following I would like to explain how I envision this and how the feature of shortlinks could be implemented more generically.
The existing class ilLink would be marked as deprecated and moved to a new service/DeepLink (alternative: Services/GoToLink). This service would look something like this:
Provision of an interface ILIAS\Services\DeepLink\DeepLinkHandler
Modules and also some services then implement a class, e.g. ilCourseDeepLinkHandler. A DeepLinkHander announces its namespace. In order not to generate a later conflict to a new routing and to continue to support old goto URLs, this would be the type for modules, as for example "crs". In addition, a DeepLinkHandler has a method handle(DeepLinkRequest $d): never.
All DeepLinkHandlers from core components and plugins are collected via an objective in the build process and saved as an artefact. These are thus statically known to the service.
The goto.php is completely modified: It now accepts URLs in the form /goto.php/NAMESPACE[/OPTIONAL_PARAMETERS/.../]. The request is converted into a DeepLinkRequest, which contains additional parameters, for example. Based on the namespace, the corresponding DeepLinkHandler::handle(DeepLinkRequest $d) is called with the corresponding DeepLinkRequest. The handler then converts the request into an ilCtrl link and redirects accordingly.
Examples of such URLs would be
- https://ilias.de/goto.php/crs/125848
- https://ilias.de/goto.php/file/145254/download
- https://ilias.de/goto.php/wiki/1357/JourFixe-2023-06-26
- https://ilias.de/goto.php/dashboard
In addition, a new RewriteRule can be defined in the .htaccess, which makes the links even easier:
RewriteRule ^go/(.*)$ goto.php/$1 [L].
The URLs will then look like this:
- https://ilias.de/go/crs/125848
- https://ilias.de/go/file/145254/download
- https://ilias.de/go/wiki/1357/JourFixe-2023-06-26
- https://ilias.de/go/dashboard
We would with this principle:
- Expand the deep linking functionality in a stable manner in the future maintained know.
- Offer deep links also for places that previously had no deep links or only had them by chance because of ilCtrl-baseClass. This also applies to plug-ins and services.
- Get simpler and shorter deep links
Note: This is an alternative proposal for a new routing infrastructure but only to put the existing deep linking functionality on a stable footing.
13 Implications for this feature request
Now how does this relate to shortlinks: the shortlink feature registers a DeepLinkHandler like other components, its namespace would then be "shortlink" for example. In the administration, new shortlinks can be created as suggested, these could point to magazine objects, for example, the repository picker could be used for this. Shortlinks in the form of the following would then be possible:
- https://ilias.de/goto.php/shortlink/konferenz2023 resp.
- https://ilias.de/go/shortlink/konferenz2023
The .htaccess could be used to simplify the shortlink even further or make it more explicit:
RewriteRule ^shortlink/(.*)$ goto.php/shortlink/$1 [L].
This would make the shortest possible URL:
- https://ilias.de/shortlink/konferenz2023
The scheme could also be used by server admins to automatically redirect subdomains (e.g. https://sigs.ilias.de/ ) to the shortlink feature.
14 Implementation
{ The maintainer has to give a description of the final implementation and add screenshots if possible. }
Test Cases
Test cases completed at {date} by {user}
- {Test case number linked to Testrail} : {test case title}
Privacy
Information in privacy.md of component: updated on {date} by {user} | no change required
Approval
Approved at {date} by {user}.
Last edited: 24. Jan 2024, 10:24, Tödt, Alexandra [atoedt]