require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
if (!$site = get_site()) {
- print_error('nosite', '', '', NULL, true);
+ print_error('nosite', 'error');
}
/// Initialize variables.
if (!$site = get_site()) {
admin_externalpage_print_header();
- print_error('nosite', '');
+ print_error('nosite', 'error');
}
if (!function_exists('curl_init') ) {
$temp_wwwroot = clean_param($form->wwwroot, PARAM_URL);
if ($temp_wwwroot !== $form->wwwroot) {
trigger_error("We now parse the wwwroot with PARAM_URL. Your URL will need to have a valid TLD, etc.");
- print_error("invalidurl", 'mnet','peers.php');
+ print_error('invalidurl', 'mnet', 'peers.php');
exit;
}
unset($temp_wwwroot);
if (isset($form->public_key)) {
$form->public_key = clean_param($form->public_key, PARAM_PEM);
if (empty($form->public_key)) {
- print_error("invalidpubkey", 'mnet', 'peers.php?step=update&hostid='.$mnet_peer->id);
+ print_error("invalidpubkey", 'mnet', 'peers.php?step=update&hostid='.$mnet_peer->id, '');
exit;
} else {
$oldkey = $mnet_peer->public_key;
foreach ($mnet_peer->error as $err) {
$errmsg .= $err['code'] . ': ' . $err['text'].'<br />';
}
- error(get_string("invalidpubkey", 'mnet') . $errmsg ,'peers.php?step=update&hostid='.$mnet_peer->id);
- //print_error("invalidpubkey", 'mnet', 'peers.php?step=update&hostid='.$mnet_peer->id, $errmsg);
+ print_error("invalidpubkey", 'mnet', 'peers.php?step=update&hostid='.$mnet_peer->id, $errmsg);
exit;
}
}
if ($bool) {
redirect('peers.php?step=update&hostid='.$mnet_peer->id, get_string('changessaved'));
} else {
- print_error('Invalid action parameter.', '', 'index.php');
+ print_error('invalidaction', 'error', 'index.php');
}
}
}
$string['groupunknown'] = 'Group $a not associated to specified course';
$string['guestnoeditprofile'] = 'The guest user cannot edit their profile';
$string['guestnoeditprofileother'] = 'The guest user profile cannot be edited';
+$string['invalidaction'] = 'Invalid action parameter.';
$string['invalidaccessparameter'] = 'Invalid access parameter.';
$string['invalidcourse'] = 'Invalid course';
$string['invalidfieldname'] = '\"$a\" is not a valid field name';
$string['nonmeaningfulcontent'] = 'Non meaningful content';
$string['noparticipatorycms'] = 'Sorry, but you have no participatory course modules to report on.';
$string['nopermissions'] = 'Sorry, but you do not currently have permissions to do that ($a)';
+$string['nosite'] = 'No sites';
$string['notavailable'] = 'That is not currently available';
$string['onlyadmins'] = 'Only administrators can do that.';
$string['onlyeditingteachers'] = 'Only editing teachers can do that.';