Skip to content
Rüdiger Beck edited this page Apr 16, 2018 · 9 revisions

WEBUI and other interfaces

Design goals to show parts (modules) of WEBUI:

  • to show a module, everything must be correctly configured (otherwise don't show the module)
  • what modules to show by default is configured in a configuration file managed by the *.deb-package of WEBUI
  • The design is open for other interfaces by using the same code and attributes

The default interface WEBUI

sophomorix is prepared to update certain attributes for the default interface WEBUI:

  • sophomorixWebuiDashboard (singleValue): to save gui settings (This is a large text file)
  • sophomorixWebuiPermissions (multiValue)
    • This is the override attribute of the user (usually empty)
    • to be set ba: sophomorix-user sophomorixWebuiPermissionsCalculated (multiValue):
    • This attribute is used by WEBUI to display or hide certain modules

sophomorixWebuiPermissionsCalculated is calculated for each user as follows:

  1. The package maintainer of the WEBUI provides a config file with the following syntax: WEBUI.ini in *.ini syntax * Section[<modulename>] describes

    • For each role it is defined if the module is visible or not
    • For each module it is defined which line must be in sophomorixWebuiPermissionsCalculated so that the module is displayed.
  2. The Maintainer values can be overridden by school administrators for each sophomorixRole by settings in <schoolname>.school.conf as shown here: school.conf

  3. Finally there is the attribute sophomorixWebuiPermissions where the administrator can set values individually for each user

Adding a new Interface (i.e.ANOTHER_UI) by the sophomorix developers

  1. In sophomorix.ini , section [UI] add an absolute path to the config file (i.e. ANOTHER_UI=/abs/path/to/<ANOTHER_UI>.ini). This is a file which is part of the ANOTHER_UI-debian-package.

  2. To allow modifications, school.conf.master must contain an empty ANOTHER_UI=-Line, to allow modifications in the <schoolname>.school.conf-files.

sophomorix-user then knows valid UI-names and module names (Exits with error, if unvalid names pop up):

  • sophomorix.ini configures which UI-names are allowed (in sophomorix.ini)
  • <UI-Name>=/abs/path/to/<UI-Name>.ini configures the allowed module names

More Ideas

  • <UI-Name>.ini:
    • Add WARN_=TRUE/FALSE
    • this is a great place for the <UI-Name> to add its config settings