ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilLMMultiSrt.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/MediaObjects/interfaces/interface.ilMobMultiSrtInt.php");
6 
15 {
16  public function __construct($a_lm)
17  {
18  $this->lm = $a_lm;
19  }
20 
26  public function getUploadDir()
27  {
28  return ilUtil::getDataDir() . "/lm_data" .
29  "/lm_" . $this->lm->getId() . "/srt_tmp";
30  }
31 
38  public function getMobIds()
39  {
40  // add mob information to items
41  // all pages
42  include_once("./Modules/LearningModule/classes/class.ilLMPageObject.php");
43  include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
44  $pages = ilLMPageObject::getPageList($this->lm->getId());
45  $mobs = array();
46  foreach ($pages as $page) {
47  // all media objects
48  $pg_mobs = ilObjMediaObject::_getMobsOfObject("lm:pg", $page["obj_id"], 0, "");
49  foreach ($pg_mobs as $k => $pg_mob) {
50  $mobs[$k] = $pg_mob;
51  }
52  }
53  return $mobs;
54  }
55 }
static _getMobsOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_lang="-")
get mobs of object
Interface ilMobMultiSrtInt.
$mobs
static getDataDir()
get data directory (outside webspace)
getUploadDir()
Get directory for multi srt upload.
static getPageList($lm_id)
static
Handler class for multi srt upload in learning modules.