Interaction with Moodle

Jump to: navigation, search

In order to integrate Siette into the Moodle LMS, a new component of Moodle named siettetest should be added to allow any Moodle user to call Siette automatically, and get logged into Siette with the same role they have in Moodle (teacher or student).


Requirement for the installation

Currently the supported Moodle version is 1.9. Previos version 1.7. and 1.8. version are discontinueed. We are working to support Moodle 2.x

The module communicates with Siette through a digital signature process so that Siette could authenticate that the requests comes from the right source. In order to have higher security the protocol HTTPS can also be used. In order to use this functions some requirement are needed at the Moodle Server side:

  • If you are going to use the protocol HTTPS, the Server must install the package cURL for PHP (see web page
  • Digital signature, base don public/private key cryptography, and more precisely RSA, needs the openssl package for PHP (see web page

The digital signature requires two asymmetric keys. The private key is kept by Moodle and Hill be used to sign, the public key is used by SIETTE, that Hill store it into its database and will use it to recognize the messages from Moodle server.

Generating public and private keys with openssl

It is necessary to generate two keys for Moodle authentication in SIETTE. The private key must be stored on a file in PEM format and the public key should be stored in a file in DER or PEM format to be processed by Siette.

Continue, lists some useful command openssl to create and use files with the formats discussed above:

  • Generate a RSA private key without using password in a PEM format file called "priv_key":
         openssl genrsa -out /path/priv_key.pem
  • Generate a public key from private key file called "priv_key", and save this in a PEM format file called "pub_key":
         openssl rsa -in /path/priv_key.pem -pubout -out /path/pub_key.pem
  • Generate a public key from a private key file called "priv_key", and save this in a DER format file called "pub_key":
         openssl rsa -in /path/priv_key.pem -pubout -outform DER -out /path/pub_key.der
  • Read the key generated in a PEM or DER format file:
         openssl rsa -in /path/file.pem -inform PEM -text [-pubin]

Where -pubin is used optionally if the file contains the public key. PEM can be replaced by DER depending on the file format.

Installing the siettetest module

To install the siettetest plug-in, just copy the unziped directory siettetest into the directory mod at your $MOODLE_HOME.

Additionally you have to copy the files containing the keys (see above) into any safe directory, (not accesible through the web). We recommend you to use as default the directory 'uma/iaia/keys/' at your $MOODLE_DATA directory. This directory should contain at least the PEM file with the private key (private.pem). The public key, (stored in public.pem) and an alphanumerical system identifier shoud be added to SIETTE database in order to grant access to Moodle (see below).

Configuration of the Siette module in Moodle

Once installed, it is necessary to configure the Siette module within Moodle with the appropriate parameters. To do so, it is necessary to log in as admin in Moodle and visit notifications link. Moodle will automatically detect the new module and create the necessary tables in its database.

In Moodle 1.9. go to the administration panel (left menu), and select Modules, and then Activities. A new activity called SIETTE Quiz will appear. Clcik and edit the following form.


In this page some parameters are requested:

  • System identifier, which will be used by Siette in the authentication in order to recognize Moodle as an external system. Each identifier is associated with a unique external system and should be provided by Siette administrator. By default the value is external,but it should be modified.
  • SIETTE server URL, where the Siette system is located. By default it is set to http://localhost:8080/siette/ but it should be changed, for instance to
  • SIETTE web service relative location, that will be added to thebase URL to access the Siette web services. By default is set to services/External and commonly, it is not needed to change it.
  • Private key file. The file that contains the private key in format .pem should be found in the security folder. By default it is set to the file private.pem that it is not needed to change unless the file is renamed.

Once all parameters are set, the connectivity can be checked by clicking the button beside the web service address.

Personal tools
In other languages