ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilCourseArchives Class Reference

class ilCourseArchives More...

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

Public Member Functions

 ilCourseArchives (&$course_obj)
 
 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.

Member Function Documentation

◆ __addCourseHTML()

ilCourseArchives::__addCourseHTML ( )

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

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

373 {
374 $this->course_obj->initCourseItemObject();
375 $this->course_obj->items_obj->setParentId($a_parent_id);
376
377 foreach($this->course_obj->items_obj->getAllItems() as $item)
378 {
379 if(!$tmp_obj =& ilObjectFactory::getInstanceByRefId($item['child'],false))
380 {
381 continue;
382 }
383 if($abs_dir_name = $tmp_obj->getHTMLDirectory())
384 {
385 $new_name = 'il_'.$this->ilias->getSetting('inst_id').'_'.$tmp_obj->getType().'_'.$item['obj_id'];
386
387 $this->course_files_obj->addDirectory($this->getName().'/objects/'.$new_name);
388 $this->course_files_obj->rCopy($abs_dir_name,$this->getName().'/objects/'.$new_name);
389
390 // Store filename in hashtable (used for create course html tree)
391 $this->html_files["$item[obj_id]"] = "objects/".$new_name."/index.html";
392 }
393 $this->__addHTMLFiles($item['child']);
394 unset($tmp_obj);
395 }
396 return true;
397 }
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 314 of file class.ilCourseArchives.php.

315 {
316 $this->course_obj->initCourseItemObject();
317 $this->course_obj->items_obj->setParentId($a_parent_id);
318
319 foreach($this->course_obj->items_obj->getAllItems() as $item)
320 {
321 if(!$tmp_obj =& ilObjectFactory::getInstanceByRefId($item['child'],false))
322 {
323 continue;
324 }
325 $action = $a_selection[$item['child']];
326 if ($a_selection == "")
327 {
328 $action = "create";
329 }
330
331 if ($action == "omit")
332 {
333 continue;
334 }
335
336 if ($action == "create")
337 {
338 $abs_file_name = $tmp_obj->getXMLZip();
339 }
340 else
341 {
342 include_once("./Services/Export/classes/class.ilExport.php");
343 $info = ilExport::_getLastExportFileInformation($item['obj_id'], "xml", $item['type']);
344 $abs_file_name = ilExport::_getExportDirectory($item['obj_id'], "xml", $item['type'])."/".$info["file"];
345 if (!@is_file($abs_file_name))
346 {
347 $abs_file_name = "";
348 }
349 }
350
351 // must return absolute path to zip file
352 if ($abs_file_name != "")
353 {
354 //$new_name = 'il_'.$this->ilias->getSetting('inst_id').'_'.$tmp_obj->getType().'_'.$item['obj_id'].'.zip';
355 $new_name = basename($abs_file_name);
356 $this->course_files_obj->copyFile($abs_file_name,$this->course_files_obj->getArchiveDirectory().'/'.
357 $this->getName().'/'.$new_name);
358 if (is_file($this->course_files_obj->getArchiveDirectory().'/'.
359 $this->getName().'/'.$new_name))
360 {
361 $this->copied_files[] = array("title" => $item['title'],
362 "file" => $new_name, "type" => $item['type']);
363 }
364 }
365 $this->__addZipFiles($item['child']);
366
367 unset($tmp_obj);
368 }
369 return true;
370 }
__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 508 of file class.ilCourseArchives.php.

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

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

568 {
569 global $ilDB;
570
571 $this->archives = array();
572 $query = "SELECT * FROM crs_archives ".
573 "WHERE course_id = ".$ilDB->quote($this->course_obj->getId(),'integer')." ".
574 "ORDER BY archive_date DESC";
575
576 $res = $this->ilDB->query($query);
577 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
578 {
579 $this->archives[$row->archive_id]["archive_id"] = $row->archive_id;
580 $this->archives[$row->archive_id]["archive_type"] = $row->archive_type;
581 $this->archives[$row->archive_id]["archive_date"] = $row->archive_date;
582 $this->archives[$row->archive_id]["archive_size"] = $row->archive_size;
583 $this->archives[$row->archive_id]["archive_name"] = $row->archive_name;
584 $this->archives[$row->archive_id]["archive_lang"] = $row->archive_lang;
585 }
586 return true;
587 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
Database Wrapper.
Definition: class.ilDB.php:29
query($sql, $a_handle_error=true)
Query.

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

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

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

◆ add()

ilCourseArchives::add ( )

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

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

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

211 {
212 $this->setType($this->ARCHIVE_HTML);
213 $this->setDate(time());
214 $this->setName($this->getDate().'__'.$this->ilias->getSetting('inst_id').'__crs_'.$this->course_obj->getId());
215
216 // Step one create folder
217 $this->initCourseFilesObject();
218 $this->course_files_obj->addArchiveSubDirectory($this->getName());
219
220 // Step two, create child html
221 $this->course_files_obj->addArchiveSubDirectory($this->getName().'/objects');
222 $this->__addHTMLFiles($this->course_obj->getRefId());
223
224 // Step three create course html
225 $this->__addCourseHTML();
226
227 // Step three create copy in web dir
228 $this->course_files_obj->createArchiveOnlineVersion($this->getName());
229
230 // Step four zip
231 $this->setSize($this->course_files_obj->zipArchive($this->getName(),$this->getName().'.zip'));
232
233 // Finally add entry in crs_archives table
234 $this->add();
235
236 return true;
237 }
redirection script todo: (a better solution should control the processing via a xml file)

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

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

562 {
563
564 }

◆ delete()

ilCourseArchives::delete (   $a_id)

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

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

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

+ Here is the call graph for this function:

◆ deleteAll()

ilCourseArchives::deleteAll ( )

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

280 {
281 foreach($this->getArchives() as $id => $archive)
282 {
283 $this->delete($id);
284 }
285 }

References getArchives().

+ Here is the call graph for this function:

◆ getArchive()

ilCourseArchives::getArchive (   $a_id)

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

83 {
84 return $this->archives[$a_id];
85 }

Referenced by getArchiveFile().

+ Here is the caller graph for this function:

◆ getArchiveFile()

ilCourseArchives::getArchiveFile (   $a_id)

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

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

References getArchive(), and initCourseFilesObject().

+ Here is the call graph for this function:

◆ getArchives()

ilCourseArchives::getArchives ( )

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

78 {
79 return $this->archives;
80 }

Referenced by deleteAll().

+ Here is the caller graph for this function:

◆ getDate()

ilCourseArchives::getDate ( )

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

120 {
121 return $this->archive_date ? $this->archive_date : time();
122 }

Referenced by add(), and addHTML().

+ Here is the caller graph for this function:

◆ getLanguage()

ilCourseArchives::getLanguage ( )

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

145 {
146 return $this->archive_lang;
147 }

References $archive_lang.

Referenced by __addCourseHTML(), and add().

+ Here is the caller graph for this function:

◆ getName()

ilCourseArchives::getName ( )

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

137 {
138 return $this->archive_name;
139 }

References $archive_name.

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

+ Here is the caller graph for this function:

◆ getPublicArchives()

ilCourseArchives::getPublicArchives ( )

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

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

◆ getSize()

ilCourseArchives::getSize ( )

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

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

References $archive_size.

Referenced by add().

+ Here is the caller graph for this function:

◆ getType()

ilCourseArchives::getType ( )

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

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

Referenced by add().

+ Here is the caller graph for this function:

◆ ilCourseArchives()

ilCourseArchives::ilCourseArchives ( $course_obj)

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

58 {
60
61 $this->ilias =& $ilias;
62 $this->ilErr =& $ilErr;
63 $this->ilDB =& $ilDB;
64 $this->lng =& $lng;
65 $this->tree =& $tree;
66
67 $this->ARCHIVE_XML = 1;
68 $this->ARCHIVE_HTML = 2;
69 $this->ARCHIVE_PDF = 3;
70
71 $this->course_obj =& $course_obj;
72
73 $this->__read();
74 }

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

+ Here is the call graph for this function:

◆ initCourseFilesObject()

ilCourseArchives::initCourseFilesObject ( )

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

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

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

+ Here is the caller graph for this function:

◆ initCourseXMLWriter()

ilCourseArchives::initCourseXMLWriter ( )

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

298 {
299 if(!is_object($this->course_xml_writer))
300 {
301 include_once "./Modules/Course/classes/class.ilCourseXMLWriter.php";
302 $this->course_xml_writer =& new ilCourseXMLWriter($this->course_obj);
303 }
304 return true;
305 }

Referenced by addXML().

+ Here is the caller graph for this function:

◆ setDate()

ilCourseArchives::setDate (   $a_date)

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

116 {
117 $this->archive_date = $a_date;
118 }

Referenced by addHTML(), and addXML().

+ Here is the caller graph for this function:

◆ setLanguage()

ilCourseArchives::setLanguage (   $a_lang_code)

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

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

◆ setName()

ilCourseArchives::setName (   $a_name)

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

133 {
134 $this->archive_name = $a_name;
135 }

Referenced by addHTML(), and addXML().

+ Here is the caller graph for this function:

◆ setSize()

ilCourseArchives::setSize (   $a_size)

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

125 {
126 $this->archive_size = $a_size;
127 }

Referenced by addHTML(), and addXML().

+ Here is the caller graph for this function:

◆ setType()

ilCourseArchives::setType (   $a_type)

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

107 {
108 $this->archive_type = $a_type;
109 }

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 ilCourseArchives().

◆ $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 __read(), add(), delete(), and ilCourseArchives().

◆ $ilErr

ilCourseArchives::$ilErr

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

Referenced by ilCourseArchives().

◆ $ilias

ilCourseArchives::$ilias

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

Referenced by __addCourseHTML(), and ilCourseArchives().

◆ $lng

ilCourseArchives::$lng

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

Referenced by __addCourseHTML(), and ilCourseArchives().

◆ $tree

ilCourseArchives::$tree

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

Referenced by ilCourseArchives().


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