Add setting "allow_lp_chamilo_export" to export LP with course builder

BT#10885
pull/2500/head
jmontoyaa 8 years ago
parent e8472ca409
commit fe0aaebfea
  1. 3
      main/install/configuration.dist.php
  2. 3
      main/lp/lp_controller.php
  3. 3
      main/lp/lp_list.php

@ -819,6 +819,9 @@ INSERT INTO settings_current(variable, subkey, type, category, selected_value, t
//ALTER TABLE c_group_info ADD document_access INT DEFAULT 0 NOT NULL; //ALTER TABLE c_group_info ADD document_access INT DEFAULT 0 NOT NULL;
//$_configuration['group_document_access'] = false; //$_configuration['group_document_access'] = false;
// Allow LP export to chamilo format (CourseBackup)
//$_configuration['allow_lp_chamilo_export'] = false;
// ------ Custom DB changes (keep this at the end) // ------ Custom DB changes (keep this at the end)
// Add user activation by confirmation email // Add user activation by confirmation email
// This option prevents the new user to login in the platform if your account is not confirmed via email // This option prevents the new user to login in the platform if your account is not confirmed via email

@ -860,7 +860,8 @@ switch ($action) {
} }
break; break;
case 'export_to_course_build': case 'export_to_course_build':
if (api_is_allowed_to_edit()) { $allowExport = api_get_configuration_value('allow_lp_chamilo_export');
if (api_is_allowed_to_edit() && $allowExport) {
if (!$lp_found) { if (!$lp_found) {
require 'lp_list.php'; require 'lp_list.php';
} else { } else {

@ -403,6 +403,7 @@ foreach ($categories as $item) {
$actionSeriousGame = null; $actionSeriousGame = null;
$actionUpdateScormFile = ''; $actionUpdateScormFile = '';
$actionExportToCourseBuild = ''; $actionExportToCourseBuild = '';
$allowChamiloExport = api_get_configuration_value('allow_lp_chamilo_export');
if ($is_allowed_to_edit) { if ($is_allowed_to_edit) {
// EDIT LP // EDIT LP
@ -795,6 +796,7 @@ foreach ($categories as $item) {
); );
} }
if ($allowChamiloExport) {
$actionExportToCourseBuild = Display::url( $actionExportToCourseBuild = Display::url(
Display::return_icon( Display::return_icon(
'backup.png', 'backup.png',
@ -803,6 +805,7 @@ foreach ($categories as $item) {
api_get_self().'?'.api_get_cidreq() api_get_self().'?'.api_get_cidreq()
."&action=export_to_course_build&lp_id=$id" ."&action=export_to_course_build&lp_id=$id"
); );
}
if ($is_allowed_to_edit) { if ($is_allowed_to_edit) {
$start_time = $start_time; $start_time = $start_time;

Loading…
Cancel
Save