set_time_limit(0); // To allow slow databases to complete the long SQL
if (modify_database("$CFG->libdir/db/$CFG->dbtype.sql")) {
$db->debug = false;
- notify($strdatabasesuccess);
+ notify($strdatabasesuccess, "green");
} else {
$db->debug = false;
error("Error: Main databases NOT set up successfully");
$strdatabasechecking = get_string("databasechecking", "", $a);
$strdatabasesuccess = get_string("databasesuccess");
print_header($strdatabasechecking, $strdatabasechecking, $strdatabasechecking);
- notify($strdatabasechecking);
+ print_heading($strdatabasechecking);
$db->debug=true;
if (main_upgrade($CFG->version)) {
$db->debug=false;
if (set_config("version", $version)) {
- notify($strdatabasesuccess);
+ notify($strdatabasesuccess, "green");
print_continue("index.php");
die;
} else {
print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades);
if (set_config("version", $version)) {
- notify("You are currently using Moodle version $version (Release $release)");
+ print_heading("You are currently using Moodle version $version (Release $release)");
print_continue("index.php");
die;
} else {
if ($currmodule->version == $module->version) {
// do nothing
} else if ($currmodule->version < $module->version) {
- notify("$module->name module needs upgrading");
+ print_heading("$module->name module needs upgrading");
$upgrade_function = $module->name."_upgrade";
if (function_exists($upgrade_function)) {
$db->debug=true;
if (! update_record("modules", $module)) {
error("Could not update $module->name record in modules table!");
}
- notify(get_string("modulesuccess", "", $module->name));
+ notify(get_string("modulesuccess", "", $module->name), "green");
+ echo "<HR>";
} else {
$db->debug=false;
notify("Upgrading $module->name from $currmodule->version to $module->version FAILED!");
$strmodulesetup = get_string("modulesetup");
print_header($strmodulesetup, $strmodulesetup, $strmodulesetup);
}
+ print_heading($module->name);
$updated_modules = true;
$db->debug = true;
set_time_limit(0); // To allow slow databases to complete the long SQL
if (modify_database("$fullmod/db/$CFG->dbtype.sql")) {
$db->debug = false;
if ($module->id = insert_record("modules", $module)) {
- notify(get_string("modulesuccess", "", $module->name));
+ notify(get_string("modulesuccess", "", $module->name), "green");
+ echo "<HR>";
} else {
error("$module->name module could not be added to the module list!");
}
</tr>
<tr valign=top>
<td align=right><P><? print_string("frontpagedescription") ?>:</P><BR>
- <? helpbutton("text", get_string("helptext")) ?>
+ <? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br \>
+ <? helpbutton("text", get_string("helptext"), "moodle", true, true) ?><br \>
</td>
<td><TEXTAREA NAME=summary COLS=50 ROWS=10 WRAP=virtual><? p($form->summary) ?></TEXTAREA>
<? formerr($err["summary"]) ?>
}
if ($returnid) {
- //if ($db->hasInsertID) {
- //return $db->Insert_ID(); // ADOdb has stored the ID for us
- //}
+ if ($CFG->dbtype == "mysql") {
+ return $db->Insert_ID(); // ADOdb has stored the ID for us, but it isn't reliable
+ }
// Try to pull the record out again to find the id. This is the most cross-platform method.
if ($rs = $db->Execute("SELECT id FROM $CFG->prefix$table WHERE $select")) {
}
-function get_users_unconfirmed($cutofftime=999999999) {
+function get_users_unconfirmed($cutofftime=2000000000) {
global $CFG;
return get_records_sql("SELECT *
FROM {$CFG->prefix}user