Skip to content

Commit

Permalink
mnet MDL-21098 fixed quite a few issues in the mnet installer and tes…
Browse files Browse the repository at this point in the history
…tclient. Rebumped all plugin versions that use mnet to get the services reinstalled
  • Loading branch information
Penny Leach committed Feb 18, 2010
1 parent 24409f7 commit 677b632
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion admin/mnet/testclient.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

$mnet_request->set_method('system/listMethods');
if (isset($servicename) && array_key_exists($servicename, $serviceinfo)) {
echo $OUTPUT->heading(get_string('methodsavailableonhostinservice', 'mnet', array('host' => $host->wwwroot, 'service' => $servicename)));
echo $OUTPUT->heading(get_string('methodsavailableonhostinservice', 'mnet', (object)array('host' => $host->wwwroot, 'service' => $servicename)));
$service = $serviceinfo[$servicename];
$mnet_request->add_param($servicename, 'string');
} else {
Expand Down
2 changes: 1 addition & 1 deletion auth/mnet/version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

$plugin->version = 2010012902;
$plugin->version = 2010021800;
2 changes: 1 addition & 1 deletion enrol/mnet/version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

$plugin->version = 2010012902;
$plugin->version = 2010021800;
2 changes: 1 addition & 1 deletion lang/en_utf8/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
$string['restrictedcontextexception'] = 'Sorry, execution of external function violates context restriction.';
$string['reportnotavailable'] = 'This type of report is only available for the site course';
$string['reverseproxyabused'] = 'Reverse proxy enabled, server can not be accessed directly, sorry.<br />Please contact server administrator.';
$string['rpcerror'] = 'RPC enrol/mnet/available_courses: ($a)';
$string['rpcerror'] = 'Ooops! Your MNET communication has failed! Here\'s that error message to pass on to your administrator: $a';
$string['scheduledbackupsdisabled'] = 'Scheduled backups have been disabled by the server admin';
$string['sectionnotexist'] = 'This section does not exist';
$string['secretalreadyused'] = 'Change password confirmation link was already used, password was not changed';
Expand Down
39 changes: 19 additions & 20 deletions lib/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1417,29 +1417,28 @@ function upgrade_plugin_mnet_functions($component) {
} else {
$dataobject->id = $DB->insert_record('mnet_rpc', $dataobject, true);
}
}

foreach ($publishmethodservices[$dataobject->functionname] as $service) {
if ($serviceobj = $DB->get_record('mnet_service', array('name'=>$service['servicename']))) {
$serviceobj->apiversion = $service['apiversion'];
$DB->update_record('mnet_service', $serviceobj);
} else {
$serviceobj = new stdClass();
$serviceobj->name = $service['servicename'];
$serviceobj->apiversion = $service['apiversion'];
$serviceobj->offer = 1;
$serviceobj->id = $DB->insert_record('mnet_service', $serviceobj);
}
$servicecache[$service['servicename']] = $serviceobj;
if (!$DB->record_exists('mnet_service2rpc', array('rpcid'=>$dataobject->id, 'serviceid'=>$serviceobj->id))) {
$obj = new stdClass();
$obj->rpcid = $dataobject->id;
$obj->serviceid = $serviceobj->id;
$DB->insert_record('mnet_service2rpc', $obj, true);
foreach ($publishmethodservices[$dataobject->functionname] as $service) {
if ($serviceobj = $DB->get_record('mnet_service', array('name'=>$service['servicename']))) {
$serviceobj->apiversion = $service['apiversion'];
$DB->update_record('mnet_service', $serviceobj);
} else {
$serviceobj = new stdClass();
$serviceobj->name = $service['servicename'];
$serviceobj->apiversion = $service['apiversion'];
$serviceobj->offer = 1;
$serviceobj->id = $DB->insert_record('mnet_service', $serviceobj);
}
$servicecache[$service['servicename']] = $serviceobj;
if (!$DB->record_exists('mnet_service2rpc', array('rpcid'=>$dataobject->id, 'serviceid'=>$serviceobj->id))) {
$obj = new stdClass();
$obj->rpcid = $dataobject->id;
$obj->serviceid = $serviceobj->id;
$DB->insert_record('mnet_service2rpc', $obj, true);
}
}
}
}

// finished with methods we publish, now do subscribable methods
foreach($subscribes as $service => $methods) {
if (!array_key_exists($service, $servicecache)) {
Expand Down Expand Up @@ -1468,7 +1467,7 @@ function upgrade_plugin_mnet_functions($component) {
$obj->serviceid = $serviceobj->id;
$DB->insert_record('mnet_remote_service2rpc', $obj, true);
}
$subscribemethodservices[$method][] = $servicename;
$subscribemethodservices[$method][] = $service;
}
}

Expand Down
2 changes: 1 addition & 1 deletion portfolio/mahara/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$plugin->version = 2010012902;
$plugin->version = 2010021800;
$plugin->requires = 2008072500;
$plugin->cron = 0;

Expand Down
2 changes: 1 addition & 1 deletion repository/mahara/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

$plugin->version = 2010012902;
$plugin->version = 2010021800;
2 changes: 1 addition & 1 deletion repository/remotemoodle/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

$plugin->version = 2010012902;
$plugin->version = 2010021800;

0 comments on commit 677b632

Please sign in to comment.