if (!empty($test_zipped_files) && in_array($file_path, $test_zipped_files)){
$content_files .= str_replace('{FILE}', $file, $ims_template_xml['file']);
} else {
- $content_files .= str_replace('{FILE}', $content['content_path'] . $file, $ims_template_xml['file']);
+ if (preg_match('/^http[s]?\:/', $file) == 1){
+ $content_files .= str_replace('{FILE}', $file, $ims_template_xml['xml']);
+ } else {
+ $content_files .= str_replace('{FILE}', $content['content_path'] . $file, $ims_template_xml['file']);
+ }
}
}
/* check if this file is one of the test xml file, if so, we need to add the dependency
}
}
+ /******************************
+ * http://www.atutor.ca/atutor/mantis/view.php?id=4383
+ */
+ $my_files = array();
+
/******************************/
//add it to the resources section if it hasn't been added.
//Weblinks have been added.
array($content['content_id'], $content['content_path'], $content_files, $forums_dependency),
$ims_template_xml['resource']);
}
-
for ($i=0; $i<$depth; $i++) {
$link .= $space;
$string .= '</li>';
}
- }
+ }
}
if(isset($fileinfo['file']) && is_array($fileinfo['file']) && !empty($fileinfo['file'])){
foreach($fileinfo['file'] as $fn){
if (!in_array(realpath($import_path.$fn), $filearray)){
- $filearray[] = realpath($import_path. $fn);
+ //if url, skip
+ if (preg_match('/^http[s]?\:/', $fn) == 0){
+ $filearray[] = realpath($import_path. $fn);
+ }
}
}
}