ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjDlBookGUI Class Reference

Class ilObjDlBookGUI. More...

+ Inheritance diagram for ilObjDlBookGUI:
+ Collaboration diagram for ilObjDlBookGUI:

Public Member Functions

 ilObjDlBookGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor. More...
 
 assignObject ()
 
 showCitation ($page_xml)
 
 showAbstract ($a_target_id)
 show abstract of digilib book More...
 
 export ()
 exports the digi-lib-object into a xml structure More...
 
 offlineexportform ()
 print export-form to screen More...
 
 setilCitationMenu ()
 
 setilLMMenu ()
 digilib book menu More...
 
 properties ()
 
 addTranslation ()
 
 deleteTranslation ()
 
 showTranslationSelect ($a_result)
 
 searchTranslation ($a_search_str)
 
 getContextPath ($a_endnode_id, $a_startnode_id=1)
 
 __checkCitationPost (&$message)
 
 __parseCitationPost ()
 
 __applyCitationText ($page_xml, $a_start, $a_end)
 
- Public Member Functions inherited from ilObjContentObjectGUI
 ilObjContentObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=false)
 Constructor. More...
 
executeCommand ()
 execute command More...
 
 _forwards ()
 
 properties ()
 edit properties form More...
 
 initPropertiesForm ()
 Init properties form. More...
 
 getPropertiesFormValues ()
 Get values for properties form. More...
 
 saveProperties ()
 save properties More...
 
 editStyleProperties ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyle ()
 Create Style. More...
 
 editStyle ()
 Edit Style. More...
 
 deleteStyle ()
 Delete Style. More...
 
 saveStyleSettings ()
 Save style settings. More...
 
 initMenuForm ()
 Init menu form. More...
 
 editMenuProperties ()
 Edit menu properies. More...
 
 saveMenuProperties ()
 save properties More...
 
 explorer ()
 output explorer tree More...
 
 popup ()
 popup window for wysiwyg editor More...
 
 proceedDragDrop ()
 proceed drag and drop operations on pages/chapters More...
 
 initImportForm ()
 Init import form. More...
 
 addBibItemObject ($a_target="")
 add bib item (admin call) More...
 
 addBibItem ()
 add bib item (module call) More...
 
 deleteBibItemObject ($a_target="")
 delete bib item (admin call) More...
 
 deleteBibItem ()
 delete bib item (module call) More...
 
 editBibItemObject ($a_target="")
 edit bib items (admin call) More...
 
 editBibItem ()
 edit bib items (module call) More...
 
 saveBibItemObject ($a_target="")
 save bib item (admin call) More...
 
 saveBibItem ()
 save bib item (module call) More...
 
 exportObject ()
 export object More...
 
 importObject ()
 display dialogue for importing XML-LeaningObjects More...
 
 importFileObject ()
 display status information or report errors messages in case of error More...
 
 chapters ()
 show chapters More...
 
 pages ()
 
 listLinks ()
 List all broken links. More...
 
 showMaintenance ()
 Show maintenance. More...
 
 activatePages ()
 activates or deactivates pages More...
 
 pastePage ()
 paste page More...
 
 copyPage ()
 copy page More...
 
 delete ($a_parent_subobj_id=0)
 confirm deletion screen for page object and structure object deletion More...
 
 cancelDelete ()
 cancel delete More...
 
 confirmedDelete ($a_parent_subobj_id=0)
 delete page object or structure objects More...
 
 getContextPath ($a_endnode_id, $a_startnode_id=1)
 get context path in content object tree More...
 
 showActions ($a_actions)
 show possible action (form buttons) More...
 
 perm ()
 edit permissions More...
 
 permSave ()
 save permissions More...
 
 info ()
 info permissions More...
 
 addRole ()
 add local role More...
 
 owner ()
 show owner of content object More...
 
 view ()
 view content object More...
 
 moveChapter ($a_parent_subobj_id=0)
 move a single chapter (selection) More...
 
 copyChapter ($a_parent_subobj_id=0)
 copy a single chapter (selection) More...
 
 pasteChapter ($a_parent_subobj_id=0)
 paste chapter More...
 
 movePage ()
 move page More...
 
 cancel ()
 cancel action More...
 
 export ()
 export content object More...
 
 getPublicAccessColValue ($a_type, $a_file)
 Get public access value for export table. More...
 
 publishExportFile ($a_files)
 download export file More...
 
 downloadPDFFile ()
 download export file More...
 
 fixTreeConfirm ()
 confirm screen for tree fixing More...
 
 fixTree ()
 Fix tree. More...
 
 setilLMMenu ($a_offline=false, $a_export_format="", $a_active="content", $a_use_global_tabs=false, $a_as_subtabs=false, $a_cur_page=0)
 get lm menu html More...
 
 createPDF ()
 export content object More...
 
 exportHTML ()
 create html package More...
 
 exportSCORM ()
 create scorm package More...
 
 addLocations ($a_omit_obj_id=false)
 display locator More...
 
 listQuestions ()
 List questions. More...
 
 setTabs ($a_act="")
 output tabs More...
 
 setContentSubTabs ($a_active)
 Set pages tabs. More...
 
 addTabs ($a_act="")
 Adds tabs. More...
 
 setSubTabs ($a_active)
 Set sub tabs. More...
 
 editPublicSection ()
 
 savePublicSection ()
 
 history ()
 history More...
 
 formatInvalidLinkArray (Array $row)
 
 linkChecker ()
 
 saveLinkCheck ()
 
 refreshLinkCheck ()
 
 __initLinkChecker ()
 
 __initLMMenuEditor ()
 
 addMenuEntry ()
 display add menu entry form More...
 
 initMenuEntryForm ($a_mode="edit")
 Init menu entry form. More...
 
 saveMenuEntry ()
 save new menu entry More...
 
 deleteMenuEntry ()
 drop a menu entry More...
 
 editMenuEntry ()
 edit menu entry form More...
 
 updateMenuEntry ()
 update a menu entry More...
 
 showEntrySelector ()
 
 selectHeader ()
 select page as header More...
 
 selectFooter ()
 select page as footer More...
 
 saveAllTitles ()
 Save all titles of chapters/pages. More...
 
 insertChapter ()
 Insert (multiple) chapters at node. More...
 
 insertChapterClip ()
 Insert Chapter from clipboard. More...
 
 _goto ($a_target)
 redirect script More...
 
 cutItems ($a_return="chapters")
 Copy items to clipboard, then cut them from the current tree. More...
 
 copyItems ()
 Copy items to clipboard. More...
 
 cutChapter ()
 Cut chapter(s) More...
 
 showExportIDsOverview ($a_validation=false)
 Show export IDs overview. More...
 
 filterHelpChapters ()
 Filter help chapters. More...
 
 saveExportIds ()
 Save export IDs. More...
 
 saveHelpMapping ()
 Save help mapping. More...
 
 showTooltipList ()
 Show export IDs overview. More...
 
 addTooltip ()
 Add tooltip. More...
 
 filterTooltips ()
 Filter tooltips. More...
 
 saveTooltips ()
 Save tooltips. More...
 
 deleteTooltips ()
 Delete tooltips. More...
 
 setPageLayoutInHierarchy ()
 Set layout for multipl pages. More...
 
 setPageLayout ($a_in_hierarchy=false)
 Set layout for multipl pages. More...
 
 initSetPageLayoutForm ()
 Init set page layout form. More...
 
 savePageLayout ()
 Save page layout. More...
 
 editGlossaries ()
 Edit automatically linked glossaries. More...
 
 showLMGlossarySelector ()
 Select LM Glossary. More...
 
 confirmGlossarySelection ()
 Confirm glossary selection. More...
 
 selectLMGlossaryLink ()
 Select a glossary and link all its terms. More...
 
 selectLMGlossary ()
 Select lm glossary. More...
 
 removeLMGlossary ()
 Remove lm glossary. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 switchToLanguage ()
 Switch to language. More...
 
 redrawHeaderAction ()
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjContentObjectGUI
static getMultiLangHeader ($a_lm_id, $a_gui_class)
 Get multi lang header. More...
 
static getLayoutOption ($a_txt, $a_var, $a_def_option="")
 Save help mapping. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjContentObjectGUI
 $ctrl
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Member Functions inherited from ilObjContentObjectGUI
 initCreationForms ($a_new_type)
 
 afterSave (ilObject $a_new_object)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Detailed Description

Member Function Documentation

◆ __applyCitationText()

ilObjDlBookGUI::__applyCitationText (   $page_xml,
  $a_start,
  $a_end 
)

Definition at line 642 of file class.ilObjDlBookGUI.php.

References ilObjectGUI\$tpl, xslt_create(), and xslt_process().

Referenced by showCitation().

643  {
644  global $tpl;
645 
646  return true;
647 
648  $xsl = file_get_contents($tpl->tplPath."/tpl.citation_paragraph.xsl");
649  $args = array( '/_xml' => $page_xml, '/_xsl' => $xsl );
650  $xh = xslt_create();
651  $params = array ('start_id' => $a_start,
652  'end_id' => $a_end);
653 
654  $output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
655 
656  return $output;
657  }
xslt_create()
xslt_process(&$proc, $xml_var, $xslt_var, $dummy, $args, $params, $a_no_warnings=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __checkCitationPost()

ilObjDlBookGUI::__checkCitationPost ( $message)

Definition at line 588 of file class.ilObjDlBookGUI.php.

References $_POST.

589  {
590  if(!$_POST["pgt_id"])
591  {
592  $message = "SELECT ONE<br />";
593  return false;
594  }
595  return true;
596  }
$_POST['username']
Definition: cron.php:12

◆ __parseCitationPost()

ilObjDlBookGUI::__parseCitationPost ( )

Definition at line 598 of file class.ilObjDlBookGUI.php.

References $_POST.

Referenced by showCitation().

599  {
600  if(!is_array($_POST["pgt_id"]))
601  {
602  return array();
603  }
604  foreach($_POST["pgt_id"] as $key => $id)
605  {
606  switch($_POST["ct_option"][$key])
607  {
608  case "single":
609  $output[] = array("text" => $id,
610  "start" => $key,
611  "end" => $key);
612  break;
613  case "f":
614  $output[] = array("text" => $id."f",
615  "start" => $key,
616  "end" => $key);
617  break;
618  case "ff":
619  $output[] = array("text" => $id."ff",
620  "start" => $key,
621  "end" => $key);
622  break;
623  case "from":
624  $start = $id."-";
625  $start_v = $key;
626  break;
627  case "to":
628  if($start)
629  {
630  $output[] = array("text" => $start."".$id,
631  "start" => $start_v,
632  "end" => $key);
633  }
634  unset($start);
635  unset($start_v);
636  break;
637  }
638  }
639  return $output ? $output : array();
640  }
$_POST['username']
Definition: cron.php:12
+ Here is the caller graph for this function:

◆ addTranslation()

ilObjDlBookGUI::addTranslation ( )

Definition at line 423 of file class.ilObjDlBookGUI.php.

References $_POST, $result, exit, searchTranslation(), ilUtil\sendFailure(), ilUtil\sendSuccess(), ilObjectGUI\setTabs(), and showTranslationSelect().

424  {
425  $this->setTabs();
426 
427  // SEARCH CANCELED
428  if(isset($_POST["cancel"]))
429  {
430  $this->ctrl->redirect($this, "properties");
431  exit;
432  }
433  if(isset($_POST["select"]))
434  {
435  if(is_array($_POST["id"]))
436  {
437  foreach($_POST["id"] as $id)
438  {
439  if($id != $this->object->getRefId())
440  {
441  $this->object->addTranslation($id);
442  }
443  }
444  ilUtil::sendSuccess($this->lng->txt("cont_translations_assigned"),true);
445  $this->ctrl->redirect($this, "properties");
446  exit;
447  }
448  }
449  $show_search = true;
450 
451  $this->tpl->addBlockfile("ADM_CONTENT","adm_content","tpl.dbk_search_translation.html","Modules/LearningModule");
452  $this->tpl->setVariable("F_ACTION",
453  $this->ctrl->getLinkTarget($this, "addTranslation"));
454 
455  if($_POST["search_str"])
456  {
457  $result = $this->searchTranslation($_POST["search_str"]);
458 
459  switch(count($result["meta"]))
460  {
461  case 0:
462  ilUtil::sendFailure($this->lng->txt("cont_no_object_found"));
463  break;
464  case 1:
465  if($result["meta"][0]["id"] == $this->object->getRefId())
466  {
467  ilUtil::sendFailure($this->lng->txt("cont_no_assign_itself"));
468  break;
469  }
470  default:
472  $show_search = false;
473  break;
474  }
475  }
476  if($show_search)
477  {
478  $this->lng->loadLanguageModule("search");
479 
480  $this->tpl->setVariable("SEARCH_TXT",$this->lng->txt("cont_insert_search"));
481  $this->tpl->setVariable("SEARCH_ASSIGN_TR",$this->lng->txt("cont_assign_translation"));
482  $this->tpl->setVariable("SEARCH_SEARCH_TERM",$this->lng->txt("search_search_term"));
483  $this->tpl->setVariable("BTN1_VALUE",$this->lng->txt("search"));
484  $this->tpl->setVariable("BTN2_VALUE",$this->lng->txt("cancel"));
485  }
486 
487  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
exit
Definition: login.php:54
$_POST['username']
Definition: cron.php:12
$result
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
showTranslationSelect($a_result)
searchTranslation($a_search_str)
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ assignObject()

ilObjDlBookGUI::assignObject ( )

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

Referenced by ilObjDlBookGUI().

62  {
63  include_once("./Modules/LearningModule/classes/class.ilObjDlBook.php");
64 
65  $this->link_params = "ref_id=".$this->ref_id;
66  $this->object =& new ilObjDlBook($this->id, true);
67  }
Class ilObjDlBook.
+ Here is the caller graph for this function:

◆ deleteTranslation()

ilObjDlBookGUI::deleteTranslation ( )

Definition at line 489 of file class.ilObjDlBookGUI.php.

References $_POST, exit, ilUtil\sendFailure(), and ilUtil\sendSuccess().

490  {
491  if(!$_POST["id"])
492  {
493  ilUtil::sendFailure($this->lng->txt("cont_select_one_translation"));
494  $this->ctrl->redirect($this, "properties");
495  exit;
496  }
497  $this->object->deleteTranslations($_POST["id"]);
498  ilUtil::sendSuccess($this->lng->txt("cont_assignments_deleted"));
499  $this->ctrl->redirect($this, "properties");
500  exit;
501  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
exit
Definition: login.php:54
$_POST['username']
Definition: cron.php:12
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ export()

ilObjDlBookGUI::export ( )

exports the digi-lib-object into a xml structure

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

References $_GET.

266  {
267  // BASE CLASS objectGUI IS INSTATIATING $this->object
268  #$this->object =& new ilObjDlBook($this->id, true);
269  $this->object->export($_GET["ref_id"]);
270  }
$_GET["client_id"]

◆ getContextPath()

ilObjDlBookGUI::getContextPath (   $a_endnode_id,
  $a_startnode_id = 1 
)

Definition at line 561 of file class.ilObjDlBookGUI.php.

References $path, and ilObjectGUI\$tree.

Referenced by showTranslationSelect().

562  {
563  $path = "";
564 
565  include_once("./Services/Tree/classes/class.ilTree.php");
566 
567  $tree = new ilTree(1);
568 
569  if(!$tree->isInTree($a_startnode_id) or !$tree->isInTree($a_endnode_id))
570  {
571  return '';
572  }
573  $tmpPath = $tree->getPathFull($a_endnode_id, $a_startnode_id);
574 
575  // count -1, to exclude the learning module itself
576  for ($i = 1; $i < (count($tmpPath) - 1); $i++)
577  {
578  if ($path != "")
579  {
580  $path .= " > ";
581  }
582 
583  $path .= $tmpPath[$i]["title"];
584  }
585  return $path;
586  }
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
$path
Definition: index.php:22
+ Here is the caller graph for this function:

◆ ilObjDlBookGUI()

ilObjDlBookGUI::ilObjDlBookGUI (   $a_data,
  $a_id = 0,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor.

public

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

References assignObject().

48  {
49  $this->type = "dbk";
50  parent::ilObjContentObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
51  # BETTER DO IT HERE THAN IN PARENT CLASS ( PROBLEMS FOR import, create)
52  $this->assignObject();
53 
54  // SAME REASON
55  if($a_id != 0)
56  {
57  $this->lm_tree =& $this->object->getLMTree();
58  }
59  }
+ Here is the call graph for this function:

◆ offlineexportform()

ilObjDlBookGUI::offlineexportform ( )

print export-form to screen

Parameters

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

References $_GET.

280  {
281  $this->tpl->addBlockfile("CONTENT", "offline_content", "tpl.offline_export.html", "Modules/LearningModule");
282  $this->tpl->touchBlock("offline_content");
283 
284  $this->tpl->setVariable("TXT_TYPE","Export-Type");
285 
286  if ($_GET["print"]==1)
287  {
288  $this->tpl->setVariable("TXT_ACTION","Digilib-Book - print");
289  $this->tpl->setVariable("TXT_PRINTEXPORT",$this->lng->txt("Print") );
290  $this->tpl->setVariable("PRINT_CHECKED","checked");
291  $this->tpl->setVariable("EXPORT_TARGET","_blank");
292  }
293  else
294  {
295  $this->tpl->setVariable("TXT_ACTION","Digilib-Book - download");
296  $this->tpl->setVariable("TXT_HTMLEXPORT",$this->lng->txt("HTML export") );
297  $this->tpl->setVariable("TXT_PDFEXPORT",$this->lng->txt("PDF export") );
298  $this->tpl->setVariable("TXT_XMLEXPORT",$this->lng->txt("XML export (only complete book)") );
299  $this->tpl->setVariable("OFFLINE_CHECKED","checked");
300  }
301 
302  $this->tpl->setVariable("TXT_PAGES",$this->lng->txt("Pages") );
303  $this->tpl->setVariable("TXT_PAGESALL",$this->lng->txt("all"));
304  $this->tpl->setVariable("TXT_PAGESCHAPTER",$this->lng->txt("chapter") );
305  if ($_GET["obj_id"] != "") $this->tpl->setVariable("TXT_PAGESPAGE",$this->lng->txt("this page"));
306  $this->tpl->setVariable("TXT_PAGESFROM",$this->lng->txt("pages from") );
307  $this->tpl->setVariable("TXT_PAGESTO",$this->lng->txt("to") );
308 
309  $this->tpl->setVariable("BTN_VALUE",$this->lng->txt("start export") );
310  $this->tpl->setVariable("BTN_C_VALUE",$this->lng->txt("cancel") );
311 
312  $this->ctrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
313  $this->tpl->setVariable("EXPORT_ACTION",
314  $this->ctrl->getLinkTargetByClass("illmpresentationgui", "offlineexport"));
315  $this->ctrl->clearParametersByClass("illmpresentationgui");
316  $this->tpl->show();
317 
318  }
$_GET["client_id"]

◆ properties()

ilObjDlBookGUI::properties ( )

Definition at line 393 of file class.ilObjDlBookGUI.php.

References ilObjectFactory\getInstanceByRefId().

394  {
395  // OVERWRITTEN METHOD, TO ADD TRANSLATIONS
396  parent::properties();
397 
398  // BUTTONS
399  $this->tpl->setVariable("BTN1_NAME","addTranslation");
400  $this->tpl->setVariable("BTN1_TEXT",$this->lng->txt("cont_new_assignment"));
401 
402  if($trs = $this->object->getTranslations())
403  {
404  include_once "./Services/Object/classes/class.ilObjectFactory.php";
405  foreach($trs as $tr)
406  {
407  $tmp_obj = ilObjectFactory::getInstanceByRefId($tr);
408  $this->tpl->setCurrentBlock("TRANSLATION_ROW");
409  $this->tpl->setVariable("ROW_ID",$tr);
410  $this->tpl->setVariable("ROW_TITLE",$tmp_obj->getTitle());
411  $this->tpl->parseCurrentBlock();
412 
413  unset($tmp_obj);
414  }
415  $this->tpl->setVariable("BTN2_NAME","deleteTranslation");
416  $this->tpl->setVariable("BTN2_TEXT",$this->lng->txt("cont_del_assignment"));
417  }
418  $this->tpl->setCurrentBlock("TRANSLATION");
419  $this->tpl->setVariable("TRANSLATION_HEADER",$this->lng->txt("cont_translations"));
420  $this->tpl->parseCurrentBlock();
421  }
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:

◆ searchTranslation()

ilObjDlBookGUI::searchTranslation (   $a_search_str)

Definition at line 536 of file class.ilObjDlBookGUI.php.

References $_POST, $_SESSION, exit, and ilUtil\sendInfo().

Referenced by addTranslation().

537  {
538  include_once("./Services/Search/classes/class.ilSearch.php");
539 
540  $search =& new ilSearch($_SESSION["AccountId"]);
541  $search->setPerformUpdate(false);
542  $search->setSearchString($_POST["search_str"]);
543  $search->setCombination("and");
544  $search->setSearchFor(array(0 => 'dbk'));
545  $search->setSearchIn(array('dbk' => 'meta'));
546  $search->setSearchType('new');
547 
548  if($search->validate($message))
549  {
550  $search->performSearch();
551  }
552  else
553  {
554  ilUtil::sendInfo($message,true);
555  $this->ctrl->redirect($this, "addTranslation");
556  exit;
557  }
558  return $search->getResultByType('dbk');
559  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
exit
Definition: login.php:54
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setilCitationMenu()

ilObjDlBookGUI::setilCitationMenu ( )

Definition at line 319 of file class.ilObjDlBookGUI.php.

References $_GET.

320  {
321  include_once("./Services/UICore/classes/class.ilTemplate.php");
322 
323  $tpl_menu =& new ilTemplate("tpl.buttons.html",true,true);
324 
325  $tpl_menu->setCurrentBlock("btn_cell");
326 
327  #$tpl_menu->setVariable("BTN_LINK","./ilias.php?frame=maincontent&ref_id=".$_GET["ref_id"].
328  #"&obj_id=".$_GET["obj_id"]);
329  $this->ctrl->setParameterByClass('illmpresentationgui','frame','maincontent');
330  $this->ctrl->setParameterByClass('illmpresentationgui','obj_id',(int) $_GET['obj_id']);
331  $tpl_menu->setVariable('BTN_LINK',$this->ctrl->getLinkTargetByClass('illmpresentationgui','layout'));
332  $tpl_menu->setVariable("BTN_TXT",$this->lng->txt("back"));
333  $tpl_menu->parseCurrentBlock();
334 
335  $tpl_menu->setCurrentBlock("btn_row");
336  $tpl_menu->parseCurrentBlock();
337 
338  return $tpl_menu->get();
339  }
$_GET["client_id"]
special template class to simplify handling of ITX/PEAR

◆ setilLMMenu()

ilObjDlBookGUI::setilLMMenu ( )

digilib book menu

Definition at line 345 of file class.ilObjDlBookGUI.php.

References $_GET, and $_POST.

346  {
347  include_once("./Services/UICore/classes/class.ilTemplate.php");
348 
349  $tpl_menu =& new ilTemplate("tpl.lm_menu.html", true, true, "Modules/LearningModule");
350 
351  $tpl_menu->setCurrentBlock("lm_menu_btn");
352 
353  // menu for abstract page
354  if ($_POST["action"]=="details" && count($_POST["target"])==1)
355  {
356  $this->ctrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
357  $tpl_menu->setVariable("BTN_LINK",
358  $this->ctrl->getLinkTargetByClass("illmpresentationgui", "exportbibinfo"));
359  $tpl_menu->setVariable("BTN_TXT",$this->lng->txt("download"));
360  $tpl_menu->parseCurrentBlock();
361 
362  $this->ctrl->setParameterByClass("illmpresentationgui", "print", "1");
363  $tpl_menu->setVariable("BTN_LINK",
364  $this->ctrl->getLinkTargetByClass("illmpresentationgui", "exportbibinfo"));
365  $tpl_menu->setVariable("BTN_TXT",$this->lng->txt("print"));
366  $tpl_menu->parseCurrentBlock();
367  $this->ctrl->clearParametersByClass("illmpresentationgui");
368  }
369  else
370  {
371  // menu for normal pages
372  $this->ctrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
373  $tpl_menu->setVariable("BTN_LINK",
374  $this->ctrl->getLinkTargetByClass("illmpresentationgui", "offlineexportform"));
375  $tpl_menu->setVariable("BTN_TXT",$this->lng->txt("download"));
376  $tpl_menu->parseCurrentBlock();
377 
378  $this->ctrl->setParameterByClass("illmpresentationgui", "print", "1");
379  $tpl_menu->setVariable("BTN_LINK",
380  $this->ctrl->getLinkTargetByClass("illmpresentationgui", "offlineexportform"));
381  $tpl_menu->setVariable("BTN_TXT",$this->lng->txt("print") );
382  $tpl_menu->parseCurrentBlock();
383 
384  $this->ctrl->clearParametersByClass("illmpresentationgui");
385  }
386  $tpl_menu->setCurrentBlock("btn_row");
387  $tpl_menu->parseCurrentBlock();
388 
389  return $tpl_menu->get();
390 
391  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
special template class to simplify handling of ITX/PEAR

◆ showAbstract()

ilObjDlBookGUI::showAbstract (   $a_target_id)

show abstract of digilib book

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

References $_POST, ilObjStyleSheet\getContentStylePath(), ilObjectFactory\getInstanceByRefId(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), ilUtil\sendInfo(), xslt_create(), and xslt_process().

130  {
131  if(count($_POST["tr_id"]) > 1)
132  {
133  $message = true;
134  $message_text = $this->lng->txt("cont_select_one_translation_warning");
135  $show_full = false;
136  }
137  else if(!$a_target_id and ($_POST["action"] == "show" or $_POST["action"] == "details"))
138  {
139  $message = true;
140  $message_text = $this->lng->txt("cont_select_one_edition");
141  $show_full = false;
142  }
143  else if(is_array($a_target_id) and count($a_target_id) > 1)
144  {
145  $message = true;
146  $message_text = $this->lng->txt("cont_msg_multiple_editions");
147  $show_full = false;
148  }
149  else if(is_array($a_target_id))
150  {
151  $a_target_id = $a_target_id[0];
152  $show_full = true;
153  }
154  else
155  {
156  $a_target_id = 0;
157  $show_full = false;
158  }
159 
160  $this->object->initBibItemObject();
161 
162  // content style
163  $this->tpl->setCurrentBlock("ContentStyle");
164  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
165  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
166  $this->tpl->parseCurrentBlock();
167 
168  // syntax style
169  $this->tpl->setCurrentBlock("SyntaxStyle");
170  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
172  $this->tpl->parseCurrentBlock();
173 
174  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
175  $this->tpl->setCurrentBlock("ilPage");
176 
177  $tmp_tpl = new ilTemplate("tpl.bibliography.xsl",true,true,"Modules/LearningModule");
178  $tmp_tpl->setVariable("TITLE",$this->lng->txt("title"));
179  $tmp_tpl->setVariable("EDITION",$this->lng->txt("cont_edition"));
180  $tmp_tpl->setVariable("AUTHORS",$this->lng->txt("authors"));
181 
182  if($show_full)
183  {
184  $this->ctrl->setParameterByClass("illmpresentationgui", "frame", "maincontent");
185  $action = $this->ctrl->getLinkTargetByClass("illmpresentationgui", "layout");
186  $params = array ('mode' => "view_full",
187  'action' => $action,
188  'target_id' => "$a_target_id");
189 
190  $tmp_tpl->setVariable("BOOKTITLE",$this->lng->txt("cont_booktitle"));
191  $tmp_tpl->setVariable("CROSS_REFERENCE",$this->lng->txt("cont_cross_reference"));
192  $tmp_tpl->setVariable("DETAILS",$this->lng->txt("cont_details"));
193  $tmp_tpl->setVariable("EDITOR",$this->lng->txt("editor"));
194  $tmp_tpl->setVariable("HOW_PUBLISHED",$this->lng->txt("cont_how_published"));
195  $tmp_tpl->setVariable("WHERE_PUBLISHED",$this->lng->txt("cont_where_published"));
196  $tmp_tpl->setVariable("INSTITUTION",$this->lng->txt("institution"));
197  $tmp_tpl->setVariable("JOURNAL",$this->lng->txt("cont_journal"));
198  $tmp_tpl->setVariable("KEYWORD",$this->lng->txt("cont_keyword"));
199  $tmp_tpl->setVariable("PAGES",$this->lng->txt("cont_pages"));
200  $tmp_tpl->setVariable("SCHOOL",$this->lng->txt("cont_school"));
201  $tmp_tpl->setVariable("MONTH",$this->lng->txt("cont_month"));
202  $tmp_tpl->setVariable("PUBLISHER",$this->lng->txt("cont_publisher"));
203  $tmp_tpl->setVariable("SERIES",$this->lng->txt("cont_series"));
204  $tmp_tpl->setVariable("SERIES_TITLE",$this->lng->txt("cont_series_title"));
205  $tmp_tpl->setVariable("SERIES_EDITOR",$this->lng->txt("cont_series_editor"));
206  $tmp_tpl->setVariable("SERIES_VOLUME",$this->lng->txt("cont_series_volume"));
207  $tmp_tpl->setVariable("YEAR",$this->lng->txt("cont_year"));
208  $tmp_tpl->setVariable("ISBN",$this->lng->txt("cont_isbn"));
209  $tmp_tpl->setVariable("URL",$this->lng->txt("cont_url"));
210  }
211  else
212  {
213  $this->ctrl->setParameterByClass("illmpresentationgui", "frame", "maincontent");
214  $action = $this->ctrl->getLinkTargetByClass("illmpresentationgui", "layout");
215  $params = array ('mode' => "view_simple",
216  'action' => $action);
217  $this->ctrl->clearParametersByClass("illmpresentationgui");
218  if($translations = $this->object->getTranslations())
219  {
220  foreach($translations as $tr_id)
221  {
222  $tmp_obj = ilObjectFactory::getInstanceByRefId($tr_id);
223 
224  $tmp_tpl->setCurrentBlock("TRANSLATION_ROW");
225  $tmp_tpl->setVariable("ROW_TITLE",$tmp_obj->getTitle());
226  $tmp_tpl->setVariable("ROW_ID",$tr_id);
227  $tmp_tpl->parseCurrentBlock();
228  unset($tmp_obj);
229  }
230  $tmp_tpl->setCurrentBlock("TRANSLATION");
231  $tmp_tpl->setVariable("TRANSLATION_HEADER",$this->lng->txt("cont_translations"));
232  $tmp_tpl->parseCurrentBlock();
233  }
234  $tmp_tpl->setVariable("DETAILS",$this->lng->txt("cont_details"));
235  $tmp_tpl->setVariable("SHOW",$this->lng->txt("cont_show"));
236  $tmp_tpl->setVariable("SHOW_CITATION",$this->lng->txt("cont_show_citation"));
237  $tmp_tpl->setVariable("GO",$this->lng->txt("go"));
238  }
239 
240  // SHOW MESSAGE
241  if($message)
242  {
243  ilUtil::sendInfo($message_text);
244  }
245  $xsl = $tmp_tpl->get();
246  $xml = $this->object->bib_obj->getXML();
247 
248  if(empty($xml))
249  {
250  return true;
251  }
252  $args = array( '/_xml' => $xml, '/_xsl' => $xsl );
253  $xh = xslt_create();
254 
255 
256  $output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
257  $this->tpl->setVariable("PAGE_CONTENT",$output);
258 
259  return $output;
260  }
xslt_create()
$_POST['username']
Definition: cron.php:12
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
getSyntaxStylePath()
get syntax style path
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
xslt_process(&$proc, $xml_var, $xslt_var, $dummy, $args, $params, $a_no_warnings=false)
special template class to simplify handling of ITX/PEAR
getContentStylePath($a_style_id)
get content style path
+ Here is the call graph for this function:

◆ showCitation()

ilObjDlBookGUI::showCitation (   $page_xml)

Definition at line 70 of file class.ilObjDlBookGUI.php.

References $_GET, $_SESSION, ilObjectGUI\$data, __applyCitationText(), __parseCitationPost(), ilObjStyleSheet\getContentStylePath(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), xslt_create(), and xslt_process().

71  {
72  // content style
73  $this->tpl->setCurrentBlock("ContentStyle");
74  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
75  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
76  $this->tpl->parseCurrentBlock();
77 
78  // syntax style
79  $this->tpl->setCurrentBlock("SyntaxStyle");
80  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
82  $this->tpl->parseCurrentBlock();
83 
84  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
85 
86  $parsed_post = $this->__parseCitationPost();
87  if(!count($parsed_post))
88  {
89  $_SESSION["citation_error"] = 1;
90 
91  $this->ctrl->setParameterByClass('illmpresentationgui','frame','maincontent');
92  $this->ctrl->setParameterByClass('illmpresentationgui','obj_id',(int) $_GET['obj_id']);
93  $this->ctrl->redirectByClass('illmpresentationgui','layout');
94  }
95  $tmp_tpl = new ilTemplate("tpl.citation.xsl",true,true,"Modules/LearningModule");
96  $tmp_tpl->setVariable("CITATIONS",$this->lng->txt("cont_citations"));
97 
98  foreach($parsed_post as $key => $data)
99  {
100  $tmp_tpl->setCurrentBlock("citation_row");
101  $tmp_tpl->setVariable("CITATION",$this->__applyCitationText($page_xml,$data["start"],$data["end"]));
102  $tmp_tpl->setVariable("PAGES_ROW",$data["text"]);
103  $tmp_tpl->parseCurrentBlock();
104  }
105  $xsl = $tmp_tpl->get();
106 
107  $this->object->initBibItemObject();
108  $xml = $this->object->bib_obj->getXML();
109  if(empty($xml))
110  {
111  return true;
112  }
113  $args = array( '/_xml' => $xml, '/_xsl' => $xsl );
114  $xh = xslt_create();
115  $params = array ('target_id' => $_SESSION["bib_id"]);
116 
117  $output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
118 
119  $this->tpl->setCurrentBlock("ilPage");
120  $this->tpl->setVariable("PAGE_CONTENT",$output);
121  $this->tpl->parseCurrentBlock();
122 
123  return true;
124  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
xslt_create()
__applyCitationText($page_xml, $a_start, $a_end)
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
getSyntaxStylePath()
get syntax style path
xslt_process(&$proc, $xml_var, $xslt_var, $dummy, $args, $params, $a_no_warnings=false)
special template class to simplify handling of ITX/PEAR
getContentStylePath($a_style_id)
get content style path
+ Here is the call graph for this function:

◆ showTranslationSelect()

ilObjDlBookGUI::showTranslationSelect (   $a_result)

Definition at line 503 of file class.ilObjDlBookGUI.php.

References $path, getContextPath(), and ilObjectFactory\getInstanceByRefId().

Referenced by addTranslation().

504  {
505  include_once "./Services/Object/classes/class.ilObjectFactory.php";
506 
507  foreach($a_result["meta"] as $book)
508  {
509  if(!($path = $this->getContextPath($book["id"])))
510  {
511  continue;
512  }
513  $tmp_obj = ilObjectFactory::getInstanceByRefId($book["id"]);
514 
515  $this->tpl->setCurrentBlock("TR_SELECT_ROW");
516  $this->tpl->setVariable("ROW_ID",$book["id"]);
517  $this->tpl->setVariable("ROW_TITLE",$tmp_obj->getTitle());
518  $this->tpl->setVariable("ROW_DESCRIPTION",$tmp_obj->getDescription());
519  $this->tpl->setVariable("ROW_KONTEXT",$path);
520  $this->tpl->parseCurrentBlock();
521 
522  unset($tmp_obj);
523  }
524  $this->tpl->setCurrentBlock("TR_SELECT");
525  $this->tpl->setVariable("SELECT_TXT",$this->lng->txt("cont_select_translation"));
526  $this->tpl->setVariable("SELECT_TITLE",$this->lng->txt("title"));
527  $this->tpl->setVariable("SELECT_DESCRIPTION",$this->lng->txt("description"));
528  $this->tpl->setVariable("SELECT_KONTEXT",$this->lng->txt("context"));
529 
530  $this->tpl->setVariable("BTN1_VALUE",$this->lng->txt("assign"));
531  $this->tpl->setVariable("BTN2_VALUE",$this->lng->txt("cancel"));
532  $this->tpl->parseCurrentBlock();
533 
534  }
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
getContextPath($a_endnode_id, $a_startnode_id=1)
$path
Definition: index.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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