adding some strings
[moodle-linuxchix.git] / admin / index.php
blob6bfba862b88bc68eceb11a07be6646335e7c3c28
1 <?php // $Id$
3 /// Check that config.php exists, if not then call the install script
4 if (!file_exists('../config.php')) {
5 header('Location: ../install.php');
6 die;
9 /// Check that PHP is of a sufficient version
10 /// Moved here because older versions do not allow while(@ob_end_clean());
11 if (version_compare(phpversion(), "4.3.0") < 0) {
12 $phpversion = phpversion();
13 echo "Sorry, Moodle requires PHP 4.3.0 or later (currently using version $phpversion)";
14 die;
17 /// Turn off time limits and try to flush everything all the time, sometimes upgrades can be slow.
19 @set_time_limit(0);
20 @ob_implicit_flush(true);
21 while(@ob_end_clean()); // ob_end_flush prevents sending of headers
24 require_once('../config.php');
25 require_once($CFG->libdir.'/adminlib.php'); // Contains various admin-only functions
26 require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions
28 $id = optional_param('id', '', PARAM_ALPHANUM);
29 $confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
30 $confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
31 $agreelicense = optional_param('agreelicense', 0, PARAM_BOOL);
32 $autopilot = optional_param('autopilot', 0, PARAM_BOOL);
33 $ignoreupgradewarning = optional_param('ignoreupgradewarning', 0, PARAM_BOOL);
35 /// check upgrade status first
36 if ($ignoreupgradewarning and !empty($_SESSION['upgraderunning'])) {
37 $_SESSION['upgraderunning'] = 0;
39 upgrade_check_running("Upgrade already running in this session, please wait!<br />Click on the exclamation marks to ignore this warning (<a href=\"index.php?ignoreupgradewarning=1\">!!!</a>).", 10);
41 /// set install/upgrade autocontinue session flag
42 if ($autopilot) {
43 $_SESSION['installautopilot'] = $autopilot;
46 /// Check some PHP server settings
48 $documentationlink = '<a href="http://docs.moodle.org/en/Installation">Installation docs</a>';
50 if (ini_get_bool('session.auto_start')) {
51 error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
54 if (ini_get_bool('magic_quotes_runtime')) {
55 error("The PHP server variable 'magic_quotes_runtime' should be Off - $documentationlink");
58 if (!ini_get_bool('file_uploads')) {
59 error("The PHP server variable 'file_uploads' is not turned On - $documentationlink");
62 if (empty($CFG->prefix) && $CFG->dbfamily != 'mysql') { //Enforce prefixes for everybody but mysql
63 error('$CFG->prefix can\'t be empty for your target DB (' . $CFG->dbtype . ')');
66 if ($CFG->dbfamily == 'oracle' && strlen($CFG->prefix) > 2) { //Max prefix length for Oracle is 2cc
67 error('$CFG->prefix maximum allowed length for Oracle DBs is 2cc.');
70 /// Check that config.php has been edited
72 if ($CFG->wwwroot == "http://example.com/moodle") {
73 error("Moodle has not been configured yet. You need to edit config.php first.");
77 /// Check settings in config.php
79 $dirroot = dirname(realpath("../index.php"));
80 if (!empty($dirroot) and $dirroot != $CFG->dirroot) {
81 error("Please fix your settings in config.php:
82 <p>You have:
83 <p>\$CFG->dirroot = \"".addslashes($CFG->dirroot)."\";
84 <p>but it should be:
85 <p>\$CFG->dirroot = \"".addslashes($dirroot)."\";",
86 "./");
89 /// Set some necessary variables during set-up to avoid PHP warnings later on this page
90 if (!isset($CFG->framename)) {
91 $CFG->framename = "_top";
93 if (!isset($CFG->release)) {
94 $CFG->release = "";
96 if (!isset($CFG->version)) {
97 $CFG->version = "";
100 if (is_readable("$CFG->dirroot/version.php")) {
101 include_once("$CFG->dirroot/version.php"); # defines $version
104 if (!$version or !$release) {
105 error('Main version.php was not readable or specified');# without version, stop
108 /// Check if the main tables have been installed yet or not.
110 if (! $tables = $db->Metatables() ) { // No tables yet at all.
111 $maintables = false;
113 } else { // Check for missing main tables
114 $maintables = true;
115 $mtables = array("config", "course", "course_categories", "course_modules",
116 "course_sections", "log", "log_display", "modules",
117 "user");
118 foreach ($mtables as $mtable) {
119 if (!in_array($CFG->prefix.$mtable, $tables)) {
120 $maintables = false;
121 break;
125 if (! $maintables) {
126 /// hide errors from headers in case debug enabled in config.php
127 $origdebug = $CFG->debug;
128 $CFG->debug = DEBUG_MINIMAL;
129 error_reporting($CFG->debug);
130 if (empty($agreelicense)) {
131 $strlicense = get_string('license');
132 print_header($strlicense, $strlicense, $strlicense, "", "", false, "&nbsp;", "&nbsp;");
133 print_heading("<a href=\"http://moodle.org\">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment");
134 print_heading(get_string('copyrightnotice'));
135 print_box(text_to_html(get_string('gpl')), 'copyrightnotice');
136 echo "<br />";
137 notice_yesno(get_string('doyouagree'), "index.php?agreelicense=1",
138 "http://docs.moodle.org/en/License");
139 print_footer('none');
140 exit;
142 if (empty($confirmrelease)) {
143 $strcurrentrelease = get_string("currentrelease");
144 print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
145 print_heading("Moodle $release");
146 print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'generalbox boxaligncenter boxwidthwide');
147 echo '<form action="index.php"><div>';
148 echo '<input type="hidden" name="agreelicense" value="1" />';
149 echo '<input type="hidden" name="confirmrelease" value="1" />';
150 echo '</div>';
151 echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="1" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>';
152 echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>';
153 echo '</form>';
154 print_footer('none');
155 die;
158 $strdatabasesetup = get_string("databasesetup");
159 $strdatabasesuccess = get_string("databasesuccess");
160 print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup,
161 "", upgrade_get_javascript(), false, "&nbsp;", "&nbsp;");
162 /// return to original debugging level
163 $CFG->debug = $origdebug;
164 error_reporting($CFG->debug);
165 upgrade_log_start();
166 $db->debug = true;
168 /// Both old .sql files and new install.xml are supported
169 /// But we prioritise install.xml (XMLDB) if present
171 change_db_encoding(); // first try to change db encoding to utf8
172 if (!setup_is_unicodedb()) {
173 // If could not convert successfully, throw error, and prevent installation
174 print_error('unicoderequired', 'admin');
177 $status = false;
178 if (file_exists("$CFG->libdir/db/install.xml")) {
179 $status = install_from_xmldb_file("$CFG->libdir/db/install.xml"); //New method
180 } else if (file_exists("$CFG->libdir/db/$CFG->dbtype.sql")) {
181 $status = modify_database("$CFG->libdir/db/$CFG->dbtype.sql"); //Old method
182 } else {
183 error("Error: Your database ($CFG->dbtype) is not yet fully supported by Moodle or install.xml is not present. See the lib/db directory.");
186 // all new installs are in unicode - keep for backwards compatibility and 1.8 upgrade checks
187 set_config('unicodedb', 1);
189 /// Continue with the instalation
190 $db->debug = false;
191 if ($status) {
192 //ugly hack - install new groups: MDL-9217
193 require_once("$CFG->dirroot/group/db/upgrade.php");
194 install_group_db();
196 // Install the roles system.
197 moodle_install_roles();
198 set_config('statsrolesupgraded',time());
200 // install core event handlers
201 events_update_definition();
203 // Write default settings unconditionally (i.e. even if a setting is already set, overwrite it)
204 // (this should only have any effect during initial install).
205 $adminroot = admin_get_root();
206 $adminroot->prune('backups'); // backup settings table not created yet
207 apply_default_settings($adminroot);
209 /// This is used to handle any settings that must exist in $CFG but which do not exist in
210 /// admin_get_root()/$ADMIN as admin_setting objects (there are some exceptions).
211 apply_default_exception_settings(array('alternateloginurl' => '',
212 'auth' => 'email',
213 'auth_pop3mailbox' => 'INBOX',
214 'changepassword' => '',
215 'enrol' => 'manual',
216 'enrol_plugins_enabled' => 'manual',
217 'guestloginbutton' => 1,
218 'registerauth' => 'email',
219 'style' => 'default',
220 'template' => 'default',
221 'theme' => 'standardwhite',
222 'filter_multilang_converted' => 1));
224 notify($strdatabasesuccess, "green");
225 require_once $CFG->dirroot.'/mnet/lib.php';
226 } else {
227 error("Error: Main databases NOT set up successfully");
229 print_continue('index.php');
230 print_footer('none');
231 die;
235 /// Check version of Moodle code on disk compared with database
236 /// and upgrade if possible.
238 if (file_exists("$CFG->dirroot/lib/db/$CFG->dbtype.php")) {
239 include_once("$CFG->dirroot/lib/db/$CFG->dbtype.php"); # defines old upgrades
241 if (file_exists("$CFG->dirroot/lib/db/upgrade.php")) {
242 include_once("$CFG->dirroot/lib/db/upgrade.php"); # defines new upgrades
245 $stradministration = get_string("administration");
247 if ($CFG->version) {
248 if ($version > $CFG->version) { // upgrade
250 /// If the database is not already Unicode then we do not allow upgrading!
251 /// Instead, we print an error telling them to upgrade to 1.7 first. MDL-6857
252 if (empty($CFG->unicodedb)) {
253 print_error('unicodeupgradeerror', 'error', '', $version);
256 $a->oldversion = "$CFG->release ($CFG->version)";
257 $a->newversion = "$release ($version)";
258 $strdatabasechecking = get_string("databasechecking", "", $a);
260 // hide errors from headers in case debug is enabled
261 $origdebug = $CFG->debug;
262 $CFG->debug = DEBUG_MINIMAL;
263 error_reporting($CFG->debug);
265 // logout in case we are upgrading from pre 1.7 version - prevention of weird session problems
266 if ($CFG->version < 2006050600) {
267 require_logout();
270 if (empty($confirmupgrade)) {
271 print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
272 "", "", false, "&nbsp;", "&nbsp;");
274 notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=1', 'index.php');
275 exit;
277 } else if (empty($confirmrelease)){
278 $strcurrentrelease = get_string("currentrelease");
279 print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
280 print_heading("Moodle $release");
281 print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
283 require_once($CFG->libdir.'/environmentlib.php');
284 print_heading(get_string('environment', 'admin'));
285 if (!check_moodle_environment($release, $environment_results, true)) {
286 notice_yesno(get_string('environmenterrorupgrade', 'admin'),
287 'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
288 } else {
289 notify(get_string('environmentok', 'admin'), 'notifysuccess');
291 echo '<form action="index.php"><div>';
292 echo '<input type="hidden" name="confirmupgrade" value="1" />';
293 echo '<input type="hidden" name="confirmrelease" value="1" />';
294 echo '</div>';
295 echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="1" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>';
296 echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>';
297 echo '</form>';
300 print_footer('none');
301 die;
302 } else {
303 $strdatabasesuccess = get_string("databasesuccess");
304 print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
305 "", upgrade_get_javascript(), false, "&nbsp;", "&nbsp;");
307 /// return to original debugging level
308 $CFG->debug = $origdebug;
309 error_reporting($CFG->debug);
310 upgrade_log_start();
312 /// Upgrade current language pack if we can
313 upgrade_language_pack();
315 print_heading($strdatabasechecking);
316 $db->debug=true;
317 /// Launch the old main upgrade (if exists)
318 $status = true;
319 if (function_exists('main_upgrade')) {
320 $status = main_upgrade($CFG->version);
322 /// If succesful and exists launch the new main upgrade (XMLDB), called xmldb_main_upgrade
323 if ($status && function_exists('xmldb_main_upgrade')) {
324 $status = xmldb_main_upgrade($CFG->version);
326 $db->debug=false;
327 /// If successful, continue upgrading roles and setting everything properly
328 if ($status) {
329 if (empty($CFG->rolesactive)) {
330 //ugly hack - upgrade to new groups (from 1.6) : MDL-9217
331 require_once("$CFG->dirroot/group/db/upgrade.php");
332 install_group_db();
333 // Upgrade to the roles system.
334 moodle_install_roles();
335 set_config('rolesactive', 1);
336 } else if (!update_capabilities()) {
337 error('Had trouble upgrading the core capabilities for the Roles System');
339 // update core events
340 events_update_definition();
342 require_once($CFG->libdir.'/statslib.php');
343 if (!stats_upgrade_for_roles_wrapper()) {
344 notify('Couldn\'t upgrade the stats tables to use the new roles system');
346 if (set_config("version", $version)) {
347 remove_dir($CFG->dataroot . '/cache', true); // flush cache
348 notify($strdatabasesuccess, "green");
349 print_continue("upgradesettings.php");
350 print_footer('none');
351 exit;
352 } else {
353 error('Upgrade failed! (Could not update version in config table)');
355 /// Main upgrade not success
356 } else {
357 notify('Main Upgrade failed! See lib/db/upgrade.php');
358 print_continue('index.php?confirmupgrade=1&amp;confirmrelease=1');
359 print_footer('none');
360 die;
362 upgrade_log_finish();
364 } else if ($version < $CFG->version) {
365 upgrade_log_start();
366 notify("WARNING!!! The code you are using is OLDER than the version that made these databases!");
367 upgrade_log_finish();
369 } else {
370 if (!set_config("version", $version)) {
371 error("A problem occurred inserting current version into databases");
375 /// Updated human-readable release version if necessary
377 if ($release <> $CFG->release) { // Update the release version
378 if (!set_config("release", $release)) {
379 error("ERROR: Could not update release version in database!!");
383 /// ugly hack - convert to new groups if upgrading from 1.7; must be reworked
384 require_once("$CFG->dirroot/group/db/upgrade.php");
385 upgrade_group_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
388 /// Find and check all main modules and load them up or upgrade them if necessary
389 /// first old *.php update and then the new upgrade.php script
390 upgrade_activity_modules("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
392 /// Check all questiontype plugins and upgrade if necessary
393 /// first old *.php update and then the new upgrade.php script
394 /// It is important that this is done AFTER the quiz module has been upgraded
395 upgrade_plugins('qtype', 'question/type', "$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
397 /// Upgrade backup/restore system if necessary
398 /// first old *.php update and then the new upgrade.php script
399 require_once("$CFG->dirroot/backup/lib.php");
400 upgrade_backup_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
402 /// Upgrade blocks system if necessary
403 /// first old *.php update and then the new upgrade.php script
404 require_once("$CFG->dirroot/lib/blocklib.php");
405 upgrade_blocks_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
407 /// Check all blocks and load (or upgrade them if necessary)
408 /// first old *.php update and then the new upgrade.php script
409 upgrade_blocks_plugins("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
411 /// Check all enrolment plugins and upgrade if necessary
412 /// first old *.php update and then the new upgrade.php script
413 upgrade_plugins('enrol', 'enrol', "$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
415 /// Check all course formats and upgrade if necessary
416 upgrade_plugins('format','course/format',"$CFG->wwwroot/$CFG->admin/index.php");
418 /// Check for local database customisations
419 /// first old *.php update and then the new upgrade.php script
420 require_once("$CFG->dirroot/lib/locallib.php");
421 upgrade_local_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
423 /// Check for changes to RPC functions
424 require_once($CFG->dirroot.'/admin/mnet/adminlib.php');
425 upgrade_RPC_functions("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
427 /// Upgrade all plugins for gradebook
428 upgrade_plugins('gradeexport', 'grade/export', "$CFG->wwwroot/$CFG->admin/index.php");
429 upgrade_plugins('gradeimport', 'grade/import', "$CFG->wwwroot/$CFG->admin/index.php");
430 upgrade_plugins('gradereport', 'grade/report', "$CFG->wwwroot/$CFG->admin/index.php");
432 /// Check all message output plugins and upgrade if necessary
433 upgrade_plugins('message','message/output',"$CFG->wwwroot/$CFG->admin/index.php");
436 /// just make sure upgrade logging is properly terminated
437 upgrade_log_finish();
439 unset($_SESSION['installautopilot']);
441 /// Set up the blank site - to be customized later at the end of install.
442 if (! $site = get_site()) {
443 // We are about to create the site "course"
444 require_once($CFG->libdir.'/blocklib.php');
446 $newsite = new Object();
447 $newsite->fullname = "";
448 $newsite->shortname = "";
449 $newsite->summary = "";
450 $newsite->newsitems = 3;
451 $newsite->numsections = 0;
452 $newsite->category = 0;
453 $newsite->format = 'site'; // Only for this course
454 $newsite->teacher = get_string("defaultcourseteacher");
455 $newsite->teachers = get_string("defaultcourseteachers");
456 $newsite->student = get_string("defaultcoursestudent");
457 $newsite->students = get_string("defaultcoursestudents");
458 $newsite->timemodified = time();
460 if ($newid = insert_record('course', $newsite)) {
461 // Site created, add blocks for it
462 $page = page_create_object(PAGE_COURSE_VIEW, $newid);
463 blocks_repopulate_page($page); // Return value not checked because you can always edit later
465 $cat = new Object();
466 $cat->name = get_string('miscellaneous');
467 if (insert_record('course_categories', $cat)) {
468 redirect('index.php');
469 } else {
470 error("Serious Error! Could not set up a default course category!");
472 } else {
473 error("Serious Error! Could not set up the site!");
477 // initialise default blocks on admin and site page if needed
478 if (empty($CFG->adminblocks_initialised)) {
479 require_once("$CFG->dirroot/$CFG->admin/pagelib.php");
480 require_once($CFG->libdir.'/blocklib.php');
481 page_map_class(PAGE_ADMIN, 'page_admin');
482 $page = page_create_object(PAGE_ADMIN, 0); // there must be some id number
483 blocks_repopulate_page($page);
485 //add admin_tree block to site if not already present
486 if ($admintree = get_record('block', 'name', 'admin_tree')) {
487 $page = page_create_object(PAGE_COURSE_VIEW, SITEID);
488 blocks_execute_action($page, blocks_get_by_page($page), 'add', (int)$admintree->id, false, false);
489 if ($admintreeinstance = get_record('block_instance', 'pagetype', $page->type, 'pageid', SITEID, 'blockid', $admintree->id)) {
490 blocks_execute_action($page, blocks_get_by_page($page), 'moveleft', $admintreeinstance, false, false);
494 set_config('adminblocks_initialised', 1);
497 /// Define the unique site ID code if it isn't already
498 if (empty($CFG->siteidentifier)) { // Unique site identification code
499 set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']);
502 /// Check if the guest user exists. If not, create one.
503 if (! record_exists("user", "username", "guest")) {
504 if (! $guest = create_guest_record()) {
505 notify("Could not create guest user record !!!");
510 /// Set up the admin user
511 if (empty($CFG->rolesactive)) {
512 create_admin_user();
515 /// Check for valid admin user
516 require_login();
518 $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
520 require_capability('moodle/site:config', $context);
522 /// check that site is properly customized
523 if (empty($site->shortname) or empty($site->shortname)) {
524 redirect('settings.php?section=frontpagesettings&amp;return=site');
527 /// Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
529 if (!empty($id)) {
530 if ($id == $CFG->siteidentifier) {
531 set_config('registered', time());
535 $adminroot = admin_get_root();
537 /// Check if there are any new admin settings which have still yet to be set
538 if( any_new_admin_settings( $adminroot ) ){
539 redirect('upgradesettings.php');
542 /// Everything should now be set up, and the user is an admin
544 /// Print default admin page with notifications.
546 admin_externalpage_setup('adminnotifications');
547 admin_externalpage_print_header();
549 /// Deprecated database! Warning!!
550 if (!empty($CFG->migrated_to_new_db)) {
551 print_box(print_string('dbmigrationdeprecateddb', 'admin'), 'generalbox adminwarning');
554 /// Check for any special upgrades that might need to be run
555 if (!empty($CFG->upgrade)) {
556 print_box(get_string("upgrade$CFG->upgrade", "admin", "$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"));
559 if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) {
560 print_box(get_string('globalsquoteswarning', 'admin'), 'generalbox adminwarning');
563 if (is_dataroot_insecure()) {
564 print_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
567 /// If no recently cron run
568 $lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
569 if (time() - $lastcron > 3600 * 24) {
570 $strinstallation = get_string('installation', 'install');
571 $helpbutton = helpbutton('install', $strinstallation, 'moodle', true, false, '', true);
572 print_box(get_string('cronwarning', 'admin')."&nbsp;".$helpbutton, 'generalbox adminwarning');
575 /// Print multilang upgrade notice if needed
576 if (empty($CFG->filter_multilang_converted)) {
577 print_box(get_string('multilangupgradenotice', 'admin'), 'generalbox adminwarning');
580 /// Alert if we are currently in maintenance mode
581 if (file_exists($CFG->dataroot.'/1/maintenance.html')) {
582 print_box(get_string('sitemaintenancewarning', 'admin'), 'generalbox adminwarning');
586 /// Print slightly annoying registration button every six months ;-)
587 /// You can set the "registered" variable to something far in the future
588 /// if you really want to prevent this. eg 9999999999
589 if (!isset($CFG->registered) || $CFG->registered < (time() - 3600*24*30*6)) {
590 $options = array();
591 $options['sesskey'] = $USER->sesskey;
592 print_box_start('generalbox adminwarning');
593 print_string('pleaseregister', 'admin');
594 print_single_button('register.php', $options, get_string('registration'));
595 print_box_end();
596 $registrationbuttonshown = true;
599 //////////////////////////////////////////////////////////////////////////////////////////////////
600 //// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
601 $copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
602 '<a href="http://docs.moodle.org/en/Release">'.$CFG->release.'</a> ('.$CFG->version.')<br />'.
603 'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
604 'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
605 '<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
606 print_box($copyrighttext, 'copyright');
607 //////////////////////////////////////////////////////////////////////////////////////////////////
610 if (empty($registrationbuttonshown)) {
611 $options = array();
612 $options['sesskey'] = $USER->sesskey;
613 print_single_button('register.php', $options, get_string('registration'));
617 if (optional_param('dbmigrate')) { // ??? Is this actually used?
618 print_box_start();
619 require_once($CFG->dirroot.'/'.$CFG->admin.'/utfdbmigrate.php');
620 db_migrate2utf8();
621 print_box_end();
625 admin_externalpage_print_footer();