if (empty($course->password)) {
// do not allow entry when no course password set
// automatic login when manual primary, no login when secondary at all!!
- print_error('illegal enrolment attempted');
+ print_error('invalidenrol');
}
$groupid = $this->check_group_entry($course->id, $form->password);
// require_capability('moodle/role:assign', $context, NULL, false);
if (!role_unassign(0, $userrecord->id, 0, $context->id)) {
- print_error("An error occurred while trying to unenrol that person.");
+ print_error("unenrolerror");
}
return true;
list($code, $errormessage) = array_map('trim',explode(':', $errormessage, 2));
$message .= "ERROR $code:<br/>$errormessage<br/>";
}
- print_error("RPC enrol/mnet/available_courses:<br/>$message");
+ print_error("rpcerror", '', '', $message);
}
return false;
}
/// Work out who to send the message to
if (!$admin = get_admin() ) {
- print_error('Could not find an admin user!');
+ print_error('cannotfindadmin', 'debug');
}
$supportuser = new object;
$string['cannotupdateversion'] = 'Upgrade failed! (Could not update version in config table)';
$string['cannotupdaterelease'] = 'ERROR: Could not update release version in database!!';
$string['cannotsetupsite'] = 'Serious Error! Could not set up the site!';
+$string['cannotfindadmin'] = 'Could not find an admin user!';
$string['configmoodle'] = 'Moodle has not been configured yet. You need to edit config.php first.';
$string['dbnotinsert'] = 'Database error - Cannot insert ($a)';
$string['dbnotupdate'] = 'Database error - Cannot update ($a)';
$string['invalidcoursemodule'] = 'Invalid course module ID';
$string['invalidcontext'] = 'Invalid context';
$string['invaliddata'] = 'Data submitted is invalid.';
+$string['invalidenrol'] = 'illegal enrolment attempted';
$string['invalidevent'] = 'Invalid event';
$string['invalidcoursenameshort'] = 'Invalid short course name';
$string['invalidevent'] = 'Invalid event';
$string['remotedownloaderror'] = 'Download of component to your server failed, please verify proxy settings, PHP cURL extension is highly recommended.<br /><br />You must download the <a href=\"$a->url\">$a->url</a> file manually, copy it to \"$a->dest\" in your server and unzip it there.';
$string['remotedownloadnotallowed'] = 'Download of components to your server isn\'t allowed (allow_url_fopen is disabled).<br /><br />You must download the <a href=\"$a->url\">$a->url</a> file manually, copy it to \"$a->dest\" in your server and unzip it there.';
$string['restricteduser'] = 'Sorry, but your current account \"$a\" is restricted from doing that.';
+$string['rpcerror'] = 'RPC enrol/mnet/available_courses:<br/> ($a)';
$string['scheduledbackupsdisabled'] = 'Scheduled backups have been disabled by the server admin';
$string['sectionnotexist'] = 'This section does not exist';
$string['sendmessage'] = 'Send Message';