Skip to content

Commit

Permalink
Maintenance: CommonCartridge: Add configuration setting 'commoncartri…
Browse files Browse the repository at this point in the history
…dge_path_token' to allow for the previously recommended special path token when exporting to Common Cartridge packages - refs BT#21709
  • Loading branch information
ywarnier committed Jun 26, 2024
1 parent 1ace981 commit ef1e71f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main/common_cartridge/export/src/utils/CcHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ public static function processLinkedFiles(
$courseDir = $internalCourseDocumentsPath = null;
$courseInfo = api_get_course_info();
$replaceprefix = '$1EdTech-CC-FILEBASE$';
$tokenSyntax = api_get_configuration_value('commoncartridge_path_token');
if (!empty($tokenSyntax)) {
$replaceprefix = $tokenSyntax;
}
if (!empty($courseInfo)) {
$courseDir = $courseInfo['directory'];
$internalCourseDocumentsPath = '/courses/'.$courseDir.'/document';
Expand Down
6 changes: 6 additions & 0 deletions main/install/configuration.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2561,3 +2561,9 @@

// Define the default time in seconds to be registered if the user does logout from a course and there is no recent entry in track_e_course_access.
//$_configuration['tracking_default_course_extra_time_on_logout'] = 600;

// Define a special path token for the Common Cartridge export content.
// Due to changes in naming by the responsible organization, the Chamilo default
// is '$1EdTech-CC-FILEBASE$' (the latest), but previous versions of the standard
// recommended '$IMS-CC-FILEBASE$', so you might want to use that for greater compatibility.
//$_configuration['commoncartridge_path_token'] = '$IMS-CC-FILEBASE$';

0 comments on commit ef1e71f

Please sign in to comment.