require_once get_path('incRepositorySys') . '/lib/language.lib.php';
require_once get_path('incRepositorySys') . '/lib/right/right_profile.lib.php';
if (claro_debug_mode()) {
    require_once get_path('incRepositorySys') . '/lib/debug.lib.inc.php';
}
/*----------------------------------------------------------------------
  Unquote GET, POST AND COOKIES if magic quote gpc is enabled in php.ini
  ----------------------------------------------------------------------*/
claro_unquote_gpc();
/*----------------------------------------------------------------------
  Connect to the server database and select the main claroline DB
  ----------------------------------------------------------------------*/
FromKernel::uses('core/claroline.lib');
try {
    // Initialize the main database connection
    Claroline::initMainDatabase();
} catch (Exception $e) {
    if (claro_debug_mode()) {
        $details = '<pre>' . var_export($e->__toString(), true) . '</pre>';
    } else {
        $details = '';
    }
    die('<center>' . $e->getMessage() . $details . '</center>');
}
/*----------------------------------------------------------------------
  Include the local (contextual) parameters of this course or section
  ----------------------------------------------------------------------*/
require get_path('incRepositorySys') . '/claro_init_local.inc.php';
/*----------------------------------------------------------------------
  Load language translation and locale settings
  ----------------------------------------------------------------------*/