Feature Wiki

Information about planned and released features

Tabs

Revision of Goto Links and Static Links

1 Initial Problem

  1. 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.
  2. 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.

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. 

2 Conceptual Summary

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:

2.1 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.

3 User Interface Modifications

3.1 List of Affected Views

  • no affected views

3.2 User Interface Details

No changes in user interface.

3.3 New User Interface Concepts

No new interface concepts required.

3.4 Accessibility Implications

There are no foreseeable accessibility implications. 

4 Technical Information

No additional personal data will be processed or stored.

5 Privacy

There are no foreseeable security implications. 

6 Security

{ Does the feature include any special security relevant changes, e.g. the introducion of new endpoints or other new possible attack vectors. If yes, please explain these implications and include a commitment to deliver a written security concept as part of the feature development. This concept will need an additional approvement by the JourFixe. }

7 Contact

8 Funding

If you are interest in funding this feature, please add your name and institution to this list.

9 Discussion

JourFixe, ILIAS [jourfixe], 21 AUG 2023: We highly appreciate this suggestion and accept the feature for ILIAS 9. We prefer the wording 'staticURL' and 'staticURLHandler' instead of 'DeepLink'. To clarify: old goto links will still work after the new concept has been implemented.

10 Implementation

The new Service has been implemented in src/StaticURL: https://github.com/srsolutionsag/ILIAS/tree/feature/9/static-url/src/StaticURL. A Description can be found in the Readme: 

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:  no change required

Approval

Approved at 24 OCT 2023 by Kunkel, Matthias [mkunkel]

Last edited: 25. Oct 2023, 10:25, Lorenz, Katharina [klorenz]