Moodle 1.9.x Server Configuration

Configure a Moodle 1.9.5 or 1.9.6 Server to Receive Notifications

Note: These steps may also work with Moodle versions prior to 1.9.5, but this has not been verified by TechSmith Corporation.

To support TechSmith Relay notification integration, install a new PHP file, rpclib.php, on the Moodle server as follows:

  1. Locate and copy the following file:

    C:\Program Files\TechSmith\Relay Server\Moodle Components\rpclib.php

  2. Paste the file to the Moodle server at:

    <IIS or apache-path>/htdocs/moodle/mod/forum/rpclib.php

  3. Locate the following file on the Moodle server:

    .../htdocs/moodle/lang/en_utf8/forum.php

  4. Add the following lines to the forum.php:

    $string['forum_add_discussion1_name'] = 'forum_add_discussion';

    $string['forum_add_discussion1_description'] = 'calls forum_add_discussion';

  5. On the Moodle server, log in as an administrator.
  6. Navigate to Networking > XML-RPC hosts.
  7. Enable the On option and click Save changes.

  8. Navigate to Networking > XML-RPC hosts.
  9. Add the TechSmith Relay server IP address and, optionally, a network block to the list of trusted hosts.

Configure a Moodle 1.9.7, 1.9.8, or 1.9.9 Server to Receive Notifications

Moodle versions 1.9.7, 1.9.8, and 1.9.9 include several changes to the way networking and XML-RPC are handled.

It is necessary to make manual updates to your Moodle database. This can be accomplished with phpMyAdmin or MySQL CLI if you are using MySQL; otherwise, use the appropriate utility for your database.

Note: This procedure assumes you have a standard installation of Moodle.

  1. Follow the steps above used for 1.9.5 and 1.9.6.
  2. Insert a new row into mdl_mnet_service to represent the forum announcement service.

    idnamedescriptionapiversionoffer
    The next highest value, for this example, it is 4 forum course announcement service 1 1
  3. Insert a new row into mdl_mnet_rpc to represent the forum announcement service.

    Column NameValue
    id The next highest value, for this example, it is 15
    function_name forum_add_discussion_1
    xmlrpc_path mod/forum/rpclib.php/forum_add_discussion1
    parent_type forum
    parent mnet
    enabled 1
    help Post a message to a forum
    profile blank
  4. Insert a new row into mdl_mnet_service2rpc to link the mdl_mnet_service record to the mdl_mnet_rpc record.

    idservicedrpcid
    The next highest value, for this example, it is 15 The id entered into mdl_mnet_service, for this example, it is 4 The id entered into mdl_mnet_rpc, for this example, it is 15
  5. Insert a new row into mdl_mnet_host2service to link the mdl_mnet_host record to the mdl_mnet_service record.

    idhostidserviceidpublishsubscribe
    The next highest value, for this example, it is 1 1 (This id comes from mdl_mnet_host defining your Moodle server having the forum announcement service plugin.) The id entered into mdl_mnet_service, for this example, it is 4 1 0
    The next highest value, for this example, it is 2 0 The id entered into mdl_mnet_service, in this example, it is 4 1 0

    The MySQL insert statements for the above:

    insert into mdl_mnet_service (id,name,description,apiversion,offer) values (4,'forum', 'course announcement service', 1, 1);

    insert into mdl_mnet_rpc (id,function_name,xmlrpc_path,parent_type,parent,enabled,help)

    values (15, 'forum_add_discussion1', 'mod/forum/rpclib.php/forum_add_discussion1', 'forum', 'mnet', 1, 'Post a message to a forum');

    insert into mdl_mnet_service2rpc (id, serviceid, rpcid) values (15, 4, 15);

    insert into mdl_mnet_host2service (id, hostid, serviceid, publish, subscribe) values (1, 1, 4, 1, 0);

    insert into mdl_mnet_host2service (id, hostid, serviceid, publish, subscribe) values (2, 0, 4, 1, 0);

    Note: Prior to using these statements, first verify the correct table ids in these insert statements.

Was this article helpful?
0 out of 0 found this helpful