ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilCourseArchives Class Reference

class ilCourseArchives More...

+ Inheritance diagram for ilCourseArchives:
+ Collaboration diagram for ilCourseArchives:

Public Member Functions

 __construct ($course_obj)
 Constructor. More...
 
 getArchives ()
 
 getArchive ($a_id)
 
 getPublicArchives ()
 
 setType ($a_type)
 
 getType ()
 
 setDate ($a_date)
 
 getDate ()
 
 setSize ($a_size)
 
 getSize ()
 
 setName ($a_name)
 
 getName ()
 
 setLanguage ($a_lang_code)
 
 getLanguage ()
 
 getArchiveFile ($a_id)
 
 addXML ($a_selection="")
 Add XML archive. More...
 
 addHTML ()
 
 add ()
 
 delete ($a_id)
 
 deleteAll ()
 
 initCourseFilesObject ()
 
 initCourseXMLWriter ()
 
 __addZipFiles ($a_parent_id, $a_selection="")
 Add zip files to folder. More...
 
 __addHTMLFiles ($a_parent_id)
 
 __addCourseHTML ()
 
 __buildStructure (&$tmp_tpl, $a_parent_id)
 
 cloneArchives ()
 Clone archives. More...
 
 __read ()
 

Data Fields

 $course_obj
 
 $ilias
 
 $ilErr
 
 $ilDB
 
 $tree
 
 $lng
 
 $archive_type
 
 $archive_date
 
 $archive_size
 
 $archive_name
 
 $archive_lang
 
 $course_files_obj
 
 $course_xml_writer
 

Private Attributes

 $fss_storage
 

Detailed Description

class ilCourseArchives

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 36 of file class.ilCourseArchives.php.

Constructor & Destructor Documentation

◆ __construct()

ilCourseArchives::__construct (   $course_obj)

Constructor.

Parameters
ilObject$course_obj

Definition at line 61 of file class.ilCourseArchives.php.

References $course_obj, $ilDB, $ilErr, $ilias, $lng, $tree, and __read().

62  {
63  global $ilErr,$ilDB,$lng,$tree,$ilias;
64 
65  $this->ilias = $ilias;
66  $this->ilErr = $ilErr;
67  $this->ilDB = $ilDB;
68  $this->lng = $lng;
69  $this->tree = $tree;
70 
71  $this->ARCHIVE_XML = 1;
72  $this->ARCHIVE_HTML = 2;
73  $this->ARCHIVE_PDF = 3;
74 
75  $this->course_obj = $course_obj;
76 
77  $this->__read();
78  }
redirection script todo: (a better solution should control the processing via a xml file) ...
Database Wrapper.
Definition: class.ilDB.php:29
+ Here is the call graph for this function:

Member Function Documentation

◆ __addCourseHTML()

ilCourseArchives::__addCourseHTML ( )

Definition at line 380 of file class.ilCourseArchives.php.

References $ilias, $lng, $tpl, __buildStructure(), getLanguage(), and getName().

Referenced by addHTML().

381  {
382  global $tpl,$ilias;
383 
384  // Get Language
385  if ($this->getLanguage()) {
386  $lng = new ilLanguage($this->getLanguage());
387  $lng->loadLanguageModule('crs');
388  } else {
389  $lng =&$this->lng;
390  }
391 
392  $tmp_tpl = new ilTemplate("tpl.crs_export.html", true, true, 'Modules/Course');
393 
394  $this->course_files_obj->copyFile(
395  $tpl->tplPath . '/' . $ilias->account->prefs["style"] . '.css',
396  $this->course_files_obj->getArchiveDirectory() . '/' . $this->getName() . '/default.css'
397  );
398 
399  $tmp_tpl->setVariable('TITLE', $lng->txt('crs_export'));
400  $tmp_tpl->setVariable("CRS_STRUCTURE", $lng->txt('crs_structure'));
401 
402 
403  $tmp_tpl->setVariable("DETAILS_TITLE", $lng->txt("crs_details"));
404 
405  // SET TXT VARIABLES
406  $tmp_tpl->setVariable("TXT_SYLLABUS", $lng->txt("crs_syllabus"));
407  $tmp_tpl->setVariable("TXT_CONTACT", $lng->txt("crs_contact"));
408  $tmp_tpl->setVariable("TXT_CONTACT_NAME", $lng->txt("crs_contact_name"));
409  $tmp_tpl->setVariable("TXT_CONTACT_RESPONSIBILITY", $lng->txt("crs_contact_responsibility"));
410  $tmp_tpl->setVariable("TXT_CONTACT_EMAIL", $lng->txt("crs_contact_email"));
411  $tmp_tpl->setVariable("TXT_CONTACT_PHONE", $lng->txt("crs_contact_phone"));
412  $tmp_tpl->setVariable("TXT_CONTACT_CONSULTATION", $lng->txt("crs_contact_consultation"));
413  $tmp_tpl->setVariable("TXT_DATES", $lng->txt("crs_dates"));
414  $tmp_tpl->setVariable("TXT_ACTIVATION", $lng->txt("crs_activation"));
415  $tmp_tpl->setVariable("TXT_SUBSCRIPTION", $lng->txt("crs_subscription"));
416  $tmp_tpl->setVariable("TXT_ARCHIVE", $lng->txt("crs_archive"));
417 
418  // FILL
419  $tmp_tpl->setVariable("SYLLABUS", nl2br($this->course_obj->getSyllabus() ?
420  $this->course_obj->getSyllabus() :
421  $lng->txt("crs_not_available")));
422 
423  $tmp_tpl->setVariable("CONTACT_NAME", $this->course_obj->getContactName() ?
424  $this->course_obj->getContactName() :
425  $lng->txt("crs_not_available"));
426  $tmp_tpl->setVariable("CONTACT_RESPONSIBILITY", $this->course_obj->getContactResponsibility() ?
427  $this->course_obj->getContactResponsibility() :
428  $lng->txt("crs_not_available"));
429  $tmp_tpl->setVariable("CONTACT_PHONE", $this->course_obj->getContactPhone() ?
430  $this->course_obj->getContactPhone() :
431  $lng->txt("crs_not_available"));
432  $tmp_tpl->setVariable("CONTACT_CONSULTATION", nl2br($this->course_obj->getContactConsultation() ?
433  $this->course_obj->getContactConsultation() :
434  $lng->txt("crs_not_available")));
435  if ($this->course_obj->getContactEmail()) {
436  $tmp_tpl->setCurrentBlock("email_link");
437  #$tmp_tpl->setVariable("EMAIL_LINK","ilias.php?baseClass=ilMailGUI&type=new&rcp_to=".$this->course_obj->getContactEmail());
438  $tmp_tpl->setVariable("CONTACT_EMAIL", $this->course_obj->getContactEmail());
439  $tmp_tpl->parseCurrentBlock();
440  } else {
441  $tmp_tpl->setCurrentBlock("no_mail");
442  $tmp_tpl->setVariable("NO_CONTACT_EMAIL", $this->course_obj->getContactEmail());
443  $tmp_tpl->parseCurrentBlock();
444  }
445  if ($this->course_obj->getActivationUnlimitedStatus()) {
446  $tmp_tpl->setVariable("ACTIVATION", $lng->txt('crs_unlimited'));
447  } else {
448  $str = $lng->txt("crs_from") . " " . strftime("%Y-%m-%d %R", $this->course_obj->getActivationStart()) . " " .
449  $lng->txt("crs_to") . " " . strftime("%Y-%m-%d %R", $this->course_obj->getActivationEnd());
450  $tmp_tpl->setVariable("ACTIVATION", $str);
451  }
452  if ($this->course_obj->getSubscriptionUnlimitedStatus()) {
453  $tmp_tpl->setVariable("SUBSCRIPTION", $lng->txt('crs_unlimited'));
454  } else {
455  $str = $lng->txt("crs_from") . " " . strftime("%Y-%m-%d %R", $this->course_obj->getSubscriptionStart()) . " " .
456  $lng->txt("crs_to") . " " . strftime("%Y-%m-%d %R", $this->course_obj->getSubscriptionEnd());
457  $tmp_tpl->setVariable("SUBSCRIPTION", $str);
458  }
459  if ($this->course_obj->getArchiveType() == $this->course_obj->ARCHIVE_DISABLED) {
460  $tmp_tpl->setVariable("ARCHIVE", $lng->txt('crs_archive_disabled'));
461  } else {
462  $str = $lng->txt("crs_from") . " " . strftime("%Y-%m-%d %R", $this->course_obj->getArchiveStart()) . " " .
463  $lng->txt("crs_to") . " " . strftime("%Y-%m-%d %R", $this->course_obj->getArchiveEnd());
464  $tmp_tpl->setVariable("ARCHIVE", $str);
465  }
466 
467  $this->structure = '';
468  $this->__buildStructure($tmp_tpl, $this->course_obj->getRefId());
469  $tmp_tpl->setVariable("STRUCTURE", $this->structure);
470 
471  $this->course_files_obj->writeArchiveFile($tmp_tpl->get(), $this->getName() . '/index.html');
472 
473  return true;
474  }
__buildStructure(&$tmp_tpl, $a_parent_id)
$tpl
Definition: ilias.php:10
special template class to simplify handling of ITX/PEAR
language handling
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __addHTMLFiles()

ilCourseArchives::__addHTMLFiles (   $a_parent_id)

Definition at line 356 of file class.ilCourseArchives.php.

References ilObjectFactory\getInstanceByRefId(), and getName().

Referenced by addHTML().

357  {
358  $this->course_obj->initCourseItemObject();
359  $this->course_obj->items_obj->setParentId($a_parent_id);
360 
361  foreach ($this->course_obj->items_obj->getAllItems() as $item) {
362  if (!$tmp_obj =&ilObjectFactory::getInstanceByRefId($item['child'], false)) {
363  continue;
364  }
365  if ($abs_dir_name = $tmp_obj->getHTMLDirectory()) {
366  $new_name = 'il_' . $this->ilias->getSetting('inst_id') . '_' . $tmp_obj->getType() . '_' . $item['obj_id'];
367 
368  $this->course_files_obj->addDirectory($this->getName() . '/objects/' . $new_name);
369  $this->course_files_obj->rCopy($abs_dir_name, $this->getName() . '/objects/' . $new_name);
370 
371  // Store filename in hashtable (used for create course html tree)
372  $this->html_files["$item[obj_id]"] = "objects/" . $new_name . "/index.html";
373  }
374  $this->__addHTMLFiles($item['child']);
375  unset($tmp_obj);
376  }
377  return true;
378  }
redirection script todo: (a better solution should control the processing via a xml file) ...
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __addZipFiles()

ilCourseArchives::__addZipFiles (   $a_parent_id,
  $a_selection = "" 
)

Add zip files to folder.

Parameters
arrayselection array: key is ref_id, value is "last_file", "omit" or "create"

Definition at line 308 of file class.ilCourseArchives.php.

References $action, $info, ilExport\_getExportDirectory(), ilExport\_getLastExportFileInformation(), array, ilObjectFactory\getInstanceByRefId(), and getName().

Referenced by addXML().

309  {
310  $this->course_obj->initCourseItemObject();
311  $this->course_obj->items_obj->setParentId($a_parent_id);
312 
313  foreach ($this->course_obj->items_obj->getAllItems() as $item) {
314  if (!$tmp_obj =&ilObjectFactory::getInstanceByRefId($item['child'], false)) {
315  continue;
316  }
317  $action = $a_selection[$item['child']];
318  if ($a_selection == "") {
319  $action = "create";
320  }
321 
322  if ($action == "omit") {
323  continue;
324  }
325 
326  if ($action == "create") {
327  $abs_file_name = $tmp_obj->getXMLZip();
328  } else {
329  include_once("./Services/Export/classes/class.ilExport.php");
330  $info = ilExport::_getLastExportFileInformation($item['obj_id'], "xml", $item['type']);
331  $abs_file_name = ilExport::_getExportDirectory($item['obj_id'], "xml", $item['type']) . "/" . $info["file"];
332  if (!@is_file($abs_file_name)) {
333  $abs_file_name = "";
334  }
335  }
336 
337  // must return absolute path to zip file
338  if ($abs_file_name != "") {
339  //$new_name = 'il_'.$this->ilias->getSetting('inst_id').'_'.$tmp_obj->getType().'_'.$item['obj_id'].'.zip';
340  $new_name = basename($abs_file_name);
341  $this->course_files_obj->copyFile($abs_file_name, $this->course_files_obj->getArchiveDirectory() . '/' .
342  $this->getName() . '/' . $new_name);
343  if (is_file($this->course_files_obj->getArchiveDirectory() . '/' .
344  $this->getName() . '/' . $new_name)) {
345  $this->copied_files[] = array("title" => $item['title'],
346  "file" => $new_name, "type" => $item['type']);
347  }
348  }
349  $this->__addZipFiles($item['child']);
350 
351  unset($tmp_obj);
352  }
353  return true;
354  }
$action
__addZipFiles($a_parent_id, $a_selection="")
Add zip files to folder.
Create styles array
The data for the language used.
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$info
Definition: index.php:5
static _getLastExportFileInformation($a_obj_id, $a_type="", $a_obj_type="")
Get last export file information.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildStructure()

ilCourseArchives::__buildStructure ( $tmp_tpl,
  $a_parent_id 
)

Definition at line 476 of file class.ilCourseArchives.php.

References $key, and ilObjectFactory\getInstanceByRefId().

Referenced by __addCourseHTML().

477  {
478  $this->course_obj->initCourseItemObject();
479  $this->course_obj->items_obj->setParentId($a_parent_id);
480 
481  $items = $this->course_obj->items_obj->getAllItems();
482 
483  foreach ($items as $key => $item) {
484  if (!$tmp_obj =&ilObjectFactory::getInstanceByRefId($item['child'], false)) {
485  continue;
486  }
487 
488 
489  if ($key == 0) {
490  $this->structure .= "<ul>";
491  }
492 
493  $this->structure .= "<li>";
494 
495  if (isset($this->html_files["$item[obj_id]"])) {
496  $link = "<a href=\"./" . $this->html_files["$item[obj_id]"] . "\">" . $item["title"] . "</a>";
497  } else {
498  $link = $item['title'];
499  }
500  $this->structure .= $link;
501  $this->structure .= "</li>";
502 
503  $this->__buildStructure($tmp_tpl, $item['child']);
504 
505  if ($key == (count($items) - 1)) {
506  $this->structure .= "</ul>";
507  }
508 
509 
510  unset($tmp_obj);
511  }
512  return true;
513  }
__buildStructure(&$tmp_tpl, $a_parent_id)
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __read()

ilCourseArchives::__read ( )

Definition at line 527 of file class.ilCourseArchives.php.

References $ilDB, $query, $res, $row, array, ilDBConstants\FETCHMODE_OBJECT, and ilDB\query().

Referenced by __construct(), add(), and delete().

528  {
529  global $ilDB;
530 
531  $this->archives = array();
532  $query = "SELECT * FROM crs_archives " .
533  "WHERE course_id = " . $ilDB->quote($this->course_obj->getId(), 'integer') . " " .
534  "ORDER BY archive_date DESC";
535 
536  $res = $this->ilDB->query($query);
537  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
538  $this->archives[$row->archive_id]["archive_id"] = $row->archive_id;
539  $this->archives[$row->archive_id]["archive_type"] = $row->archive_type;
540  $this->archives[$row->archive_id]["archive_date"] = $row->archive_date;
541  $this->archives[$row->archive_id]["archive_size"] = $row->archive_size;
542  $this->archives[$row->archive_id]["archive_name"] = $row->archive_name;
543  $this->archives[$row->archive_id]["archive_lang"] = $row->archive_lang;
544  }
545  return true;
546  }
query($sql, $a_handle_error=true)
Query.
foreach($_POST as $key=> $value) $res
$query
Create styles array
The data for the language used.
Database Wrapper.
Definition: class.ilDB.php:29
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add()

ilCourseArchives::add ( )

Definition at line 237 of file class.ilCourseArchives.php.

References $ilDB, $query, $res, and __read().

Referenced by addHTML(), and addXML().

238  {
239  global $ilDB;
240 
241  $next_id = $ilDB->nextId('crs_archives');
242  $query = "INSERT INTO crs_archives (archive_id,course_id,archive_name,archive_type,archive_date,archive_size,archive_lang) " .
243  "VALUES (" .
244  $ilDB->quote($next_id, 'integer') . ", " .
245  $ilDB->quote($this->course_obj->getId(), 'integer') . "," .
246  $ilDB->quote($this->getName(), 'text') . "," .
247  $ilDB->quote($this->getType(), 'integer') . ", " .
248  $ilDB->quote($this->getDate(), 'integer') . "," .
249  $ilDB->quote($this->getSize(), 'integer') . "," .
250  $ilDB->quote($this->getLanguage(), 'text') .
251  ")";
252  $res = $ilDB->manipulate($query);
253 
254  $this->__read();
255  return true;
256  }
foreach($_POST as $key=> $value) $res
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addHTML()

ilCourseArchives::addHTML ( )

Definition at line 207 of file class.ilCourseArchives.php.

References __addCourseHTML(), __addHTMLFiles(), add(), getDate(), getName(), initCourseFilesObject(), setDate(), setName(), setSize(), setType(), and time.

208  {
209  $this->setType($this->ARCHIVE_HTML);
210  $this->setDate(time());
211  $this->setName($this->getDate() . '__' . $this->ilias->getSetting('inst_id') . '__crs_' . $this->course_obj->getId());
212 
213  // Step one create folder
214  $this->initCourseFilesObject();
215  $this->course_files_obj->addArchiveSubDirectory($this->getName());
216 
217  // Step two, create child html
218  $this->course_files_obj->addArchiveSubDirectory($this->getName() . '/objects');
219  $this->__addHTMLFiles($this->course_obj->getRefId());
220 
221  // Step three create course html
222  $this->__addCourseHTML();
223 
224  // Step three create copy in web dir
225  $this->course_files_obj->createArchiveOnlineVersion($this->getName());
226 
227  // Step four zip
228  $this->setSize($this->course_files_obj->zipArchive($this->getName(), $this->getName() . '.zip'));
229 
230  // Finally add entry in crs_archives table
231  $this->add();
232 
233  return true;
234  }
redirection script todo: (a better solution should control the processing via a xml file) ...
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ addXML()

ilCourseArchives::addXML (   $a_selection = "")

Add XML archive.

Parameters
arrayselection array: key is ref_id, value is "last_file", "omit" or "create"

Definition at line 168 of file class.ilCourseArchives.php.

References __addZipFiles(), ilExport\_generateIndexFile(), add(), array, getName(), initCourseFilesObject(), initCourseXMLWriter(), setDate(), setName(), setSize(), setType(), and time.

169  {
170  $this->setType($this->ARCHIVE_XML);
171  $this->setName(time() . '__' . $this->ilias->getSetting('inst_id') . '__crs_' . $this->course_obj->getId());
172  $this->setDate(time());
173 
174  // Step one create folder
175  $this->initCourseFilesObject();
176  $this->course_files_obj->addArchiveSubDirectory($this->getName());
177 
178  // Step two create course xml
179  $this->initCourseXMLWriter();
180 
181  $this->course_xml_writer->start();
182  $this->course_files_obj->writeArchiveFile($this->course_xml_writer->getXML(), $this->getName() . '/' . $this->getName() . '.xml');
183 
184 
185  // Step three create child object xml
186  // add objects directory
187  $this->course_files_obj->addArchiveSubDirectory($this->getName() . '/objects');
188 
189  $this->copied_files = array();
190  $this->__addZipFiles($this->course_obj->getRefId(), $a_selection);
191 
192  // Step four: Write index file
193  include_once("./Services/Export/classes/class.ilExport.php");
194  ilExport::_generateIndexFile($this->course_files_obj->getArchiveDirectory() . '/' .
195  $this->getName() . '/index.html', $this->course_obj->getId(), $this->copied_files);
196 
197  // Step five zip
198  $this->setSize($this->course_files_obj->zipArchive($this->getName(), $this->getName() . '.zip'));
199 
200 
201  // Finally add entry in crs_archives table
202  $this->add();
203 
204  return true;
205  }
__addZipFiles($a_parent_id, $a_selection="")
Add zip files to folder.
redirection script todo: (a better solution should control the processing via a xml file) ...
Create styles array
The data for the language used.
static _generateIndexFile($a_filename, $a_obj_id, $a_files, $a_type="")
Generates an index.html file including links to all xml files included (for container exports) ...
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ cloneArchives()

ilCourseArchives::cloneArchives ( )

Clone archives.

public

Parameters

Definition at line 522 of file class.ilCourseArchives.php.

523  {
524  }

◆ delete()

ilCourseArchives::delete (   $a_id)

Definition at line 258 of file class.ilCourseArchives.php.

References $ilDB, $query, $res, __read(), and initCourseFilesObject().

259  {
260  global $ilDB;
261 
262  // Delete in file system
263  $this->initCourseFilesObject();
264 
265  $this->course_files_obj->deleteArchive($this->archives[$a_id]["archive_name"]);
266 
267  $query = "DELETE FROM crs_archives " .
268  "WHERE course_id = " . $ilDB->quote($this->course_obj->getId(), 'integer') . " " .
269  "AND archive_id = " . $ilDB->quote($a_id, 'integer') . " ";
270  $res = $ilDB->manipulate($query);
271 
272  $this->__read();
273  return true;
274  }
foreach($_POST as $key=> $value) $res
$query
+ Here is the call graph for this function:

◆ deleteAll()

ilCourseArchives::deleteAll ( )

Definition at line 276 of file class.ilCourseArchives.php.

References $id, and getArchives().

277  {
278  foreach ($this->getArchives() as $id => $archive) {
279  $this->delete($id);
280  }
281  }
if(!array_key_exists('StateId', $_REQUEST)) $id
+ Here is the call graph for this function:

◆ getArchive()

ilCourseArchives::getArchive (   $a_id)

Definition at line 86 of file class.ilCourseArchives.php.

Referenced by getArchiveFile().

87  {
88  return $this->archives[$a_id];
89  }
+ Here is the caller graph for this function:

◆ getArchiveFile()

ilCourseArchives::getArchiveFile (   $a_id)

Definition at line 151 of file class.ilCourseArchives.php.

References getArchive(), and initCourseFilesObject().

152  {
153  $archive = $this->getArchive($a_id);
154  $this->initCourseFilesObject();
155 
156  if (PATH_TO_ZIP) {
157  return $this->course_files_obj->getArchiveDirectory() . '/' . $archive['archive_name'] . '.zip';
158  } else {
159  return $this->course_files_obj->getArchiveDirectory() . '/' . $archive['archive_name'];
160  }
161  }
+ Here is the call graph for this function:

◆ getArchives()

ilCourseArchives::getArchives ( )

Definition at line 81 of file class.ilCourseArchives.php.

Referenced by deleteAll().

82  {
83  return $this->archives;
84  }
+ Here is the caller graph for this function:

◆ getDate()

ilCourseArchives::getDate ( )

Definition at line 120 of file class.ilCourseArchives.php.

References time.

Referenced by addHTML().

121  {
122  return $this->archive_date ? $this->archive_date : time();
123  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the caller graph for this function:

◆ getLanguage()

ilCourseArchives::getLanguage ( )

Definition at line 145 of file class.ilCourseArchives.php.

References $archive_lang.

Referenced by __addCourseHTML().

146  {
147  return $this->archive_lang;
148  }
+ Here is the caller graph for this function:

◆ getName()

ilCourseArchives::getName ( )

Definition at line 137 of file class.ilCourseArchives.php.

References $archive_name.

Referenced by __addCourseHTML(), __addHTMLFiles(), __addZipFiles(), addHTML(), and addXML().

138  {
139  return $this->archive_name;
140  }
+ Here is the caller graph for this function:

◆ getPublicArchives()

ilCourseArchives::getPublicArchives ( )

Definition at line 91 of file class.ilCourseArchives.php.

References $id, and array.

92  {
93  foreach ($this->archives as $id => $archive) {
94  if ($archive['archive_type'] == $this->ARCHIVE_XML) {
95  continue;
96  }
97  if ($this->course_obj->getArchiveType() != $this->course_obj->ARCHIVE_DOWNLOAD and
98  $archive['archive_type'] == $this->ARCHIVE_PDF) {
99  continue;
100  }
101  $public_archives[$id] = $archive;
102  }
103 
104  return $public_archives ? $public_archives : array();
105  }
if(!array_key_exists('StateId', $_REQUEST)) $id
Create styles array
The data for the language used.

◆ getSize()

ilCourseArchives::getSize ( )

Definition at line 129 of file class.ilCourseArchives.php.

References $archive_size.

130  {
131  return $this->archive_size;
132  }

◆ getType()

ilCourseArchives::getType ( )

Definition at line 111 of file class.ilCourseArchives.php.

112  {
113  return $this->archive_type ? $this->archive_type : $this->ARCHIVE_XML;
114  }

◆ initCourseFilesObject()

ilCourseArchives::initCourseFilesObject ( )

Definition at line 283 of file class.ilCourseArchives.php.

Referenced by addHTML(), addXML(), delete(), and getArchiveFile().

284  {
285  if (!is_object($this->course_files_obj)) {
286  include_once('Modules/Course/classes/class.ilFSStorageCourse.php');
287  $this->course_files_obj = new ilFSStorageCourse($this->course_obj->getId());
288  }
289  return true;
290  }
+ Here is the caller graph for this function:

◆ initCourseXMLWriter()

ilCourseArchives::initCourseXMLWriter ( )

Definition at line 292 of file class.ilCourseArchives.php.

Referenced by addXML().

293  {
294  if (!is_object($this->course_xml_writer)) {
295  include_once "./Modules/Course/classes/class.ilCourseXMLWriter.php";
296  $this->course_xml_writer = new ilCourseXMLWriter($this->course_obj);
297  }
298  return true;
299  }
+ Here is the caller graph for this function:

◆ setDate()

ilCourseArchives::setDate (   $a_date)

Definition at line 116 of file class.ilCourseArchives.php.

Referenced by addHTML(), and addXML().

117  {
118  $this->archive_date = $a_date;
119  }
+ Here is the caller graph for this function:

◆ setLanguage()

ilCourseArchives::setLanguage (   $a_lang_code)

Definition at line 141 of file class.ilCourseArchives.php.

142  {
143  $this->archive_lang = $a_lang_code;
144  }

◆ setName()

ilCourseArchives::setName (   $a_name)

Definition at line 133 of file class.ilCourseArchives.php.

Referenced by addHTML(), and addXML().

134  {
135  $this->archive_name = $a_name;
136  }
+ Here is the caller graph for this function:

◆ setSize()

ilCourseArchives::setSize (   $a_size)

Definition at line 125 of file class.ilCourseArchives.php.

Referenced by addHTML(), and addXML().

126  {
127  $this->archive_size = $a_size;
128  }
+ Here is the caller graph for this function:

◆ setType()

ilCourseArchives::setType (   $a_type)

Definition at line 107 of file class.ilCourseArchives.php.

References $a_type.

Referenced by addHTML(), and addXML().

108  {
109  $this->archive_type = $a_type;
110  }
$a_type
Definition: workflow.php:92
+ Here is the caller graph for this function:

Field Documentation

◆ $archive_date

ilCourseArchives::$archive_date

Definition at line 46 of file class.ilCourseArchives.php.

◆ $archive_lang

ilCourseArchives::$archive_lang

Definition at line 49 of file class.ilCourseArchives.php.

Referenced by getLanguage().

◆ $archive_name

ilCourseArchives::$archive_name

Definition at line 48 of file class.ilCourseArchives.php.

Referenced by getName().

◆ $archive_size

ilCourseArchives::$archive_size

Definition at line 47 of file class.ilCourseArchives.php.

Referenced by getSize().

◆ $archive_type

ilCourseArchives::$archive_type

Definition at line 45 of file class.ilCourseArchives.php.

◆ $course_files_obj

ilCourseArchives::$course_files_obj

Definition at line 51 of file class.ilCourseArchives.php.

◆ $course_obj

ilCourseArchives::$course_obj

Definition at line 38 of file class.ilCourseArchives.php.

Referenced by __construct().

◆ $course_xml_writer

ilCourseArchives::$course_xml_writer

Definition at line 52 of file class.ilCourseArchives.php.

◆ $fss_storage

ilCourseArchives::$fss_storage
private

Definition at line 54 of file class.ilCourseArchives.php.

◆ $ilDB

ilCourseArchives::$ilDB

Definition at line 41 of file class.ilCourseArchives.php.

Referenced by __construct(), __read(), add(), and delete().

◆ $ilErr

ilCourseArchives::$ilErr

Definition at line 40 of file class.ilCourseArchives.php.

Referenced by __construct().

◆ $ilias

ilCourseArchives::$ilias

Definition at line 39 of file class.ilCourseArchives.php.

Referenced by __addCourseHTML(), and __construct().

◆ $lng

ilCourseArchives::$lng

Definition at line 43 of file class.ilCourseArchives.php.

Referenced by __addCourseHTML(), and __construct().

◆ $tree

ilCourseArchives::$tree

Definition at line 42 of file class.ilCourseArchives.php.

Referenced by __construct().


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