Статьи с тэгом :
Закрыть
История изменений
Закрыть
Попробовать в облаке
Попробовать в облаке
Справочный центр
Интеграция

About the ONLYOFFICE and Chamilo integration

ONLYOFFICE offers an official connector to integrate ONLYOFFICE Docs with Chamilo and edit office documents within the document library. You can download the ONLYOFFICE connector from the GitHub page.

To learn more about how the ONLYOFFICE connector for Chamilo works, please visit our API documentation.

Main features

  • Editing and viewing text documents, spreadsheets, and presentations.
  • Co-editing documents in real-time: two co-editing modes (Fast and Strict), the Track Changes mode, comments, and the built-in chat.
  • JWT support to secure your traffic so that no one can have access to your documents with the exception of the users with proper rights.

Supported formats

  • For editing and viewing: DOCX, PPTX, XLSX

What's new in version 1.1.2

Added

  • Security filtering
  • Viewing option for DOCX, XLSX, PPTX formats
  • JWT support

Changed

  • Minor documentation style changes
  • Minor code style changes

The full change log is available here.

Connecting ONLYOFFICE Docs to Chamilo

Requirements

  • ONLYOFFICE Docs (Document Server) 6.2 or later

    You need an instance of ONLYOFFICE Docs that is resolvable and connectable both from Chamilo and any end clients. It must be able to POST to Chamilo directly.

    Please refer to the official documentation page to learn more about installing ONLYOFFICE Docs.

    You can also use ONLYOFFICE Docs Cloud (SaaS version).

  • Chamilo v1.11.14 or later
ONLYOFFICE Docs and Chamilo can be installed either on different computers, or on the same machine. In case you select the latter variant, you will need to set up a custom port for ONLYOFFICE Docs as by default both ONLYOFFICE Docs and Chamilo work on port 80. See the corresponding instructions for Docker, Ubuntu, CentOS, or Windows.

Installing the ONLYOFFICE connector for Chamilo

Starting from Chamilo v1.11.16, the ONLYOFFICE connector is pre-installed. To enable it, perform the following steps:

  1. Go to the Chamilo Administration page and choose the Plugins section in the Portal block.
  2. In the plugin list, select the ONLYOFFICE plugin and click the Enable the selected plugins button.
ONLYOFFICE_connector ONLYOFFICE_connector

If your Chamilo version is lower than 1.11.16, please follow these instructions to install the ONLYOFFICE connector:

  1. Download the connector from the GitHub page.
  2. Go to Chamilo Administration, choose Plugins and click the Upload plugin button.
  3. Upload the onlyoffice.zip file. You will see the plugin list.
  4. Launch composer install using the terminal from the Chamilo root folder.
  5. Return to the plugin list, select the ONLYOFFICE plugin, and click Enable.

Updating the ONLYOFFICE connector for Chamilo

To update the connector to the latest version, you need to replace the pre-installed default plugin folder with the newly collected plugin.

Step 1: prepare the folder with the new version of the connector.

  • You can download it from the GitHub page and unpack the archive:
    cd /tmp && wget https://github.com/ONLYOFFICE/onlyoffice-chamilo/releases/download/vX.X.X/onlyoffice.zip

    Where vX.X.X is the necessary connector version.

    unzip onlyoffice.zip
  • Alternatively, you can collect the connector:
    1. Get the latest version of this repository running the command:
      git clone https://github.com/ONLYOFFICE/onlyoffice-chamilo
      cd onlyoffice-chamilo
    2. Get a submodule:
      git submodule update --init --recursive
    3. Collect all files:
      mkdir /tmp/onlyoffice-deploy
      mkdir /tmp/onlyoffice-deploy/onlyoffice
      cp -r ./ /tmp/onlyoffice-deploy/onlyoffice
      cd /tmp/onlyoffice-deploy/onlyoffice
      rm -rf ./.git*
      rm -rf */.git*
                                       

Step 2: remove the old connector folder:

  1. Open the terminal in the root folder.
  2. Remove the folder using the following command:
    rm -rf /var/www/html/chamilo-x.x.x/plugin/onlyoffice

    Where chamilo-x.x.x is your Chamilo version.

Step 3: move the new connector folder to the chamilo-x.x.x/plugin/ directory.

  1. Open the terminal in the root folder.
  2. Move the folder using the following commands:
    cp -r /tmp/onlyoffice-deploy/onlyoffice /var/www/html/chamilo-x.x.x/plugin/

    Where chamilo-x.x.x is your Chamilo version.

Configuring the ONLYOFFICE connector for Chamilo

On the Plugins page, find ONLYOFFICE and click Configure. You'll see the Settings page where you can configure the following parameters:

  • Enter the address that is used to access Document Editing Service from Chamilo into the Document Editing Service address field.
    ImportantThe address of ONLYOFFICE Docs must be accessible from Chamilo, as well as the address of Chamilo must be accessible from ONLYOFFICE Docs.
  • Specify the secret used to sign the data in the Secret Key field.
    Starting from ONLYOFFICE Docs v7.2, JWT is enabled by default and the secret key is generated automatically. You need to enable it on the Chamilo side as well: find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings. For more details, see the Enabling JWT for the ONLYOFFICE and Chamilo integration section of this article.
ONLYOFFICE_configure ONLYOFFICE_configure

Enabling JWT for the ONLYOFFICE and Chamilo integration

To protect documents from unauthorized access, ONLYOFFICE editors use the JSON Web Token (JWT). The token is added in the configuration when the Document Editor is initialized and during the exchange of commands between inner ONLYOFFICE Docs services. The secret key is used to sign the JSON web token and validate the token upon the request to ONLYOFFICE Docs.

Starting from ONLYOFFICE Docs v7.2, JWT is enabled by default and the secret key is generated automatically. You need to find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings.

Step 1: Find your secret key in the ONLYOFFICE Docs configuration file

  1. Open the local.json file with any available text editor.
    • For Linux - /etc/onlyoffice/documentserver/local.json
    • For Windows - %ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json
    • For Docker – enter the ONLYOFFICE Docs container using the docker exec -it <containerID> bash command and open /etc/onlyoffice/documentserver/local.json

      Alternatively, you can use the following command to find the default secret key without opening local.json:

      sudo docker exec <containerID> /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'

    The local.json file should look like this:

    {
      "services": {
        "CoAuthoring": {
          "token": {
            "enable": {
              "request": {
                "inbox": true,
                "outbox": true
              },
              "browser": true
            }
          },
          "secret": {
            "inbox": {
              "string": "yoursecret"
            },
            "outbox": {
              "string": "yoursecret"
            },
            "session": {
              "string": "yoursecret"
            }
          }
        }
      }
    }
    
  2. The true value is specified in three sections. It means that token validation is enabled.
    • services.CoAuthoring.token.enable.browser
    • services.CoAuthoring.token.enable.request.inbox
    • services.CoAuthoring.token.enable.request.outbox
  3. The automatically generated secret key is specified in three sections. You can replace the default secret value with your own secret key. The secret key must be the same in three sections.
    • services.CoAuthoring.secret.inbox.string
    • services.CoAuthoring.secret.outbox.string
    • services.CoAuthoring.secret.session.string
  4. If you make changes, save them and restart the services for the config changes to take effect.
    supervisorctl restart all

Step2: Specify the same secret key in the connector settings

In the connector settings, specify the same secret in the Secret key field and save the settings.

Disabling the ONLYOFFICE connector for Chamilo

If you need to disable the ONLYOFFICE connector:

  1. On the Plugins page, find ONLYOFFICE and click Configure.
  2. Tick the No checkbox in the Enable section.

Start using ONLYOFFICE Docs within Chamilo

To open a document for editing with the ONLYOFFICE Docs editor:

  1. Open the folder with the needed file.
  2. Click the ChamiloOO edit icon Edit in ONLYOFFICE icon to open the file in the editor for editing.

The document will be opened in the ONLYOFFICE Docs editor.

ONLYOFFICE_editfile ONLYOFFICE_editfile

To change the document permission to read-only:

  1. Find the needed document.
  2. Click the Chamilo edit icon Edit icon.
  3. On the opened page, select the Read only checkbox.
  4. Click the Save document button.
ONLYOFFICE_readfile ONLYOFFICE_readfile
Скачать Лучшие редакторы на вашем сайте Совместно просматривайте и редактируйте
все типы текстовых файлов, таблиц и презентаций
Вас также может заинтересовать:
Закрыть