Moodle is an open-source e-learning management system (LMS) written in PHP and distributed under GNU GPL. ONLYOFFICE integration into Moodle allows users to add document activities to courses and enables editing and collaboration for students and teachers.
In this tutorial, we’ll learn how to connect the ONLYOFFICE Docs and Moodle instances using an integration plugin.
Prerequisite: The latest version of ONLYOFFICE plugin (v.3.0.0) is compatible with Moodle 4.0. The minimal version of ONLYOFFICE Docs which is supported for using with Moodle is v.4.2.7 (and later).
Step 1: Install ONLYOFFICE Docs
To be able to work with documents within Moodle, you need an instance of ONLYOFFICE Docs (Document Server). The installation way officially recommended by developers is to use Docker.
It allows installing the latest version of the editors with all the dependencies running the single command:
sudo docker run -i -t -d -p 8080:80 --restart=always onlyoffice/documentserver
You can find the detailed instructions in this tutorial.
If you are new to Moodle, check this Computing post tutorial which describes how to install the solution on Ubuntu 22.04.
Step 2: Install integration plugin
ONLYOFFICE plugin is an activity module which is available in the official Moodle plugins library.
Follow the usual Moodle plugin installation steps to install the plugin into your mod/onlyofficeeditor directory.
Log in as an admin and go to Site administration — Plugins — Install plugins.
Click the Install plugins from Moodle plugins directory button and select your current Moodle version. Search for the required plugin, click the Install button, and then click Continue.
Confirm the installation request and check the plugin validation report.
Step 3: Configure instance
Find the uploaded app on the Plugins overview page and click Settings.
Enter the name of the server with ONLYOFFICE Docs installed in the Document Editing Service Address field (see the screenshot in the next step).
If needed, enable the Force Save option to save document versions and revisions manually at any time directly to the server.
Starting from version 7.2 of ONLYOFFICE Docs, JWT is enabled by default and the secret key is generated automatically to protect documents from unauthorized access. If needed, enter your own Document Server Secret and specify the same secret key in the ONLYOFFICE Docs config file.
Step 4: Customize interface
Customize the interface elements of ONLYOFFICE Docs:
- display or hide Chat, Help, and Feedback and Support menu buttons;
- choose between default/compact and colored/monochrome toolbar header.
Save the settings after entering the required credentials and interface customization.
Step 5: Manage document activities in courses
Create an ONLYOFFICE activity in the course to add documents, spreadsheets, presentations, or fillable forms, and enable viewing and editing in the Moodle interface.
You can either upload any existing document from your computer or create a new blank file.
Adjust the new activity’s name and description and other settings, including permissions for downloading and printing, hiding Protection tab from other users, module availability and ID, restricting access to the activity, parameters for completion tracking, tags, course competencies.
Once the activity is set, define which types of users have access to it, as well as other types of activity permissions. For example, you can allow editing permission for teachers and allow only document viewing for students.
Step 6: View and edit attached files
In the ONLYOFFICE document activity, edit docs, create digital forms, fill them out and save as PDF, co-author files with other students or teachers using real-time and paragraph-locking co-editing modes, Track Changes, comments, and built-in chat.
DOCX, XLSX, PPTX, DOCXF, OFORM, TXT, and CSV formats are available for viewing and editing. PDF is available for viewing. ODT, ODS, ODP, DOC, XLS, PPT, PPS, EPUB, RTF, HTML, and HTM are available for editing through conversion to OOXML.
Apply extra features using plugins: translate texts with DeepL, Apertium, or Google, make audio and video calls using Jitsi, insert YouTube videos and complex diagrams, create bibliographies with Mendeley and Zotero, convert docs to HTML, correct grammar and spelling mistakes, search for synonyms and antonyms, etc.
It is possible to use compact editor on the course page to have constant access to the activity information and blocks, or enter a full screen mode to edit the files in the extended interface.
That’s all! Now you are able to work with office docs within the Moodle course structure.