04 Installation ONYX Editor

Zuletzt geändert von Carina Enke am 13.02.2024

Documentation to install ONYX Editor as a productive instance on a Linux server.

Requirements

  • Java 17 (Oracle or OpenJDK)
  • Apache Tomcat 9
  • PostgreSQL 12
  • MAXIMA for the use of calculations (mandatory)
  • libraries

Download and installation of requirements

Download and install OpenJDK 17 (https://jdk.java.net/java-se-ri/17 ) or Oracle JDK17 (https://jdk.java.net/17)

tar xfz jdk-xyz-linux-x64.tar.gz -C /opt

Let the environment variable $JAVA_HOME point to the JDK directory:

export JAVA_HOME=/opt/jdkX.Y..Z

Download and install Tomcat

 https://tomcat.apache.org/download-90.cgi

tar xfz apache-tomcat-X.Y.Z.tar.gz -C /opt

Download and install PostgreSQL

http://www.enterprisedb.com/products-services-training/pgdownload

chmod u+x postgresql-12.X-linux-x64.run 

Download and install libraries

yum install atk nss at-spi2-atk libXcomposite alsa-lib libXrandr libxkbcommon libXdamage cups-libs

 

Deployment

New installation

Extract the webeditor-X.X.war to $ {TOMCAT_HOME}/webapps/webeditor

unzip webeditor-X.X.war -d /opt/apache-tomcat-X.X.XX/webapps/webeditor

Create database user and database 

su postgres
/opt/PostgreSQL/X.X/bin/createuser -P onyxeditor
/opt/PostgreSQL/X.X/bin/createdb -O onyxeditor onyxeditor 

Initialize database

psql -h localhost -U onyxeditor onyxeditor < /opt/apache-tomcat-X.X.XX/webapps/webeditor/WEB-INF/classes/database/setupdatabase.sql

Installation update

Delete old ONYX war-files and dirs from ${TOMCAT_HOME}/webapps

It might be useful to clear the work and temp directory of the Tomcat Server:

rm -rf ${TOMCAT_HOME}/temp/* ${TOMCAT_HOME}/work/*

Start your Tomcat

/opt/apache-tomcat-X.X.XX/bin/startup.sh

Open the following URL in your browser: http://localhost:8080/webeditor

Creation of super user account

Register a new user on homescreen

Connect to database and select the new user

select * from users;
UPDATE users SET role=0 WHERE ID = XXX;

Configuration

The configuration files can be found inside the webeditor folder in your tomcat installation (see "/opt/apache-tomcat-X.X.XX/webapps/webeditor/").

Repository Configuration

WEB-INF/classes/de/bps/onyx/context/moduleConfigurationContext.xml 

This file is the config for ONYX Editor repository configurations.

...
<bean id="de.bps.onyx.manager.RepositoryConfigurationManager" class="de.bps.onyx.manager.RepositoryConfigurationManager">
 <property name="modules">
  <map>
   <entry key="FileSystemModule" value-ref="de.bps.onyx.manager.modules.FileSystemModule" />
   <entry key="OLATRepoModule" value-ref="de.bps.onyx.manager.modules.OPALRepoModule" />
   <entry key="PREOLATCERepoConfiguration" value-ref="de.bps.onyx.manager.modules.PREOLATCERepoConfiguration" />
  </map>
 </property>
 <property name="defaultModule" ref="de.bps.onyx.manager.modules.OPALRepoModule" />
</bean>
... 
  • defines the repositories available:
    • key defines the internal repository ID. It may be named as you want.
    • value-ref references the bean which defines the repository configuration:
...
<bean id="de.bps.onyx.manager.modules.FileSystemModule" class="de.bps.onyx.manager.modules.FileSystemModule">
 <constructor-arg index="0" ref="FileSystemConfiguration" />
</bean>
... 
  • instantiates the repository configuration depending on repository type:
    • de.bps.onyx.manager.modules.FileSystemModule: value-ref from above
    • class="...": One of:
      • de.bps.onyx.manager.modules.FileSystemModule (local file system repository)
      • de.bps.onyx.manager.modules.OPALRepoModule (uses an OLAT LMS as repository)
    • constructor-arg: ref references the configuration bean as follows:

File system repository

...
<bean id="FileSystemConfiguration" class="de.bps.onyx.model.repo.RepositoryModuleConfiguration">
 <property name="name" value="FileSystemModule" />
 <property name="typeKey" value="FileSystemModule" />
 <property name="description" value="File system module" />
 <property name="canHandleGuest" value="true" />
 <property name="serviceTarget" value="/opt/owe/fsr" />
 <property name="displayname" value="Repository PRE/OLATCE" />
</bean>
... 
  • name: Name which is used internal in ONYX Editor as identifier (must match key in line <entry key="FileSystemModule" value-ref="de.bps.onyx.manager.modules.FileSystemModule" /> above)
  • typeKey: Repository type definition
  • description: Some description (not used at the moment)
  • canHandleGuest: set to true if this repository can handle guest users (without logon)
  • serviceTarget: File system path
  • displayname: String to show as repository name in ONYX Editor (if not given, some internal translation will be done to show a generic and type dependent name)

OPAL repository

...
 <bean id="OPALRepoConfiguration" class="de.bps.onyx.model.repo.RepositoryModuleConfiguration">
  <property name="name" value="OLATRepoModule" />
  <property name="typeKey" value="OLATRepoModule" />
  <property name="serviceTarget" value="https://my.server.edu/opal/services/" />
  ...
 </bean>
... 
  • name: Repo name as configured in OPAL
  • typeKey: Must be OLATRepoModule
  • serviceTarget: OPAL URL
  • Other properties as stated above for File system repository

General configuration

WEB-INF/classes/de/bps/onyx/context/applicationContext.xml

This file contains the main configuration for the application.

General stuff, preview, self-registration, licence

This section contains the configuration for: the connection to the ONYX Player (used for preview) as well as some other configuration.

...
  <property name="system" value="myonyxeditor" />
  <property name="previewAddress" value="http://my.server.edu/onyx"/>
   <property name="selfRegistrationEnabled" value="false" />
   <property name="defaultLicences">
       <list>
           <value>YourRepoConfiguration;SINGLE;20270731</value>
       </list>
   </property>        
  <!-- URL of Onyx reporter for statistics -->
  <property name="reporterUrl" value="https://demo.bps-system.de/onyx"/>
  <!-- ID of Onyx Editors registration at Onyx reporter for statistics -->
  <property name="reporterProviderId" value="myInstanceId"/>
<!-- Source for HTML entities list. This is used to transform users unicode input in valid XML. -->
<property name="htmlEntitiesList" value="https://html.spec.whatwg.org/multipage/entities.json" />
 ...

Explanation:

Key

Example

Since version

Description

system

myonyxeditor

3.0

Mandatory. The serviceprovider name (used by ONYX Player)and must be adopted to your Onyx Player configuration.

previewAddress

https://demo.bps-system.de/onyx

3.0

Mandatory. The ONYX Player to use as preview component. In this example is the ONYX Player used at URL https://demo.bps-system.de/onyx

selfRegistrationEnabled

false

6.0

Optional. Should users be able to register themselves? Default is true.

defaultLicences

see above

6.0

Optional. This defines whether or not new users should automatically be assigned to a licence, and if, of which type that licence should be.

This only works with the integrated login e.g. with OLAT, which come with a repository parameter in the ONYX Editor call. This repository name is the key and must match to the name attribute of one of the repository definitions in moduleConfigurationContext.xml.

Format: There are three parts per line, separates by semicolons
Repository name: As stated. In Example above: YourRepoConfiguration
Licence type: One of DEMO, SINGLE, CAMPUS, PUBLISHER
Valid until date: Date in format yyyyMMdd, e.g. 20270731. This will be the date until which the licence is valid for the user.

reporterUrl

https://demo.bps-system.de/onyx

6.3

URL of an ONYX Reporter. This is used for all statistics and evaluation views. The ONYX Reporter instance needs to be configured to be usabe as such, especially the reporterProviderId (see next line) must be known.

reporterProviderId

myInstanceId

6.3

Config name of this ONYX Editors instance in the ONYX Reporter configuration. This configuration contains ONYX Editor data as the URL to send results to. Please contact the ONYX Reporters administrator and negotiate this value.

Note: In earlier versions of the ONYX Editor this was configured in an addtional config file (webServiceContext.xml), which was removed in version 6.3

htmlEntitiesList

https://html.spec.whatwg.org/multipage/entities.json
or /tmp/entities.json

6.3

Optional. Source for HTML entities list. This is used to transform users unicode input in valid XML. Provide a valid URL or file path here.

To avoid Onyx from downloading this file from an external server just do this by yourself and configure the absolute path to this file. Please always keep this file up-to-date since entities may change and non-existent entities will cause XML failures which will destroy user contents.

Default is https://html.spec.whatwg.org/multipage/entities.json

System message

The next section contains the system message configuration which can be used to display a static informational message to inform all users about nightly application restarts. Remove all keys to not show anything.

...
  <!--                -->
  <!-- System message -->
  <!--                -->
  <!-- May be a localstring key or a final message (without localization). May contain escaped HTML. -->
  <property name="message" value="sysmsg.nightly" />
  <!-- Parameters for localization if message above is a localstring key. Optional. -->
  <property name="messageParams"><list><value>3</value></list></property>
  <!-- When should the message be displayed? Date in form yyyyMMdd HHmm or only HHmm. Optional. -->
  <property name="messageFrom" value="2359" />
  <!-- Duration of display starting from value given in <from> (in minutes). Optional. -->
  <property name="messageDurationInMinutes" value="1" />
...

Explanation:

Key

Example

Description

message

Attention! Application restarts at 3 pm!

The fully localized message or a localization key defined in the messages_xy.properties files.

messageParams

3

If message is a localization key defined in the messages_xy.properties files, this option can be used to populate variable placeholders. If the key maps th a localized string "Attention! Application restarts at {1} pm!" and messageParams contains a value "3", the user will see the message as given as example at the message option. This way you are able to show fully localized messages.

messageFrom

0300

A time in Java defined format HHmm (this means two digits hours in 24 hours format, immediately followed by the minutes value). This defines the point in time from which user will see the message. Must have exactly 4 digits.

If not given the message will be shown all the time.

messageDurationInMinutes

90

Defines how long the message will be shown, starting at messageFrom.

All keys are optional. If message is missing, no message will be show at all. Changes to the values configured require a restart of the application to be acknowledged.

Publish

All property keys starting with publish are used in the context of the publish functionality. Publish functionality can be disabled by completely remove all of the publish keys.

...
     <!-- Directory to publish the published tests to. Leave empty to deactivate publish. Must end with / -->
     <property name="publishDirectory" value="/intern/instances/onyxeditor/data/publish/" />
     <!-- Prefix to use for test runs in player registration. An underscore will be appended automatically. -->
     <property name="publishUniqueIdPrefix" value="owe" />
     <!-- Service provider Onyx WS location. No trailing slash! -->
     <property name="publishProviderWs" value="http://my.hot.system.edu/onyx" />
     <!-- Service provider name referenced in Onyx configuration -->
     <property name="publishProviderId" value="owePublishedRun" />
     <!-- Path in URI to published tests. As the "published" in http://my.hot.system.edu/owe/published/ -->
     <property name="publishPath" value="published" />
     <!-- License dependent published test starts limits -->
     <property name="publishLimitBase" value="20" />
     <property name="publishLimitDemo" value="200" />
     <property name="publishLimitPro" value="200" />
     <property name="publishLimitCampus" value="200" />
     <property name="publishLimitPublisher" value="2500" />
...

Explanation:

Key

Example

Description

publishDirectory

/intern/instances/onyxeditor/data/publish/

Hard disc directory to copy the published tests to.

Leave empty to deactivate publish. Must end with / and must be writable for tomcat user.

publishUniqueIdPrefix

owe

Prefix to use for test runs in player registration. An underscore will be appended automatically.

These keys will be used in communication with Onyx player. This is configurable to adopt this according to your needs, e.g. to be able to distinguish published test runs from other ones in the Onyx player. If you do not need this just leave to value owe.

publishProviderWs

Service provider Onyx WS location. If not there the preview player instance will be used.

This is the URL to the Onyx player. May be the same as the preview player instance. Please do not enter a trailing slash!

publishProviderId

owePublishedRun

Service provider name referenced in Onyx configuration.

This value must be configured in Onyx player configuration as a valid service provider and with the Onyx Editor URL as results destination.

publishPath

published

Path in URI to published tests. As the "published" in http://my.hot.system.edu/owe/published/

This the last part of the URLs communicated to the users to use the published tests. The server domain is automatically taken from the current system.

publishLimitBase
publishLimitDemo
publishLimitPro
publishLimitCampus
publishLimitPublisher

 200

 License dependent published test starts limits.

The test start count of published tests is restricted according to the publishing users license. The default values are configurable here.

Check of the publish configuration

Few seconds after application startup there is a publish functionality check log printed to webeditor.log looking like this:

04:26:59,301-[localhost-startStop-1] INFO  -PublishManager      -***************************************************************
04:26:59,301-[localhost-startStop-1] INFO  -PublishManager      -* Publish functionality initialization                        *
04:26:59,301-[localhost-startStop-1] INFO  -PublishManager      -* °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°                        *
04:26:59,301-[localhost-startStop-1] INFO  -PublishManager      -*                                                             *
04:26:59,301-[localhost-startStop-1] INFO  -PublishManager      -* Directory: /.../onyxeditor/data/publish/
04:26:59,301-[localhost-startStop-1] INFO  -PublishManager      -*                                                             *
04:26:59,301-[localhost-startStop-1] INFO  -PublishManager      -* Statistics from file system (may differ from DB):           *
04:26:59,304-[localhost-startStop-1] INFO  -PublishManager      -* * Published tests: 18
04:26:59,306-[localhost-startStop-1] INFO  -PublishManager      -* * Stored results : 15
04:26:59,306-[localhost-startStop-1] INFO  -PublishManager      -*                                                             *
04:26:59,306-[localhost-startStop-1] INFO  -PublishManager      -***************************************************************

If there were problems with publish configuration or initialization such as missing write access rights this will be mentioned here.

LTI

LTI functionality can be configured using the following XML:

...
       <!--                                                                  -->
       <!-- LTI                                                              -->
       <!--                                                                  -->
       <!-- For documentation of LTI parameters see https://www.imsglobal.org/specs/ltiv2p0/implementation-guide -->
       <!--                                                                  -->
       <!-- All parameters are mandatory unless explicitly stated otherwise. -->
       <!--                                                                  -->
       <!-- Name of the product instance. Must be unique for every ONYX Editor instances acting as LTI tool provider. -->
       <property name="ltiProductInstance" value="ONYX Testsuite (Live)" />
       <!-- Name of the tool as can be displayed by tool consumer. -->
       <property name="ltiProductInfoToolName" value="ONYX Testsuite" />
       <!-- Description of the tool as can be displayed by tool consumer. -->
       <property name="ltiProductInfoToolDescription" value="ONYX Testsuite is a professional IMS QTI 2.1 assessment system for authoring, delivery and reporting exercises and exams." />
       <!-- Optional. If not configured the ONYX version will be used -->
       <!-- <property name="ltiProductInfoVersion" value="10.0" /> -->
       <!-- Technical description of the tool as can be displayed by tool consumer. -->
       <property name="ltiProductInfoToolTechnical" value="ONYX Testsuite is an IMS QTI 2.1 delivery engine. It integrates the ONYX Editor for authoring IMS QTI 2.1 item and test files." />
       <!-- LTI tool provider product family id -->
       <property name="ltiProductFamilyId" value="ONYX" />
       <!-- LTI tool provider product family code. -->
       <property name="ltiProductFamilyCode" value="ONYX" />
       <!-- LTI tool providers vendor code -->
       <property name="ltiVendorCode" value="BPS" />
       <!-- LTI tool providers vendor name -->
       <property name="ltiVendorName" value="BPS Bildungsportal Sachsen GmbH" />
       <!-- LTI tool providers vendor description -->
       <property name="ltiVendorDescription" value="BPS Bildungsportal Sachsen GmbH develops professional e-learning services for educational organizations, companies and public institutions. We assist you with our high-quality products and services." />
       <!-- LTI tool providers vendor website -->
       <property name="ltiVendorWebsite" value="https://www.onyx-testsuite.de/" />
       <!-- LTI tool providers resource handler name. This is what the end users in LTI tool consumer can select from. -->        
       <property name="ltiResourceHandlerName" value="ONYX Testsuite" />
       <!-- LTI tool provider URI. This is transmitted from LTI tool provider to tool consumer for backend communication. -->
       <property name="ltiUrl" value="https://onyx-editor.de/editor" />
       <!-- LTI tool providers internal port (the one listening on server side). Must be given. -->
       <property name="ltiInternalPort" value="20000" />
       <!-- LTI tool providers external port (the one which is SSL enabled and will be communicated by LTI TP to TC to use in GUI. Must be given, but may be the same as internal port if this is already SSL enabled. -->
       <property name="ltiExternalPort" value="8443" />
...

Explanation:

Key

Example

Description

ltiProductInstance

ONYX Customer X

Name of the product instance. Must be unique for every ONYX Editor instances acting as LTI tool provider.

This is also the main config key. If this is not given, the whole LTI functionality will be disabled.

ltiProductInfoToolName

ONYX

Name of the tool as can be displayed by tool consumer.

ltiProductInfoToolDescription

ONYX shows and automatically evaluates tests.

Description of the tool as can be displayed by tool consumer.

ltiProductInfoVersion

10.0

Optional. If not configured the ONYX version will be used

ltiProductInfoToolTechnical

ONYX imports QTI test files and show them to users very fancyly.

Technical description of the tool as can be displayed by tool consumer.

ltiProductFamilyId
https://www.bps-system.de/cms/index.php?id=43&amp;L=1

LTI tool provider product family id

ltiProductFamilyCode

onyx

LTI tool provider product family code.

ltiVendorCode

BPS

LTI tool providers vendor code.

ltiVendorName

BPS Bildungsportal Sachsen GmbH

 LTI tool providers vendor name

ltiVendorDescription

BPS GmbH develops professional e-learning services...

LTI tool providers vendor description

ltiVendorWebsite
https://www.bps-system.de/cms/en/welcome/

LTI tool providers vendor website

ltiResourceHandlerName

ONYX

LTI tool providers resource handler name. This is what the end users in LTI tool consumer can select from.

ltiUrl
https://next.bps-system.de

LTI tool provider URI. This is transmitted from LTI tool provider to tool consumer for backend communication.

ltiInternalPort

20000

LTI tool providers internal port (the one listening on server side). Must be given.

ltiExternalPort

8443

LTI tool providers external port (the one which is SSL enabled and will be communicated by LTI TP to TC to use in GUI. Must be given, but may be the same as internal port if this is already SSL enabled.

For documentation of LTI specific parameters as product info tool name, see https://www.imsglobal.org/specs/ltiv2p0/implementation-guide

Database connection

The connection to database example:

   <property name="dbDriverClass" value="org.postgresql.Driver" />
  <property name="dbConnectionUrl" value="jdbc:postgresql://localhost:5432/dbname" />
  <property name="dbUserName" value="username" />
  <property name="dbPassword" value="userpassword" />
  <property name="dbDialect" value="org.hibernate.dialect.PostgreSQLDialect" /> 

Reporter configuration


    • ===
WEB-INF/classes/de/bps/onyx/context/webServiceContext.xml

This file contains the configuration for the connection of the ONYX Player (include the ONYX Reporter). This ONYX Reporter is used for statistic issues.

Example:

...
<bean id="OnyxReporterTarget" class="de.bps.onyx.manager.reporter.service.OnyxReporterTarget">
 <constructor-arg name="target" value="https://onyx.bps-system.de/preview/reporterservices" />
</bean>

<bean id="OnyxReporterProvider" class="de.bps.onyx.manager.reporter.service.OnyxReporterProvider">
 <constructor-arg name="id" value="previewid" />
</bean>
...

In this example is the ONYX Player used at URL https://onyx.bps-system.de/preview/ . The serviceprovider name (used by ONYX Player) is: previewed

MAXIMA for calculations

Install MAXIMA, if you like to use calculations. MAXIMA is used for the interaction types calculation and formula comparison and also for variable support.

Installation on RHEL/Fedora/CentOS:

sudo yum install maxima

Installation on Debian/Ubuntu/Mint:

sudo aptitude install maxima

Or visit http://maxima.sourceforge.net/ and download the MAXIMA files

Log files

[root@bps0206 logs]# less /opt/apache-tomcat-X.X.X/logs/webeditor.log
[root@bps0206 logs]# less /opt/apache-tomcat-X.X.X/logs/catalina.out