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:
-
Locate and copy the following file:
C:\Program Files\TechSmith\Relay Server\Moodle Components\rpclib.php
-
Paste the file to the Moodle server at:
<IIS or apache-path>/htdocs/moodle/mod/forum/rpclib.php
-
Locate the following file on the Moodle server:
.../htdocs/moodle/lang/en_utf8/forum.php
-
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';
- On the Moodle server, log in as an administrator.
- Navigate to Networking > XML-RPC hosts.
-
Enable the On option and click Save changes.
- Navigate to Networking > XML-RPC hosts.
-
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.
- Follow the steps above used for 1.9.5 and 1.9.6.
-
Insert a new row into mdl_mnet_service to represent the forum announcement service.
id name description apiversion offer The next highest value, for this example, it is 4 forum course announcement service 1 1 -
Insert a new row into mdl_mnet_rpc to represent the forum announcement service.
Column Name Value 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 -
Insert a new row into mdl_mnet_service2rpc to link the mdl_mnet_service record to the mdl_mnet_rpc record.
id serviced rpcid 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 -
Insert a new row into mdl_mnet_host2service to link the mdl_mnet_host record to the mdl_mnet_service record.
id hostid serviceid publish subscribe 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.