ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilCOPageHTMLExport.php
Go to the documentation of this file.
1 <?php
2 
20 
27 {
28  protected \ILIAS\MediaObjects\MediaObjectManager $media_manager;
29  protected \ILIAS\Style\Content\InternalDomainService $content_style;
30  protected \ILIAS\COPage\Xsl\XslManager $xsl;
31  protected string $css_dir = "";
32  protected string $js_yahoo_dir = "";
33  protected string $js_dir = "";
34  protected string $media_service_dir = "";
35  protected string $services_dir = "";
36  protected string $content_style_img_dir = "";
37  protected string $content_style_dir = "";
38  protected string $tex_dir = "";
39  protected string $files_dir = "";
40  protected string $mobs_dir = "";
41  protected array $mobs = [];
42  protected array $glossary_terms = [];
43  protected array $files = [];
44  protected array $files_direct = [];
45  protected array $int_links = [];
46  protected array $q_ids = [];
47  protected string $exp_dir = "";
48  protected int $content_style_id = 0;
49  protected ilObjUser $user;
50  protected ilLogger $log;
51  protected \ILIAS\GlobalScreen\Services $global_screen;
52  protected \ILIAS\Skill\Service\SkillTreeService $skill_tree_service;
53  protected \ILIAS\Skill\Service\SkillPersonalService $skill_personal_service;
54  protected \ILIAS\COPage\PageLinker $page_linker;
55  protected int $ref_id;
56 
57  public function __construct(
58  string $a_exp_dir,
59  ?\ILIAS\COPage\PageLinker $linker = null,
60  int $ref_id = 0,
61  protected ?ExportCollector $export_collector = null
62  ) {
63  global $DIC;
64  $this->log = ilLoggerFactory::getLogger('copg');
65  $this->user = $DIC->user();
66  $this->global_screen = $DIC->globalScreen();
67  $this->skill_tree_service = $DIC->skills()->tree();
68  $this->skill_personal_service = $DIC->skills()->personal();
69  $this->page_linker = is_null($linker)
70  ? new ilPageLinker("", true)
71  : $linker;
72  $this->ref_id = $ref_id;
73 
74  $this->exp_dir = $a_exp_dir;
75  $this->mobs_dir = $a_exp_dir . "/mobs";
76  $this->files_dir = $a_exp_dir . "/files";
77  $this->tex_dir = $a_exp_dir . "/teximg";
78  $this->content_style_dir = $a_exp_dir . "/content_style";
79  $this->content_style_img_dir = $a_exp_dir . "/content_style/images";
80 
81  $this->services_dir = $a_exp_dir . "/components/ILIAS";
82  $this->media_service_dir = $this->services_dir . "/MediaObjects";
83 
84  $this->js_dir = $a_exp_dir . '/js';
85  $this->js_yahoo_dir = $a_exp_dir . '/js/yahoo';
86  $this->css_dir = $a_exp_dir . '/css';
87  $this->xsl = $DIC->copage()->internal()->domain()->xsl();
88  $this->content_style = $DIC->contentStyle()->internal()->domain();
89  $this->media_manager = $DIC->mediaObjects()->internal()->domain()->mediaObject();
90  }
91 
92  public function setContentStyleId(int $a_val): void
93  {
94  $this->content_style_id = $a_val;
95  }
96 
97  public function getContentStyleId(): int
98  {
100  }
101 
102  public function createDirectories(): void
103  {
104  ilFileUtils::makeDir($this->mobs_dir);
105  ilFileUtils::makeDir($this->files_dir);
106  ilFileUtils::makeDir($this->tex_dir);
107  ilFileUtils::makeDir($this->content_style_dir);
108  ilFileUtils::makeDir($this->content_style_img_dir);
109  ilFileUtils::makeDir($this->services_dir);
110  ilFileUtils::makeDir($this->media_service_dir);
111 
112  ilFileUtils::makeDirParents($this->js_dir);
113  ilFileUtils::makeDirParents($this->js_yahoo_dir);
114  ilFileUtils::makeDirParents($this->css_dir);
115  ilFileUtils::makeDirParents($this->css_dir . "/yahoo");
116  }
117 
124  public function exportStyles(): void
125  {
126  $this->log->debug("export styles");
127 
128  // export content style sheet
129  if ($this->getContentStyleId() < 1) { // basic style
130  if (is_null($this->export_collector)) {
133  $this->exp_dir . "/" . ilObjStyleSheet::getBasicImageDir()
134  );
135  ilFileUtils::makeDirParents($this->exp_dir . "/components/ILIAS/COPage/css");
136  copy(
137  "../components/ILIAS/COPage/resources/content.css",
138  $this->exp_dir . "/components/ILIAS/COPage/css/content.css"
139  );
140  } else {
141  $this->export_collector->addDirectory(
143  "/basic_style/images"
144  );
145  $this->export_collector->addFile(
146  "../components/ILIAS/COPage/css/content.css",
148  );
149  }
150  } else {
151  $style = new ilObjStyleSheet($this->getContentStyleId());
152  if (is_null($this->export_collector)) {
153  $style->copyImagesToDir($this->exp_dir . "/" . $style->getImagesDirectory());
154  $this->exportResourceFile(
155  $this->exp_dir,
157  );
158  } else {
159  $res_id = $this->content_style->style($this->getContentStyleId())->getResourceIdentification();
160  if ($res_id) {
161  $this->export_collector->addContainerDirectory(
162  $res_id->serialize(),
163  "",
164  "content_style"
165  );
166  }
167  }
168  }
169 
170  // export syntax highlighting style
171  $syn_stylesheet = ilObjStyleSheet::getSyntaxStylePath();
172  $this->exportResourceFile($this->exp_dir, $syn_stylesheet);
173 
174  // export print style
175  $print_stylesheet = ilObjStyleSheet::getContentPrintStyle();
176  $this->exportResourceFile($this->exp_dir, $print_stylesheet);
177  }
178 
184  public function exportSupportScripts(): void
185  {
186  $this->log->debug("export scripts");
187 
188  $collector = new \ILIAS\COPage\ResourcesCollector(ilPageObjectGUI::OFFLINE);
189 
190  foreach ($collector->getJavascriptFiles() as $js) {
191  $this->exportResourceFile($this->exp_dir, $js);
192  }
193 
194  foreach ($collector->getCssFiles() as $css) {
195  $this->exportResourceFile($this->exp_dir, $css);
196  }
197  }
198 
199  protected function exportResourceFile(
200  string $target_dir,
201  string $file
202  ): void {
203  if (is_int(strpos($file, "?"))) {
204  $file = substr($file, 0, strpos($file, "?"));
205  }
206  if (is_file($file)) {
207  if (is_null($this->export_collector)) {
208  $dir = dirname($file);
209  ilFileUtils::makeDirParents($target_dir . "/" . $dir);
210  if (!is_file($target_dir . "/" . $file)) {
211  copy($file, $target_dir . "/" . $file);
212  }
213  } else {
214  $this->export_collector->addFile($file, $file);
215  }
216  }
217  }
218 
219  public function getPreparedMainTemplate(
222  global $DIC;
223  $this->log->debug("get main template");
224 
225 
226  $resource_collector = new \ILIAS\COPage\ResourcesCollector(ilPageObjectGUI::OFFLINE);
227  $resource_injector = new \ILIAS\COPage\ResourcesInjector($resource_collector);
228 
229  if (!is_null($a_tpl)) {
230  $tpl = $a_tpl;
231  } else {
232  // template workaround: reset of template
233  $tpl = new ilGlobalPageTemplate($DIC->globalScreen(), $DIC->ui(), $DIC->http());
234  }
235 
236  // scripts needed
237  /* @todo check
238  $scripts = [];
239  $scripts = array_merge($scripts, ilPlayerUtil::getJsFilePaths());
240 
241  $mathJaxSetting = new ilSetting("MathJax");
242  $use_mathjax = $mathJaxSetting->get("enable");
243  if ($use_mathjax) {
244  $scripts[] = $mathJaxSetting->get("path_to_mathjax");
245  }
246  */
247 
248  $tpl->addCss(\ilUtil::getStyleSheetLocation());
249  // important, we pass 0 here, since the export will use the standard directory
251  $tpl->addCss(ilObjStyleSheet::getSyntaxStylePath());
252 
253  $resource_injector->inject($tpl);
254 
255  return $tpl;
256  }
257 
261  public function collectPageElements(
262  string $a_type,
263  int $a_id,
264  string $lang = ""
265  ): void {
266  $this->log->debug("collect page elements");
267 
268  // collect all dependent pages (only one level deep)
269  $pages[] = [
270  "type" => $a_type,
271  "id" => $a_id
272  ];
273 
274  // ... content includes
275  $pcs = ilPageContentUsage::getUsagesOfPage($a_id, $a_type, 0, false, $lang);
276  foreach ($pcs as $pc) {
277  // content includes
278  if ($pc["type"] == "incl") {
279  $pages[] = [
280  "type" => "mep:pg",
281  "id" => $pc["id"]
282  ];
283  }
284  }
285 
286  // ... internal links
287  $pg_links = \ilInternalLink::_getTargetsOfSource($a_type, $a_id, $lang);
288  $this->int_links = array_merge($this->int_links, $pg_links);
289  $this->glossary_terms = [];
290 
291  // ... glossary pages of internal links
292  foreach ($this->int_links as $int_link) {
293  if ($int_link["type"] == "git") {
294  $this->glossary_terms[] = $int_link["id"];
295  // store linked/embedded media objects of glosssary term
296  $pages[] = [
297  "type" => "term:pg",
298  "id" => $int_link["id"]
299  ];
300  }
301  }
302 
303  // resources of pages
304  foreach ($pages as $page) {
305  $page_id = $page["id"];
306  $page_type = $page["type"];
307 
308  // collect media objects
309  $pg_mobs = ilObjMediaObject::_getMobsOfObject($page_type, $page_id, 0, $lang);
310  foreach ($pg_mobs as $pg_mob) {
311  $this->mobs[$pg_mob] = $pg_mob;
312  $this->log->debug("HTML Export: Add media object $pg_mob (" . \ilObject::_lookupTitle($pg_mob) . ") " .
313  " due to page $page_id, $page_type ).");
314  }
315 
316  // collect all files
317  $files = ilObjFile::_getFilesOfObject($page_type, $page_id, 0, $lang);
318  foreach ($files as $f) {
319  $this->files[$f] = $f;
320  }
321 
322  // collect all questions
323  $q_ids = \ilPCQuestion::_getQuestionIdsForPage($a_type, $a_id, $lang);
324  foreach ($q_ids as $q_id) {
325  $this->q_ids[$q_id] = $q_id;
326  }
327  }
328 
329  // collect page content items
330  $skill_tree = $ws_tree = null;
331 
332  // skills
333  foreach ($pcs as $pc) {
334  if ($pc["type"] == "skmg") {
335  $skill_id = $pc["id"];
336 
337  // trying to find user id
338  $user_id = null;
339  switch ($a_type) {
340  case "prtf:pg":
341  $page = new ilPortfolioPage($a_id);
342  $user_id = $page->getCreationUserId();
343  break;
344 
345  default:
346  // :TODO:
347  break;
348  }
349 
350  if ($user_id) {
351  // we only need 1 instance each
352  if (!$skill_tree) {
353  $skill_tree = $this->skill_tree_service->getGlobalSkillTree();
354 
355  $ws_tree = new ilWorkspaceTree($user_id);
356  }
357 
358  // walk skill tree
359  $skill_id = (int) $skill_id;
360  $vtree = $this->skill_tree_service->getVirtualSkillTreeForNodeId($skill_id);
361  $tref_id = 0;
362  if (ilSkillTreeNode::_lookupType($skill_id) == "sktr") {
363  $tref_id = $skill_id;
364  $skill_id = ilSkillTemplateReference::_lookupTemplateId($skill_id);
365  }
366  $b_skills = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
367 
368  foreach ($b_skills as $bs) {
369  $skill = ilSkillTreeNodeFactory::getInstance($bs["skill_id"]);
370  $level_data = $skill->getLevelData();
371  foreach ($level_data as $k => $v) {
372  // get assigned materials from personal skill
373  $mat = $this->skill_personal_service->getAssignedMaterials($user_id, $bs["tref_id"], $v["id"]);
374  if (count($mat)) {
375  foreach ($mat as $item) {
376  $wsp_id = $item->getWorkspaceId();
377  $obj_id = $ws_tree->lookupObjectId($wsp_id);
378 
379  // all possible material types for now
380  switch (ilObject::_lookupType($obj_id)) {
381  case "file":
382  $this->files[$obj_id] = $obj_id;
383  break;
384 
385  case "tstv":
386  $obj = new ilObjTestVerification($obj_id, false);
387  $this->files_direct[$obj_id] = array($obj->getFilePath(),
388  $obj->getOfflineFilename());
389  break;
390 
391  case "excv":
392  $obj = new ilObjExerciseVerification($obj_id, false);
393  $this->files_direct[$obj_id] = array($obj->getFilePath(),
394  $obj->getOfflineFilename());
395  break;
396 
397  case "crsv":
398  $obj = new ilObjCourseVerification($obj_id, false);
399  $this->files_direct[$obj_id] = array($obj->getFilePath(),
400  $obj->getOfflineFilename());
401  break;
402 
403  case "cmxv":
404  $obj = new ilObjCmiXapiVerification($obj_id, false);
405  $this->files_direct[$obj_id] = array($obj->getFilePath(),
406  $obj->getOfflineFilename());
407  break;
408 
409  case "ltiv":
410  $obj = new ilObjLTIConsumerVerification($obj_id, false);
411  $this->files_direct[$obj_id] = array($obj->getFilePath(),
412  $obj->getOfflineFilename());
413  break;
414 
415  case "scov":
416  $obj = new ilObjSCORMVerification($obj_id, false);
417  $this->files_direct[$obj_id] = array($obj->getFilePath(),
418  $obj->getOfflineFilename());
419  break;
420  }
421  }
422  }
423  }
424  }
425  }
426  }
427  }
428  }
429 
433  public function exportPageElements(
434  ?callable $a_update_callback = null
435  ): void {
436  $this->log->debug("export page elements");
437 
438  $total = count($this->mobs) + count($this->files) + count($this->files_direct);
439  $cnt = 0;
440  // export all media objects
441  $linked_mobs = array();
442  foreach ($this->mobs as $mob) {
443  if (ilObject::_exists($mob) && ilObject::_lookupType($mob) == "mob") {
444  $this->exportHTMLMOB($mob, $linked_mobs);
445  }
446  if (is_callable($a_update_callback)) {
447  $cnt++;
448  $a_update_callback($total, $cnt);
449  }
450  }
451  $linked_mobs2 = array(); // mobs linked in link areas
452  foreach ($linked_mobs as $mob) {
453  if (ilObject::_exists($mob)) {
454  $this->exportHTMLMOB($mob, $linked_mobs2);
455  }
456  }
457 
458  // export all file objects
459  foreach ($this->files as $file) {
460  $this->exportHTMLFile($file);
461  if (is_callable($a_update_callback)) {
462  $cnt++;
463  $a_update_callback($total, $cnt);
464  }
465  }
466 
467  // export all files (which are not objects
468  foreach ($this->files_direct as $file_id => $attr) {
469  $this->exportHTMLFileDirect($file_id, $attr[0], $attr[1]);
470  if (is_callable($a_update_callback)) {
471  $cnt++;
472  $a_update_callback($total, $cnt);
473  }
474  }
475 
476  $this->exportQuestionFiles();
477 
478  // export all glossary terms
479  $this->exportHTMLGlossaryTerms();
480  }
481 
485  protected function initResourceTemplate(
486  string $template_file
488  $this->global_screen->layout()->meta()->reset();
489  $tpl = new ilGlobalTemplate($template_file, true, true, "components/ILIAS/COPage");
490  $this->getPreparedMainTemplate($tpl);
491  $tpl->addCss(\ilUtil::getStyleSheetLocation());
493  $tpl->addCss(ilObjStyleSheet::getSyntaxStylePath());
494  return $tpl;
495  }
496 
500  public function exportHTMLMOB(
501  int $a_mob_id,
502  array &$a_linked_mobs
503  ): void {
504  $this->log->debug("export html mobs");
505 
506  if (is_null($this->export_collector)) {
507  $source_dir = ilFileUtils::getWebspaceDir() . "/mobs/mm_" . $a_mob_id;
508  if (is_dir($source_dir)) {
509  ilFileUtils::makeDir($this->mobs_dir . "/mm_" . $a_mob_id);
510  ilFileUtils::rCopy($source_dir, $this->mobs_dir . "/mm_" . $a_mob_id);
511  }
512  } else {
513  $mob_res_id = $this->media_manager->getContainerResourceId($a_mob_id);
514  if ($mob_res_id) {
515  $this->export_collector->addContainerDirectory(
516  $mob_res_id->serialize(),
517  "",
518  "/mobs/mm_" . $a_mob_id,
519  );
520  }
521  }
522 
523  $mob_obj = new ilObjMediaObject($a_mob_id);
524 
525  $tpl = $this->initResourceTemplate("tpl.fullscreen.html");
526  $med_links = ilMediaItem::_getMapAreasIntLinks($a_mob_id);
527  $link_xml = $this->page_linker->getLinkXML($med_links);
528 
529  $params = [
530  "mode" => "media",
531  'enlarge_path' => ilUtil::getImagePath("media/enlarge.svg", false, "output", true),
532  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
533  'fullscreen_link' => $this->page_linker->getFullScreenLink()
534  ];
535  if ($this->ref_id > 0) {
536  $params["ref_id"] = $this->ref_id;
537  $params["link_params"] = "ref_id=" . $this->ref_id;
538  }
539 
540  $tpl->setVariable("MEDIA_CONTENT", $this->renderMob($mob_obj, $link_xml, $params));
541  $html = $tpl->printToString();
542  if (is_null($this->export_collector)) {
543  $file = $this->exp_dir . "/media_" . $a_mob_id . ".html";
544  $fp = fopen($file, "w+");
545  fwrite($fp, $html);
546  fclose($fp);
547  unset($fp);
548  } else {
549  $this->export_collector->addString($html, "/media_" . $a_mob_id . ".html");
550  }
551 
552  if ($mob_obj->hasFullscreenItem()) {
553  $tpl = $this->initResourceTemplate("tpl.fullscreen.html");
554  $params["mode"] = "fullscreen";
555  $tpl->setVariable("MEDIA_CONTENT", $this->renderMob($mob_obj, $link_xml, $params));
556  $html = $tpl->printToString();
557  if (is_null($this->export_collector)) {
558  $file = $this->exp_dir . "/fullscreen_" . $a_mob_id . ".html";
559  $fp = fopen($file, "w+");
560  fwrite($fp, $html);
561  fclose($fp);
562  unset($fp);
563  } else {
564  $this->export_collector->addString($html, "/fullscreen_" . $a_mob_id . ".html");
565  }
566  }
567 
568  $linked_mobs = $mob_obj->getLinkedMediaObjects();
569  $a_linked_mobs = array_merge($a_linked_mobs, $linked_mobs);
570  }
571 
575  protected function renderMob(
576  \ilObjMediaObject $mob_obj,
577  string $link_xml,
578  array $params
579  ): string {
580  $xml = "<dummy>" .
581  $mob_obj->getXML(IL_MODE_ALIAS) .
582  $mob_obj->getXML(IL_MODE_OUTPUT) .
583  $link_xml .
584  "</dummy>";
585 
586  return $this->xsl->process($xml, $params);
587  }
588 
589 
593  public function exportHTMLFile(string $a_file_id): void
594  {
595  $file_dir = $this->files_dir . "/file_" . $a_file_id;
596  ilFileUtils::makeDir($file_dir);
597 
598  $file_obj = new ilObjFile($a_file_id, false);
599  $source_file = $file_obj->getFile($file_obj->getVersion());
600  if (!is_file($source_file)) {
601  $source_file = $file_obj->getFile();
602  }
603  if (is_file($source_file)) {
604  copy($source_file, $file_dir . "/" . $file_obj->getFileName());
605  }
606  }
607 
611  public function exportHTMLFileDirect(
612  string $a_file_id,
613  string $a_source_file,
614  string $a_file_name
615  ): void {
616  $file_dir = $this->files_dir . "/file_" . $a_file_id;
617  ilFileUtils::makeDir($file_dir);
618 
619  if (is_file($a_source_file)) {
620  copy(
621  $a_source_file,
622  $file_dir . "/" . ilFileUtils::getASCIIFilename($a_file_name)
623  );
624  }
625  }
626 
630  protected function exportQuestionFiles(): void
631  {
632  // export questions (images)
633  if (count($this->q_ids) > 0) {
634  foreach ($this->q_ids as $q_id) {
635  ilFileUtils::makeDirParents($this->exp_dir . "/assessment/0/" . $q_id . "/images");
637  ilFileUtils::getWebspaceDir() . "/assessment/0/" . $q_id . "/images",
638  $this->exp_dir . "/assessment/0/" . $q_id . "/images"
639  );
640  }
641  }
642  }
643 
644  public function exportHTMLGlossaryTerms(): void
645  {
646  foreach ($this->glossary_terms as $term_id) {
647  if (!ilGlossaryTerm::_exists($term_id)) {
648  continue;
649  }
650  $tpl = $this->initResourceTemplate("tpl.glossary_term_output.html");
651 
652  $term_gui = new ilGlossaryTermGUI($term_id);
653  $term_gui->setPageLinker($this->page_linker);
654  $term_gui->setOfflineDirectory($this->exp_dir);
655  $term_gui->output(true, $tpl);
656 
657  // write file
658  $html = $tpl->printToString();
659  $file = $this->exp_dir . "/term_" . $term_id . ".html";
660  $fp = fopen($file, "w+");
661  fwrite($fp, $html);
662  fclose($fp);
663  }
664  }
665 }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
getPreparedMainTemplate(?ilGlobalTemplateInterface $a_tpl=null)
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
renderMob(\ilObjMediaObject $mob_obj, string $link_xml, array $params)
Render Mob.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLogger(string $a_component_id)
Get component logger.
exportHTMLMOB(int $a_mob_id, array &$a_linked_mobs)
Export media object to html.
ILIAS COPage PageLinker $page_linker
special template class to simplify handling of ITX/PEAR
HTML export class for pages.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
__construct(string $a_exp_dir, ?\ILIAS\COPage\PageLinker $linker=null, int $ref_id=0, protected ?ExportCollector $export_collector=null)
static _exists(int $a_id)
checks whether a glossary term with specified id exists or not
Interface Observer Contains several chained tasks and infos about them.
ILIAS Style Content InternalDomainService $content_style
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static getUsagesOfPage(int $a_usage_id, string $a_usage_type, int $a_hist_nr=0, bool $a_all_hist_nrs=false, string $a_lang="-")
Get page content usages for page.
ILIAS MediaObjects MediaObjectManager $media_manager
collectPageElements(string $a_type, int $a_id, string $lang="")
Collect page elements (that need to be exported separately)
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static _lookupType(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getASCIIFilename(string $a_filename)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
ILIAS Skill Service SkillTreeService $skill_tree_service
static _lookupTitle(int $obj_id)
exportHTMLFile(string $a_file_id)
Export file object.
getXML(int $a_mode=IL_MODE_FULL, int $a_inst=0, bool $a_sign_locals=false, bool $offline=false)
get MediaObject XLM Tag
static isTypeAllowed(string $a_type)
Class ilObjFile.
global $DIC
Definition: shib_login.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _getMapAreasIntLinks(int $a_mob_id)
get all internal links of map areas of a mob
exportSupportScripts()
Export support scripts.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getMobsOfObject(string $a_type, int $a_id, int $a_usage_hist_nr=0, string $a_lang="-")
const IL_MODE_ALIAS
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
ILIAS GlobalScreen Services $global_screen
exportHTMLFileDirect(string $a_file_id, string $a_source_file, string $a_file_name)
Export file from path.
$lang
Definition: xapiexit.php:25
exportResourceFile(string $target_dir, string $file)
ILIAS Skill Service SkillPersonalService $skill_personal_service
const IL_MODE_OUTPUT
exportStyles()
Export content style.
exportQuestionFiles()
Export question images.
static _lookupType(int $id, bool $reference=false)
initResourceTemplate(string $template_file)
Get resource template.
static _getQuestionIdsForPage(string $a_parent_type, int $a_page_id, string $a_lang="-")
ILIAS COPage Xsl XslManager $xsl
exportPageElements(?callable $a_update_callback=null)
Export page elements.
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...