ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilScormExportUtil Class Reference

Utility class for scorm export. More...

+ Collaboration diagram for ilScormExportUtil:

Static Public Member Functions

static exportContentCSS ($a_slm_object, $a_target_dir)
 Export lm content css to a directory.

Detailed Description

Utility class for scorm export.

Author
Alex Kiling alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilScormExportUtil.php.

Member Function Documentation

static ilScormExportUtil::exportContentCSS (   $a_slm_object,
  $a_target_dir 
)
static

Export lm content css to a directory.

Definition at line 16 of file class.ilScormExportUtil.php.

References ilObjStyleSheet\getContentStylePath(), and ilUtil\makeDir().

Referenced by ilObjSCORM2004LearningModule\exportScorm().

{
ilUtil::makeDir($a_target_dir."/css");
ilUtil::makeDir($a_target_dir."/css/images");
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$active_css = ilObjStyleSheet::getContentStylePath($a_slm_object->getStyleSheetId());
$active_css = split(@'\?', $active_css, 2);
$css = fread(fopen($active_css[0],'r'), filesize($active_css[0]));
preg_match_all("/url\(([^\)]*)\)/", $css, $files);
$currdir = getcwd();
chdir(dirname($active_css[0]));
foreach (array_unique($files[1]) as $fileref)
{
if (is_file($fileref))
{
copy($fileref, $a_target_dir."/css/images/".basename($fileref));
}
$css = str_replace($fileref,"images/".basename($fileref),$css);
}
chdir($currdir);
fwrite(fopen($a_target_dir.'/css/style.css','w'), $css);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: