Skip to content

Commit

Permalink
MDL-20591 IMS-CC import: Integration committed. Next weeklies will in…
Browse files Browse the repository at this point in the history
…clude it. Merged from 19_STABLE
  • Loading branch information
stronk7 committed Oct 26, 2009
1 parent 3d97797 commit 79a7bcf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions admin/settings/development.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
$item->set_updatedcallback('reset_text_filters_cache');
$temp->add($item);
$temp->add(new admin_setting_configcheckbox('experimentalsplitrestore', get_string('experimentalsplitrestore', 'admin'), get_string('configexperimentalsplitrestore', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0));
$temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', get_string('enablesafebrowserintegration', 'admin'), get_string('configenablesafebrowserintegration', 'admin'), 0));

$ADMIN->add('experimental', $temp);
Expand Down
10 changes: 10 additions & 0 deletions backup/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -7875,6 +7875,16 @@ function restore_precheck($id,$file,&$errorstr,$noredirect=false) {
}
}

// If experimental option is enabled (enableimsccimport)
// check for Common Cartridge packages and convert to Moodle format
if ($status && isset($CFG->enableimsccimport) && $CFG->enableimsccimport == 1) {
require_once($CFG->dirroot. '/backup/cc/restore_cc.php');
if (!defined('RESTORE_SILENTLY')) {
echo "<li>".get_string('checkingforimscc', 'imscc').'</li>';
}
$status = cc_convert($CFG->dataroot. DIRECTORY_SEPARATOR .'temp'. DIRECTORY_SEPARATOR . 'backup'. DIRECTORY_SEPARATOR . $backup_unique_code);
}

//Check for Blackboard backups and convert
if ($status){
require_once("$CFG->dirroot/backup/bb/restore_bb.php");
Expand Down

0 comments on commit 79a7bcf

Please sign in to comment.