Skip to content

Activity-type Moodle module to create and edit web sites with eXeLearning (online).

Notifications You must be signed in to change notification settings

exelearning/mod_exeweb

Repository files navigation

eXeLearning web sites for Moodle

Activity-type module to create and edit web sites with eXeLearning (online).

You need the eXeLearning online version installed (ws28 or higher) and access to its configuration files to run this module.

Compatibility

This plugin version is tested for:

  • Moodle 4.1.3+ (Build: 20230526)
  • Moodle 3.11.10+ (Build: 20221007)
  • Moodle 3.9.2+ (Build: 20200929)

Installing via uploaded ZIP file

  1. Log in to your Moodle site as an admin and go to Site administration > Plugins > Install plugins.
  2. Upload the ZIP file with the plugin code. You should only be prompted to add extra details if your plugin type is not automatically detected.
  3. Check the plugin validation report and finish the installation.

Installing manually

The plugin can be also installed by putting the contents of this directory to

{your/moodle/dirroot}/mod/exeweb

Afterwards, log in to your Moodle site as an admin and go to Site administration > Notifications to complete the installation.

Alternatively, you can run

$ php admin/cli/upgrade.php

to complete the installation from the command line.

Configuration

Go to the URL:

{your/moodle/dirroot}/admin/settings.php?section=modsettingexeweb
  • Remote URI: exeweb | exeonlinebaseuri

    • eXeLearning (online) base URI
  • Signing Key: exeweb | hmackey1

    • Key used to sign data sent to the eXeLearning server, to check the data origin. Use up to 32 characters.
  • Token expiration: exeweb | tokenexpiration

    • Max time (in seconds) to edit the package in eXeLearning and get back to Moodle.
  • New package template: exeweb | template

    • Package uploaded there will be used as the default package for new activities.
  • Send template: exeweb | sendtemplate

    • Sends uploaded (or default) template to eXeLearning when creating a new activity.
  • Mandatory files RE list: exeweb | mandatoryfileslist

    • A mandatory files list can be configurad here. Enter each mandatory file as a PHP regular expression (RE) on a new line.
  • Forbidden files RE list: exeweb | forbiddenfileslist

    • A forbidden files list can be configurad here. Enter each forbidden file as a PHP regular expression (RE) on a new line.

Development using Makefile

To facilitate development, a Makefile is included to simplify Docker-based workflows.

Requirements

  • Docker
  • Docker Compose

Available Commands

  • Pull the latest images:
    To pull the latest Docker images from the registry, use:

    make pull

    Note: Docker need to be logged in ghcr.io ([more info...])(https://docs.github.com/es/packages/working-with-a-github-packages-registry/working-with-the-container-registry)

  • Start the development environment:
    To start the Docker containers in interactive mode, run:

    make up

    To start the containers in the background (daemon mode), run:

    make upd
  • Build the Docker containers:
    You can build the Docker containers using the following command. This will also check if the EXELEARNING_WEB_SOURCECODE_PATH is defined in the .env file:

    make build

    Note: If EXELEARNING_WEB_SOURCECODE_PATH is not defined, the build will fail and display an error message.

  • Access a shell in the Moodle container:
    To open a shell inside the running Moodle container, use:

    make shell
  • Stop and remove containers:
    To stop and remove the running Docker containers, run:

    make down
  • Clean up the environment:
    To stop and remove all Docker containers, volumes, and orphaned containers, run:

    make clean

Environment Variables

You can configure various settings using the .env file. If this file does not exist, it will be automatically generated by copying from .env.dist. Key variables to configure:

  • EXELEARNING_WEB_SOURCECODE_PATH: Define the path to the eXeLearning source code if you want to work with a local version.
  • APP_PORT: Define the port on which the application will run.
  • APP_SECRET: Set a secret key for the application.

Example Workflow

  1. Ensure you have Docker running and properly configured.

  2. Define your environment variables in the .env file or copy from .env.dist.

  3. Pull the latest Docker images:

    make pull
  4. Start the environment:

    make up
  5. Build the environment if necessary:

    make build
  6. Once development is complete, stop and clean up the environment:

    make down
    make clean

About

Copyright 2023: Centro Nacional de Desarrollo Curricular en Sistemas no Propietarios (CeDeC) / INTEF (Instituto Nacional de Tecnologías Educativas y de Formación del Profesorado)

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should receive a copy of the GNU General Public License along with this program.