ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLMMultiSrt.php
Go to the documentation of this file.
1<?php
2
24{
26
27 public function __construct(ilObjLearningModule $a_lm)
28 {
29 $this->lm = $a_lm;
30 }
31
35 public function getUploadDir(): string
36 {
37 return ilFileUtils::getDataDir() . "/lm_data" .
38 "/lm_" . $this->lm->getId() . "/srt_tmp";
39 }
40
41 public function getMobIds(): array
42 {
43 // add mob information to items
44 // all pages
45 $pages = ilLMPageObject::getPageList($this->lm->getId());
46 $mobs = array();
47 foreach ($pages as $page) {
48 // all media objects
49 $pg_mobs = ilObjMediaObject::_getMobsOfObject("lm:pg", $page["obj_id"], 0, "");
50 foreach ($pg_mobs as $k => $pg_mob) {
51 $mobs[$k] = $pg_mob;
52 }
53 }
54 return $mobs;
55 }
56}
static getDataDir()
get data directory (outside webspace)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjLearningModule $a_lm)
getUploadDir()
Get directory for multi srt upload.
ilObjLearningModule $lm
static getPageList(int $lm_id)
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="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...