MCPcopy Index your code
hub / github.com/OpenOLAT/OpenOLAT

github.com/OpenOLAT/OpenOLAT @OpenOLAT_20.3.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release OpenOLAT_20.3.5 ↗ · + Follow
165,919 symbols 844,189 edges 13,877 files 25,091 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

OpenOlat

OpenOlat is a web-based e-learning platform for teaching, learning, assessment and communication, an LMS, a learning management system. OpenOlat impresses with its simple and intuitive operation and rich feature set.

A sophisticated modular toolkit provides course authors with a wide range of didactic possibilities. Each OpenOlat installation can be individually extended, adapted to organizational needs, and integrated into existing IT infrastructures. The architecture is designed for minimal resource consumption, scalability and security in order to guarantee high system reliability.

Visit the OpenOlat project homepage and the OpenOlat documentation for more information.

License GitHub commit activity X Follow Mastodon Follow

Table of Contents

  1. Licensing
  2. Installation manual and user documentation
  3. Community
  4. Developers
  5. Supported by

Licensing

With regard to licensing and copyright please refer to the file LICENSE and NOTICE.TXT


Installation manual and user documentation

The documentation can be found at https://docs.openolat.org

User documentation

Technical documentation

Other ressources


Being a community member

We strongly suggest to participate in the OpenOlat community membership program. Even though this software is free and open source, the development and management has to be funded by someone. If you like what we do and want the product to be maintained and developed in the long run you should consider purchasing a membership: Partner program.


Developers

Setting up OpenOlat in Eclipse and PostgreSQL

This is an installation guide for developers.

Preconditions

  • Check that you are using maven 3.8 or higher (mvn -V)
  • Check that you have the git plugin installed in eclipse
  • Check that you have git installed
  • Check that you have Java 17 installed
  • Check that you have Tomcat 10.0 or 10.1 installed

1. In Eclipse

  1. Clone OpenOlat:
    Create a repository location (https://github.com/OpenOLAT/OpenOLAT.git) and clone the repository. Right click to clone the repository into your workspace.

  2. Import OpenOlat as an Eclipse project:
    In Eclipse, use Import -> Git -> Projects from Git (with smart import) and import the local OpenOlat clone created in the previous step.

  3. Disable validators:

  4. Right-click on the project and open the project properties. Then search for Validation. Enable the project specific settings and disable all XML, XSLT, HTML and JPA validators.
  5. Right-click on the project and select Validate.

  6. Create the OpenOlat configuration:
    Copy the olat.local.properties.sample in the project root folder to src/main/java/olat.local.properties, adjust the file to match your setup. See the comments in the file header for more configuration options.

  7. Refresh the project

  8. Setup the dependencies and compile

  9. When running the first time, right-click the project and select Maven -> Select Maven Profiles.... Make sure tomcat and postgresqlunittests are selected.
  10. Right-click on the project and run Maven -> Update Project.
  11. Make sure the project compiled without errors. Warnings are ok. If the project did not compile, you have to fix the problems before you proceed. See Troubleshooting section below.

2. Setting up the PostgreSQL database

Create user openolat and a database openolat

CREATE USER openolat WITH PASSWORD 'openolat';
CREATE DATABASE openolat;
GRANT ALL PRIVILEGES on DATABASE openolat to openolat;

Write the OpenOlat database schema to the OpenOlat database:

\c openolat openolat;
\i src/main/resources/database/postgresql/setupDatabase.sql

Set the DB connection port to 5432 (or the port on which your Postgres DB is running) in your olat.local.properties file:

db.host.port=5432

Optional: if you want to run the jUnit tests, make sure you also create and initialize the test database that you configured in src/test/profile/postgresql/olat.local.properties.

3. Setting up the Tomcat server in Eclipse

Setup a tomcat server by clicking on OpenOlat -> Run As -> "Run on Server". The "Run on Server" wizard will pop up and you define define a new server. Look for Apache -> Tomcat v9.0.

Add openolat as web application in the step "Add and remove" and click finish.

Double click the newly created server and increase the timeout to something like 180s.

Open the generated server.xml file and manually set the following parameters:

  • In the Context element set parameter reloadable="false"
  • Add a child element Resources and set the maximum cache size to 100000:
  <Context docBase="OpenOLAT" path="/olat" reloadable="false" source="org.eclipse.jst.jee.server:OpenOLAT">
    <Resources allowLinking="true" cacheMaxSize="100000" cachingAllowed="true"/>
  </Context>

You can now start the server and open the following URL http://localhost:8080/olat in your favorite browser. You can log in with user administrator and password openolat.

Have fun, give feedback and contribute!

Option: use application server database connection pool

By default and for your convenience the embedded connection pool is used, you don't need to configure anything. This is fine for simple development setups, but not recommended for production. To be as close as possible to a productive environment it is useful to use the application server connection pool also in the development environment:

First: add the following properties to the olat.local.properties file:
db.source=jndi
db.jndi=java:comp/env/jdbc/OpenOLATDS
Second: add the resource descriptor to your tomcat context descriptor:
<Resource auth="Container" driverClassName="org.postgresql.Driver" type="javax.sql.DataSource"
          maxIdle="4" maxTotal="16" maxWaitMillis="-1"
          name="jdbc/OpenOLATPostgresDS"
          username="postgres" password="postgres"
          url="jdbc:postgresql://localhost:5432/olat"
          testOnBorrow="true" testOnReturn="false"
          validationQuery="SELECT 1" validationQueryTimeout="-1"/>

Alternate databases

MySQL

Note that MySQL is still supported but not recommended and support might eventually come to an end. Use Postgres if you can.

Prerequisites
  • MySQL 8.0 or greater
Database setup

Create user openolat and a database openolat

CREATE DATABASE IF NOT EXISTS openolat;
GRANT ALL PRIVILEGES ON openolat.* TO 'openolat' IDENTIFIED BY 'openolat';
UPDATE mysql.user SET HOST='localhost' WHERE USER='openolat' AND HOST='%';
FLUSH PRIVILEGES;

The time zone needs to be set if you don't already defined it.

SET GLOBAL time_zone = 'Europe/Zurich';

Write the OpenOlat database schema to the OpenOlat database. Example for MySQL:

mysql -u openolat -p openolat < src/main/resources/database/mysql/setupDatabase.sql
Tomcat Setup

Open the generated server.xml file and manually set the following parameters:

  • In all Connector elements set parameter URIEncoding="UTF-8"
Option: application server connection pool
<Resource auth="Container" driverClassName="com.mysql.cj.jdbc.Driver" type="javax.sql.DataSource"
          maxIdle="4" maxTotal="16" maxWaitMillis="10000"
          name="jdbc/OpenOLATDS"
          password="olat" username="olat"
          url="jdbc:mysql://localhost:3306/openolat?useUnicode=true&amp;characterEncoding=UTF-8&amp;cachePrepStmts=true&amp;cacheCallableStmts=true&amp;autoReconnectForPools=true"
          testOnBorrow="true" testOnReturn="false"
          validationQuery="SELECT 1" validationQueryTimeout="-1"/>

Oracle

Oracle support is experimental. The database schema is available and updated for historic reason, however running OpenOlat with Oracle is largely untested. Do not use it for production before you tested the entire application. We are interested in adding Oracle to our list of fully supported and recommended database, contact us if you want to sponsor this compatibility.

Troubleshooting

  • OutOfMemoryException: in Eclipse: setup VM arguments by clicking on Run > Run Configurations > Arguments > VM Arguments and pasting: -XX:+UseG1GC -XX:+UseStringDeduplication -Xms256m -Xmx1024m -Djava.awt.headless=true

  • Optional: create an empty olat.local.properties and save it to /yourTomcatDir/lib (OpenOlat searches for this file on the classpath and /tomcat/lib is part of it). But it should start with just the default config!

  • Usually you will get a timeout exception when you start a new OpenOlat. After double clicking on the server entry you can increase the timeout for the startup.

  • If your tomcat starts very quickly but you cannot access OpenOlat it might be that tomcat did not find the OpenOlat context. Right click the server entry and click publish to inform eclipse about a new or updated context.

  • If you run into problems with classes or resources not found e.g. ClassNotFoundException right click your server config and run the "Clean..." Task to republish all resources. Problems comes mostly when switching from eclipse to console and back with command like mvn clean, or eclipse clean and such. You will always get a clean and working environment when you do the following: Eclipse clean, create eclipse settings with launch, Server publish resources and restart OpenOlat.

  • If you have problems with your postgres database regarding the ownership of the content use these:
    • Set owner for tables of your database:
    • for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" <YOURDATABASE>` ; do psql -c "alter table \"$tbl\" owner to <YOURUSERNAME>" <YOURDATABASE> ; done
    • .. for sequences:
    • for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" <YOURDATABASE>` ; do psql -c "alter sequence \"$tbl\" owner to <YOURUSERNAME>" <YOURDATABASE> ; done
    • .. for view:
    • for tbl in `psql -qAt -c "select table_name from information_schema.views where table_schema = 'public';" <YOURDATABASE>` ; do psql -c "alter view \"$tbl\" owner to <YOURUSERNAME>" <YOURDATABASE> ; done

Eclipse Plugins

For a lean and speedy development setup it is recommended to to use a bare-bone Eclipse installation and only install the following plugins:

  • Data Tools Plattform SQL Development Tools
  • Eclipse Java Development Tools
  • Eclipse Java EE Developer Tools
  • Eclipse Plattform
  • Eclipse Web JavaScript Developer Tools
  • Git integration for Eclipse
  • Javadocs Help Feature
  • JavaScript Developement Tools
  • JST Server Adapters Extension for Eclipse
  • M2E - Maven integration for Eclipse
  • m2e-wtp - Maven integration for WTP
  • Mylyn WikiText

Background (optional for further interest)

There is only one spring context for the whole OpenOlat which you can access via CoreSpringFactory. The context is configured with the files serviceconfig/olat.properies and can be overwritten with olat.local.properties. Changes in olat.local.properties are reflected upon each restart of Tomcat. You can further override OpenOlat settings with JVM arguments -Dmy.option=enabled.

Compress JavaScript and CSS

The JavaScript and CSS files are minified and aggregated. If you make some changes, run the following command to compress them (execution time about 1-2 minutes) and refresh your Eclipse project:

mvn clean package -Pcompressjs,tomcat

Themes

Readme

REST API

To read the OpenOlat REST API documentation: 1. start OpenOlat 2. go to Administration -> Core configuration -> REST API 3. Make sure the REST API is enabled 4. Click the documentation link in the admin panel

Automated tests

Preconditions

  • Make sure the following ports are not in use (Selenium, Tomcat ) 14444 / 8080 / 8009 / 8089

  • Make sure you have PostgreSQL 9.4 or newer. The server must be at localhost. For other databases see [Alternative datab

Extension points exported contracts — how you extend this code

RepositoryEntryRuleSPI (Interface)
Initial date: 26.05.2015 @author srosse, stephane.rosse@frentix.com, http://www.frentix.com [31 implementers]
src/main/java/org/olat/modules/reminder/RepositoryEntryRuleSPI.java
FilterRuleSPI (Interface)
The rule should remove from the list the identity which not match Initial date: 09.04.2015 @author srosse, stephan [159 …
src/main/java/org/olat/modules/reminder/FilterRuleSPI.java
IdentitiesProviderRuleSPI (Interface)
Rules which deliver a list of identities to remind Initial date: 10.04.2015 @author srosse, stephane.rosse@frentix. [32 …
src/main/java/org/olat/modules/reminder/IdentitiesProviderRuleSPI.java
EdusharingProperties (Interface)
Initial date: 14 Dec 2018 @author uhensler, urs.hensler@frentix.com, http://www.frentix.com [9 implementers]
src/main/java/org/olat/modules/edusharing/EdusharingProperties.java
BadgeCondition (Interface)
Initial date: 2023-06-21 @author cpfranger, christoph.pfranger@frentix.com, https [9 implementers]
src/main/java/org/olat/modules/openbadges/criteria/BadgeCondition.java

Core symbols most depended-on inside this repo

translate
called by 12044
src/main/java/org/olat/core/gui/translator/Translator.java
add
called by 9809
src/main/java/org/olat/course/nodes/ms/MinMax.java
append
called by 9469
src/main/java/org/olat/course/nodes/practice/ui/Levels.java
get
called by 9320
src/main/java/org/olat/core/util/prefs/Preferences.java
toString
called by 8706
src/main/java/org/olat/modules/openbadges/criteria/BadgeCondition.java
containsNonWhitespace
called by 7055
src/main/java/org/olat/core/util/StringHelper.java
name
called by 7042
src/main/java/org/olat/core/logging/activity/ILoggingResourceableType.java
append
called by 6094
src/main/java/org/olat/core/gui/render/StringOutput.java

Shape

Method 137,815
Class 14,587
Function 10,855
Interface 1,660
Enum 1,002

Languages

Java90%
TypeScript10%

Modules by API surface

src/main/webapp/static/js/fabricjs/fabric.min.js1,544 symbols
src/main/webapp/static/js/tinymce4/tinymce/tinymce.min.js1,420 symbols
src/main/webapp/static/js/fullcalendar/index.global.js1,342 symbols
src/main/webapp/static/js/d3/d3.js1,337 symbols
src/main/webapp/static/js/tinymce4/tinymce/themes/silver/theme.min.js1,195 symbols
src/main/webapp/static/js/fullcalendar/index.global.min.js1,147 symbols
src/main/webapp/static/js/pdfjs/web/viewer.mjs1,103 symbols
src/main/webapp/static/js/d3/d3.min.js839 symbols
src/main/webapp/static/js/tinymce4/tinymce/models/dom/model.min.js527 symbols
src/main/webapp/static/js/tinymce4/tinymce/tinymce.d.ts367 symbols
src/main/webapp/static/js/pdfjs/web/wasm/openjpeg_nowasm_fallback.js301 symbols
src/main/webapp/static/js/interactjs/interact.js254 symbols

Datastores touched

(mysql)Database · 1 repos
openolatDatabase · 1 repos
olatDatabase · 1 repos

For agents

$ claude mcp add OpenOLAT \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact