]> git.mjollnir.org Git - moodle.git/commitdiff
moved call to upgrade stats until after all the roles stuff has been set up
authormjollnir_ <mjollnir_>
Fri, 22 Sep 2006 10:00:34 +0000 (10:00 +0000)
committermjollnir_ <mjollnir_>
Fri, 22 Sep 2006 10:00:34 +0000 (10:00 +0000)
admin/index.php

index bd924b86919470b683fde6d23118b807fce83438..4f472000c9845b3b47c57c57dfb5e18e6b133c63 100644 (file)
                         // Upgrade to the roles system.
                         moodle_install_roles();
                     }
-                    require_once($CFG->libdir.'/statslib.php');
-                    if (!stats_upgrade_for_roles_wrapper()) {
-                        notify('Couldn\'t upgrade the stats tables to use the new roles system');
-                    }
                     if (!update_capabilities()) {
                         error('Had trouble upgrading the core capabilities for the Roles System');
                     } else {
                         set_config('rolesactive', 1);
                     }
+                    require_once($CFG->libdir.'/statslib.php');
+                    if (!stats_upgrade_for_roles_wrapper()) {
+                        notify('Couldn\'t upgrade the stats tables to use the new roles system');
+                    }
                     if (set_config("version", $version)) {
                         remove_dir($CFG->dataroot . '/cache', true); // flush cache
                         notify($strdatabasesuccess, "green");