ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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.

62 {
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 }
Database Wrapper.
Definition: class.ilDB.php:30
redirection script todo: (a better solution should control the processing via a xml file)

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

+ Here is the call graph for this function:

Member Function Documentation

◆ __addCourseHTML()

ilCourseArchives::__addCourseHTML ( )

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

404 {
405 global $tpl,$ilias;
406
407 // Get Language
408 if($this->getLanguage())
409 {
410 $lng = new ilLanguage($this->getLanguage());
411 $lng->loadLanguageModule('crs');
412 }
413 else
414 {
415 $lng =& $this->lng;
416 }
417
418 $tmp_tpl = new ilTemplate("tpl.crs_export.html",true,true,'Modules/Course');
419
420 $this->course_files_obj->copyFile($tpl->tplPath.'/'.$ilias->account->prefs["style"].'.css',
421 $this->course_files_obj->getArchiveDirectory().'/'.$this->getName().'/default.css');
422
423 $tmp_tpl->setVariable('TITLE',$lng->txt('crs_export'));
424 $tmp_tpl->setVariable("CRS_STRUCTURE",$lng->txt('crs_structure'));
425
426
427 $tmp_tpl->setVariable("DETAILS_TITLE",$lng->txt("crs_details"));
428
429 // SET TXT VARIABLES
430 $tmp_tpl->setVariable("TXT_SYLLABUS",$lng->txt("crs_syllabus"));
431 $tmp_tpl->setVariable("TXT_CONTACT",$lng->txt("crs_contact"));
432 $tmp_tpl->setVariable("TXT_CONTACT_NAME",$lng->txt("crs_contact_name"));
433 $tmp_tpl->setVariable("TXT_CONTACT_RESPONSIBILITY",$lng->txt("crs_contact_responsibility"));
434 $tmp_tpl->setVariable("TXT_CONTACT_EMAIL",$lng->txt("crs_contact_email"));
435 $tmp_tpl->setVariable("TXT_CONTACT_PHONE",$lng->txt("crs_contact_phone"));
436 $tmp_tpl->setVariable("TXT_CONTACT_CONSULTATION",$lng->txt("crs_contact_consultation"));
437 $tmp_tpl->setVariable("TXT_DATES",$lng->txt("crs_dates"));
438 $tmp_tpl->setVariable("TXT_ACTIVATION",$lng->txt("crs_activation"));
439 $tmp_tpl->setVariable("TXT_SUBSCRIPTION",$lng->txt("crs_subscription"));
440 $tmp_tpl->setVariable("TXT_ARCHIVE",$lng->txt("crs_archive"));
441
442 // FILL
443 $tmp_tpl->setVariable("SYLLABUS",nl2br($this->course_obj->getSyllabus() ?
444 $this->course_obj->getSyllabus() :
445 $lng->txt("crs_not_available")));
446
447 $tmp_tpl->setVariable("CONTACT_NAME",$this->course_obj->getContactName() ?
448 $this->course_obj->getContactName() :
449 $lng->txt("crs_not_available"));
450 $tmp_tpl->setVariable("CONTACT_RESPONSIBILITY",$this->course_obj->getContactResponsibility() ?
451 $this->course_obj->getContactResponsibility() :
452 $lng->txt("crs_not_available"));
453 $tmp_tpl->setVariable("CONTACT_PHONE",$this->course_obj->getContactPhone() ?
454 $this->course_obj->getContactPhone() :
455 $lng->txt("crs_not_available"));
456 $tmp_tpl->setVariable("CONTACT_CONSULTATION",nl2br($this->course_obj->getContactConsultation() ?
457 $this->course_obj->getContactConsultation() :
458 $lng->txt("crs_not_available")));
459 if($this->course_obj->getContactEmail())
460 {
461 $tmp_tpl->setCurrentBlock("email_link");
462 #$tmp_tpl->setVariable("EMAIL_LINK","ilias.php?baseClass=ilMailGUI&type=new&rcp_to=".$this->course_obj->getContactEmail());
463 $tmp_tpl->setVariable("CONTACT_EMAIL",$this->course_obj->getContactEmail());
464 $tmp_tpl->parseCurrentBlock();
465 }
466 else
467 {
468 $tmp_tpl->setCurrentBlock("no_mail");
469 $tmp_tpl->setVariable("NO_CONTACT_EMAIL",$this->course_obj->getContactEmail());
470 $tmp_tpl->parseCurrentBlock();
471 }
472 if($this->course_obj->getActivationUnlimitedStatus())
473 {
474 $tmp_tpl->setVariable("ACTIVATION",$lng->txt('crs_unlimited'));
475 }
476 else
477 {
478 $str = $lng->txt("crs_from")." ".strftime("%Y-%m-%d %R",$this->course_obj->getActivationStart())." ".
479 $lng->txt("crs_to")." ".strftime("%Y-%m-%d %R",$this->course_obj->getActivationEnd());
480 $tmp_tpl->setVariable("ACTIVATION",$str);
481 }
482 if($this->course_obj->getSubscriptionUnlimitedStatus())
483 {
484 $tmp_tpl->setVariable("SUBSCRIPTION",$lng->txt('crs_unlimited'));
485 }
486 else
487 {
488 $str = $lng->txt("crs_from")." ".strftime("%Y-%m-%d %R",$this->course_obj->getSubscriptionStart())." ".
489 $lng->txt("crs_to")." ".strftime("%Y-%m-%d %R",$this->course_obj->getSubscriptionEnd());
490 $tmp_tpl->setVariable("SUBSCRIPTION",$str);
491 }
492 if($this->course_obj->getArchiveType() == $this->course_obj->ARCHIVE_DISABLED)
493 {
494 $tmp_tpl->setVariable("ARCHIVE",$lng->txt('crs_archive_disabled'));
495 }
496 else
497 {
498 $str = $lng->txt("crs_from")." ".strftime("%Y-%m-%d %R",$this->course_obj->getArchiveStart())." ".
499 $lng->txt("crs_to")." ".strftime("%Y-%m-%d %R",$this->course_obj->getArchiveEnd());
500 $tmp_tpl->setVariable("ARCHIVE",$str);
501 }
502
503 $this->structure = '';
504 $this->__buildStructure($tmp_tpl,$this->course_obj->getRefId());
505 $tmp_tpl->setVariable("STRUCTURE",$this->structure);
506
507 $this->course_files_obj->writeArchiveFile($tmp_tpl->get(),$this->getName().'/index.html');
508
509 return true;
510 }
global $tpl
Definition: ilias.php:8
__buildStructure(&$tmp_tpl, $a_parent_id)
language handling
special template class to simplify handling of ITX/PEAR

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

Referenced by addHTML().

+ 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 376 of file class.ilCourseArchives.php.

377 {
378 $this->course_obj->initCourseItemObject();
379 $this->course_obj->items_obj->setParentId($a_parent_id);
380
381 foreach($this->course_obj->items_obj->getAllItems() as $item)
382 {
383 if(!$tmp_obj =& ilObjectFactory::getInstanceByRefId($item['child'],false))
384 {
385 continue;
386 }
387 if($abs_dir_name = $tmp_obj->getHTMLDirectory())
388 {
389 $new_name = 'il_'.$this->ilias->getSetting('inst_id').'_'.$tmp_obj->getType().'_'.$item['obj_id'];
390
391 $this->course_files_obj->addDirectory($this->getName().'/objects/'.$new_name);
392 $this->course_files_obj->rCopy($abs_dir_name,$this->getName().'/objects/'.$new_name);
393
394 // Store filename in hashtable (used for create course html tree)
395 $this->html_files["$item[obj_id]"] = "objects/".$new_name."/index.html";
396 }
397 $this->__addHTMLFiles($item['child']);
398 unset($tmp_obj);
399 }
400 return true;
401 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

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

Referenced by __addHTMLFiles(), and addHTML().

+ 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 318 of file class.ilCourseArchives.php.

319 {
320 $this->course_obj->initCourseItemObject();
321 $this->course_obj->items_obj->setParentId($a_parent_id);
322
323 foreach($this->course_obj->items_obj->getAllItems() as $item)
324 {
325 if(!$tmp_obj =& ilObjectFactory::getInstanceByRefId($item['child'],false))
326 {
327 continue;
328 }
329 $action = $a_selection[$item['child']];
330 if ($a_selection == "")
331 {
332 $action = "create";
333 }
334
335 if ($action == "omit")
336 {
337 continue;
338 }
339
340 if ($action == "create")
341 {
342 $abs_file_name = $tmp_obj->getXMLZip();
343 }
344 else
345 {
346 include_once("./Services/Export/classes/class.ilExport.php");
347 $info = ilExport::_getLastExportFileInformation($item['obj_id'], "xml", $item['type']);
348 $abs_file_name = ilExport::_getExportDirectory($item['obj_id'], "xml", $item['type'])."/".$info["file"];
349 if (!@is_file($abs_file_name))
350 {
351 $abs_file_name = "";
352 }
353 }
354
355 // must return absolute path to zip file
356 if ($abs_file_name != "")
357 {
358 //$new_name = 'il_'.$this->ilias->getSetting('inst_id').'_'.$tmp_obj->getType().'_'.$item['obj_id'].'.zip';
359 $new_name = basename($abs_file_name);
360 $this->course_files_obj->copyFile($abs_file_name,$this->course_files_obj->getArchiveDirectory().'/'.
361 $this->getName().'/'.$new_name);
362 if (is_file($this->course_files_obj->getArchiveDirectory().'/'.
363 $this->getName().'/'.$new_name))
364 {
365 $this->copied_files[] = array("title" => $item['title'],
366 "file" => $new_name, "type" => $item['type']);
367 }
368 }
369 $this->__addZipFiles($item['child']);
370
371 unset($tmp_obj);
372 }
373 return true;
374 }
__addZipFiles($a_parent_id, $a_selection="")
Add zip files to folder.
static _getLastExportFileInformation($a_obj_id, $a_type="", $a_obj_type="")
Get last export file information.
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
$info
Definition: example_052.php:80

References $info, __addZipFiles(), ilExport\_getExportDirectory(), ilExport\_getLastExportFileInformation(), and ilObjectFactory\getInstanceByRefId().

Referenced by __addZipFiles(), and addXML().

+ 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 512 of file class.ilCourseArchives.php.

513 {
514 $this->course_obj->initCourseItemObject();
515 $this->course_obj->items_obj->setParentId($a_parent_id);
516
517 $items = $this->course_obj->items_obj->getAllItems();
518
519 foreach($items as $key => $item)
520 {
521 if(!$tmp_obj =& ilObjectFactory::getInstanceByRefId($item['child'],false))
522 {
523 continue;
524 }
525
526
527 if($key == 0)
528 {
529 $this->structure .= "<ul>";
530 }
531
532 $this->structure .= "<li>";
533
534 if(isset($this->html_files["$item[obj_id]"]))
535 {
536 $link = "<a href=\"./".$this->html_files["$item[obj_id]"]."\">".$item["title"]."</a>";
537 }
538 else
539 {
540 $link = $item['title'];
541 }
542 $this->structure .= $link;
543 $this->structure .= "</li>";
544
545 $this->__buildStructure($tmp_tpl,$item['child']);
546
547 if($key == (count($items) - 1))
548 {
549 $this->structure .= "</ul>";
550 }
551
552
553 unset($tmp_obj);
554 }
555 return true;
556 }

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

Referenced by __addCourseHTML(), and __buildStructure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __read()

ilCourseArchives::__read ( )

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

572 {
573 global $ilDB;
574
575 $this->archives = array();
576 $query = "SELECT * FROM crs_archives ".
577 "WHERE course_id = ".$ilDB->quote($this->course_obj->getId(),'integer')." ".
578 "ORDER BY archive_date DESC";
579
580 $res = $this->ilDB->query($query);
581 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
582 {
583 $this->archives[$row->archive_id]["archive_id"] = $row->archive_id;
584 $this->archives[$row->archive_id]["archive_type"] = $row->archive_type;
585 $this->archives[$row->archive_id]["archive_date"] = $row->archive_date;
586 $this->archives[$row->archive_id]["archive_size"] = $row->archive_size;
587 $this->archives[$row->archive_id]["archive_name"] = $row->archive_name;
588 $this->archives[$row->archive_id]["archive_lang"] = $row->archive_lang;
589 }
590 return true;
591 }
query($sql, $a_handle_error=true)
Query.

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add()

ilCourseArchives::add ( )

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

245 {
246 global $ilDB;
247
248 $next_id = $ilDB->nextId('crs_archives');
249 $query = "INSERT INTO crs_archives (archive_id,course_id,archive_name,archive_type,archive_date,archive_size,archive_lang) ".
250 "VALUES (" .
251 $ilDB->quote($next_id,'integer').", ".
252 $ilDB->quote($this->course_obj->getId(),'integer').",".
253 $ilDB->quote($this->getName(),'text').",".
254 $ilDB->quote($this->getType(),'integer').", ".
255 $ilDB->quote($this->getDate(),'integer').",".
256 $ilDB->quote($this->getSize(),'integer').",".
257 $ilDB->quote($this->getLanguage(),'text').
258 ")";
259 $res = $ilDB->manipulate($query);
260
261 $this->__read();
262 return true;
263 }

References $ilDB, $query, $res, __read(), getDate(), getLanguage(), getName(), getSize(), and getType().

Referenced by addHTML(), and addXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addHTML()

ilCourseArchives::addHTML ( )

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

215 {
216 $this->setType($this->ARCHIVE_HTML);
217 $this->setDate(time());
218 $this->setName($this->getDate().'__'.$this->ilias->getSetting('inst_id').'__crs_'.$this->course_obj->getId());
219
220 // Step one create folder
221 $this->initCourseFilesObject();
222 $this->course_files_obj->addArchiveSubDirectory($this->getName());
223
224 // Step two, create child html
225 $this->course_files_obj->addArchiveSubDirectory($this->getName().'/objects');
226 $this->__addHTMLFiles($this->course_obj->getRefId());
227
228 // Step three create course html
229 $this->__addCourseHTML();
230
231 // Step three create copy in web dir
232 $this->course_files_obj->createArchiveOnlineVersion($this->getName());
233
234 // Step four zip
235 $this->setSize($this->course_files_obj->zipArchive($this->getName(),$this->getName().'.zip'));
236
237 // Finally add entry in crs_archives table
238 $this->add();
239
240 return true;
241 }

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

+ 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 175 of file class.ilCourseArchives.php.

176 {
177 $this->setType($this->ARCHIVE_XML);
178 $this->setName(time().'__'.$this->ilias->getSetting('inst_id').'__crs_'.$this->course_obj->getId());
179 $this->setDate(time());
180
181 // Step one create folder
182 $this->initCourseFilesObject();
183 $this->course_files_obj->addArchiveSubDirectory($this->getName());
184
185 // Step two create course xml
186 $this->initCourseXMLWriter();
187
188 $this->course_xml_writer->start();
189 $this->course_files_obj->writeArchiveFile($this->course_xml_writer->getXML(),$this->getName().'/'.$this->getName().'.xml');
190
191
192 // Step three create child object xml
193 // add objects directory
194 $this->course_files_obj->addArchiveSubDirectory($this->getName().'/objects');
195
196 $this->copied_files = array();
197 $this->__addZipFiles($this->course_obj->getRefId(), $a_selection);
198
199 // Step four: Write index file
200 include_once("./Services/Export/classes/class.ilExport.php");
201 ilExport::_generateIndexFile($this->course_files_obj->getArchiveDirectory().'/'.
202 $this->getName().'/index.html', $this->course_obj->getId(),$this->copied_files);
203
204 // Step five zip
205 $this->setSize($this->course_files_obj->zipArchive($this->getName(),$this->getName().'.zip'));
206
207
208 // Finally add entry in crs_archives table
209 $this->add();
210
211 return true;
212 }
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)

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

+ Here is the call graph for this function:

◆ cloneArchives()

ilCourseArchives::cloneArchives ( )

Clone archives.

@access public

Parameters

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

566 {
567
568 }

◆ delete()

ilCourseArchives::delete (   $a_id)

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

266 {
267 global $ilDB;
268
269 // Delete in file system
270 $this->initCourseFilesObject();
271
272 $this->course_files_obj->deleteArchive($this->archives[$a_id]["archive_name"]);
273
274 $query = "DELETE FROM crs_archives ".
275 "WHERE course_id = ".$ilDB->quote($this->course_obj->getId(),'integer')." ".
276 "AND archive_id = ".$ilDB->quote($a_id,'integer')." ";
277 $res = $ilDB->manipulate($query);
278
279 $this->__read();
280 return true;
281 }

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

+ Here is the call graph for this function:

◆ deleteAll()

ilCourseArchives::deleteAll ( )

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

284 {
285 foreach($this->getArchives() as $id => $archive)
286 {
287 $this->delete($id);
288 }
289 }

References getArchives().

+ Here is the call graph for this function:

◆ getArchive()

ilCourseArchives::getArchive (   $a_id)

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

87 {
88 return $this->archives[$a_id];
89 }

Referenced by getArchiveFile().

+ Here is the caller graph for this function:

◆ getArchiveFile()

ilCourseArchives::getArchiveFile (   $a_id)

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

155 {
156 $archive = $this->getArchive($a_id);
157 $this->initCourseFilesObject();
158
159 if(PATH_TO_ZIP)
160 {
161 return $this->course_files_obj->getArchiveDirectory().'/'.$archive['archive_name'].'.zip';
162 }
163 else
164 {
165 return $this->course_files_obj->getArchiveDirectory().'/'.$archive['archive_name'];
166 }
167
168 }

References getArchive(), and initCourseFilesObject().

+ Here is the call graph for this function:

◆ getArchives()

ilCourseArchives::getArchives ( )

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

82 {
83 return $this->archives;
84 }

Referenced by deleteAll().

+ Here is the caller graph for this function:

◆ getDate()

ilCourseArchives::getDate ( )

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

124 {
125 return $this->archive_date ? $this->archive_date : time();
126 }

Referenced by add(), and addHTML().

+ Here is the caller graph for this function:

◆ getLanguage()

ilCourseArchives::getLanguage ( )

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

149 {
150 return $this->archive_lang;
151 }

References $archive_lang.

Referenced by __addCourseHTML(), and add().

+ Here is the caller graph for this function:

◆ getName()

ilCourseArchives::getName ( )

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

141 {
142 return $this->archive_name;
143 }

References $archive_name.

Referenced by __addHTMLFiles(), add(), addHTML(), and addXML().

+ Here is the caller graph for this function:

◆ getPublicArchives()

ilCourseArchives::getPublicArchives ( )

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

92 {
93 foreach($this->archives as $id => $archive)
94 {
95 if($archive['archive_type'] == $this->ARCHIVE_XML)
96 {
97 continue;
98 }
99 if($this->course_obj->getArchiveType() != $this->course_obj->ARCHIVE_DOWNLOAD and
100 $archive['archive_type'] == $this->ARCHIVE_PDF)
101 {
102 continue;
103 }
104 $public_archives[$id] = $archive;
105 }
106
107 return $public_archives ? $public_archives : array();
108 }

◆ getSize()

ilCourseArchives::getSize ( )

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

133 {
134 return $this->archive_size;
135 }

References $archive_size.

Referenced by add().

+ Here is the caller graph for this function:

◆ getType()

ilCourseArchives::getType ( )

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

115 {
116 return $this->archive_type ? $this->archive_type : $this->ARCHIVE_XML;
117 }

Referenced by add().

+ Here is the caller graph for this function:

◆ initCourseFilesObject()

ilCourseArchives::initCourseFilesObject ( )

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

292 {
293 if(!is_object($this->course_files_obj))
294 {
295 include_once('Modules/Course/classes/class.ilFSStorageCourse.php');
296 $this->course_files_obj = new ilFSStorageCourse($this->course_obj->getId());
297 }
298 return true;
299 }

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

+ Here is the caller graph for this function:

◆ initCourseXMLWriter()

ilCourseArchives::initCourseXMLWriter ( )

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

302 {
303 if(!is_object($this->course_xml_writer))
304 {
305 include_once "./Modules/Course/classes/class.ilCourseXMLWriter.php";
306 $this->course_xml_writer = new ilCourseXMLWriter($this->course_obj);
307 }
308 return true;
309 }

Referenced by addXML().

+ Here is the caller graph for this function:

◆ setDate()

ilCourseArchives::setDate (   $a_date)

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

120 {
121 $this->archive_date = $a_date;
122 }

Referenced by addHTML(), and addXML().

+ Here is the caller graph for this function:

◆ setLanguage()

ilCourseArchives::setLanguage (   $a_lang_code)

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

145 {
146 $this->archive_lang = $a_lang_code;
147 }

◆ setName()

ilCourseArchives::setName (   $a_name)

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

137 {
138 $this->archive_name = $a_name;
139 }

Referenced by addHTML(), and addXML().

+ Here is the caller graph for this function:

◆ setSize()

ilCourseArchives::setSize (   $a_size)

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

129 {
130 $this->archive_size = $a_size;
131 }

Referenced by addHTML(), and addXML().

+ Here is the caller graph for this function:

◆ setType()

ilCourseArchives::setType (   $a_type)

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

111 {
112 $this->archive_type = $a_type;
113 }
$a_type
Definition: workflow.php:93

References $a_type.

Referenced by addHTML(), and addXML().

+ 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: