Chamilo ONLYOFFICE integration plugin
The app is compatible with Chamilo v1.11.14 or higher.
Installing ONLYOFFICE Docs
You need an instance of ONLYOFFICE Docs (Document Server) that is resolvable and connectable both from Chamilo and any end clients. ONLYOFFICE Docs must also be able to POST to Chamilo directly.
ONLYOFFICE Docs and Chamilo can be installed either on different computers, or on the same machine. If you use one machine, set up a custom port for Document Server as by default both ONLYOFFICE Docs and Chamilo work on port 80.
The easiest way to start an instance of ONLYOFFICE Docs is to use Docker.
Installing Chamilo/ONLYOFFICE integration plugin
To start using ONLYOFFICE Docs with Chamilo, the following steps must be performed:
Configuring Chamilo/ONLYOFFICE integration plugin
On the Plugins page, find ONLYOFFICE and click Configure. You'll see the Settings page. Enable the plugin and specify Document Server address:https://<documentserver>/
Where the documentserver is the name of the server with ONLYOFFICE Docs installed. The address must be accessible from the user browser and from the Chamilo server. The Chamilo server address must also be accessible from ONLYOFFICE Docs for correct work.
How it works
To create a new file, the user opens the necessary folder and clicks the Create new ONLYOFFICE icon.
The user is redirected to the file creation page where they need to enter the file name and format (text document, spreadsheet, or presentation). The browser calls the /plugin/onlyoffice/create.php method. It adds the copy of the empty file to the user folder.
To open an existing file, the user chooses the Open with ONLYOFFICE icon.
The request is sent to /plugin/onlyoffice/editor.php?docId="document identificator". The server processes the request, generates the editor initialization configuration with the following properties:
The server returns a page with a script to open the editor.
The browser opens this page and loads the editor.
The browser makes a request to Document Server and passes the document configuration to it.
Document Server loads the document and the user starts editing.
Document Server sends a POST request to callbackUrl to inform Chamilo that the user is editing the document.
When all the users have finished editing, they close the editor window.
After 10 seconds, Document Server makes a POST request to callbackUrl with the information that editing has ended and sends a link to the new document version.
Chamilo loads a new version of the document and overwrites the file.
Download the Chamilo/ONLYOFFICE integration plugin here.