function opigno_lms_install in Opigno LMS 7
Same name and namespace in other branches
- 8.2 opigno_lms.install \opigno_lms_install()
- 8 opigno_lms.install \opigno_lms_install()
- 3.x opigno_lms.install \opigno_lms_install()
Implements hook_install().
File
- ./
opigno_lms.install, line 10 - Install, update and uninstall functions for the Opigno LMS installation profile.
Code
function opigno_lms_install() {
// Set the default theme.
theme_enable(array(
'platon',
));
variable_set('theme_default', 'platon');
// Set the default settings for the theme.
$default_theme_settings = variable_get('theme_platon_settings', array());
$default_theme_settings['platon_menu_source'] = 'main-menu';
$default_theme_settings['platon_use_home_page_markup'] = 1;
$default_theme_settings[1]['platon_home_page_markup'] = array(
'format' => 'html',
'value' => st("<h1>Welcome to your new Opigno platform</h1><p>You may change this front page by logging in and going to <a href='?q=user&destination=admin/appearance/settings/platon'>Administration > Appearance > Manage site display</a>.</p>"),
'background' => '../../../profiles/opigno_lms/themes/platon/img/homepage-background-1.jpg',
);
$default_theme_settings[2]['platon_home_page_markup'] = array(
'format' => 'html',
'value' => st("<h1>Welcome to your new Opigno platform</h1><p>You may change this front page by logging in and going to <a href='?q=user&destination=admin/appearance/settings/platon'>Administration > Appearance > Manage site display</a>.</p>"),
'background' => '../../../profiles/opigno_lms/themes/platon/img/homepage-background-2.jpg',
);
$default_theme_settings[3]['platon_home_page_markup'] = array(
'format' => 'html',
'value' => st("<h1>Welcome to your new Opigno platform</h1><p>You may change this front page by logging in and going to <a href='?q=user&destination=admin/appearance/settings/platon'>Administration > Appearance > Manage site display</a>.</p>"),
'background' => '../../../profiles/opigno_lms/themes/platon/img/homepage-background-3.jpg',
);
$default_theme_settings['platon_menu_show_for_anonymous'] = 1;
variable_set('theme_platon_settings', $default_theme_settings);
// Deactivate error display.
variable_set('error_level', ERROR_REPORTING_HIDE);
// Set the DOMPDF library for the certificates.
variable_set('print_pdf_pdf_tool', 'print_pdf_dompdf|profiles/opigno_lms/libraries/dompdf/dompdf_config.inc.php');
// Set login redirect.
variable_set('login_redirect_status', 1);
variable_get('login_redirect_parameter_name', 'dashboard');
// Make class certifiable by default.
variable_set('certificate_certifiable_class', 1);
// Set front page.
variable_set('site_frontpage', 'dashboard');
// Use the jQuery Count Down library for Quiz.
variable_set('quiz_has_timer', 1);
// Enhance module filter.
variable_set('module_filter_dynamic_save_position', 1);
// Set 404 redirect
variable_set('site_404', 'r4032login');
// Make sure the Opigno Simple UI cleans the Quiz module.
module_load_include('inc', 'opigno_simple_ui', 'includes/opigno_simple_ui.quiz');
if (function_exists('opigno_simple_ui_update_quiz_labels')) {
opigno_simple_ui_update_quiz_labels();
}
// Enable blocks.
_opigno_lms_install_enable_blocks();
// Set default user settings.
_opigno_lms_install_user_settings();
// Set default OG settings.
_opigno_lms_install_og_settings();
// Create default entries in the menu.
_opigno_lms_install_menu();
// Enable specific content type permissions for anonymous_users
_opigno_lms_install_specific_content_access();
// Enable image styles
_opigno_lms_install_enable_image_styles();
// Rebuild permissions. Don't use the batch process, we're already in one.
node_access_rebuild(FALSE);
}