ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilObjSCORMLearningModuleGUI Class Reference

Class ilObjSCORMLearningModuleGUI. More...

+ Inheritance diagram for ilObjSCORMLearningModuleGUI:
+ Collaboration diagram for ilObjSCORMLearningModuleGUI:

Public Member Functions

 ilObjSCORMLearningModuleGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor. More...
 
 assignObject ()
 assign scorm object to scorm gui object More...
 
 properties ()
 scorm module properties More...
 
 newModuleVersion ()
 upload new version of module More...
 
 getMaxFileSize ()
 
 newModuleVersionUpload ()
 
 saveProperties ()
 save properties More...
 
 showTrackingItems ()
 Show tracking table @global ilTabs $ilTabs $global ilToolbar $ilToolbar. More...
 
 deleteTrackingForUser ()
 display deletion confirmation screen More...
 
 cancelDeleteTracking ()
 cancel deletion of export files More...
 
 confirmedDeleteTracking ()
 
 cancel ()
 overwrite..jump back to trackingdata not parent More...
 
 decreaseAttempts ()
 
 setSubTabs ()
 
 cancelStopUserOfflineMode ()
 
 confirmedStopUserOfflineMode ()
 
- Public Member Functions inherited from ilObjSAHSLearningModuleGUI
 ilObjSAHSLearningModuleGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor. More...
 
executeCommand ()
 execute command More...
 
 viewObject ()
 list childs of current object More...
 
 properties ()
 module properties More...
 
 saveProperties ()
 save properties More...
 
 initCreationForms ($a_new_type)
 no manual SCORM creation, only import at the time More...
 
 initCreationForm ()
 Init form. More...
 
 initUploadForm ()
 Init upload form. More...
 
 uploadObject ()
 display status information or report errors messages in case of error More...
 
 upload ()
 
 saveObject ()
 save new learning module to db More...
 
 info ()
 permission form More...
 
 owner ()
 show owner of learning module More...
 
 getTemplate ()
 output main header (title and locator) More...
 
 setTabs ()
 output main frameset of media pool left frame: explorer tree of folders right frame: media pool content More...
 
 certificate ()
 Shows the certificate editor. More...
 
 getTabs (&$tabs_gui)
 adds tabs to tab gui object More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 editContent ()
 List files. More...
 
 setSettingsSubTabs ()
 set Tabs for settings More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access 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 @access 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...
 

Data Fields

const EXPORT_UNDEF = 0
 
const EXPORT_ALL = 1
 
const EXPORT_SELECTED = 2
 
const EXPORT_TYPE_RAW = 1
 
const EXPORT_TYPE_SUCCESS = 2
 
- 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

 showTrackingItemsBySco ()
 show tracking data More...
 
 modifyTrackingItems ()
 
 applyUserTableFilter ()
 Apply table filter. More...
 
 resetUserTableFilter ()
 Reset table filter. More...
 
 import ()
 gui functions for GUI export More...
 
 importForm ()
 Show import form. More...
 
 initImportForm ()
 Init import form. More...
 
 exportAll ()
 Show export section for all users. More...
 
 exportSelectionUsers ()
 Export selection for selected users. More...
 
 showTrackingItem ()
 show tracking data of item More...
 
 showTrackingItemSco ()
 show tracking data of item More...
 
 showTrackingItemPerUser ()
 show tracking data of item per user More...
 
 offlineModeManager ()
 Manage offline mode for users @global ilTabs $ilTabs $global ilToolbar $ilToolbar. More...
 
 stopUserOfflineMode ()
 Stop offline mode for selected users. More...
 
- 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjSAHSLearningModuleGUI
static _goto ($a_target)
 goto target course 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...
 

Detailed Description

Member Function Documentation

◆ applyUserTableFilter()

ilObjSCORMLearningModuleGUI::applyUserTableFilter ( )
protected

Apply table filter.

Definition at line 687 of file class.ilObjSCORMLearningModuleGUI.php.

688 {
689 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
690 $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
691 $tbl->writeFilterToSession();
692 $tbl->resetOffset();
693 $this->modifyTrackingItems();
694 }

References modifyTrackingItems().

+ Here is the call graph for this function:

◆ assignObject()

ilObjSCORMLearningModuleGUI::assignObject ( )

assign scorm object to scorm gui object

Reimplemented from ilObjectGUI.

Reimplemented in ilObjSCORM2004LearningModuleGUI, ilObjAICCLearningModuleGUI, and ilObjHACPLearningModuleGUI.

Definition at line 55 of file class.ilObjSCORMLearningModuleGUI.php.

56 {
57 if ($this->id != 0)
58 {
59 if ($this->call_by_reference)
60 {
61 $this->object =& new ilObjSCORMLearningModule($this->id, true);
62 }
63 else
64 {
65 $this->object =& new ilObjSCORMLearningModule($this->id, false);
66 }
67 }
68 }
Class ilObjSCORMLearningModule.

◆ cancel()

ilObjSCORMLearningModuleGUI::cancel ( )

overwrite..jump back to trackingdata not parent

Definition at line 762 of file class.ilObjSCORMLearningModuleGUI.php.

763 {
764 ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
765 $this->ctrl->redirect($this, "properties");
766 }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ cancelDeleteTracking()

ilObjSCORMLearningModuleGUI::cancelDeleteTracking ( )

cancel deletion of export files

Definition at line 747 of file class.ilObjSCORMLearningModuleGUI.php.

748 {
749 ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
750 $this->ctrl->redirect($this, "modifyTrackingItems");
751 }

References ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ cancelStopUserOfflineMode()

ilObjSCORMLearningModuleGUI::cancelStopUserOfflineMode ( )

Definition at line 1004 of file class.ilObjSCORMLearningModuleGUI.php.

1005 {
1006 ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
1007 $this->ctrl->redirect($this, "offlineModeManager");
1008 }

References ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ confirmedDeleteTracking()

ilObjSCORMLearningModuleGUI::confirmedDeleteTracking ( )

Reimplemented in ilObjSCORM2004LearningModuleGUI.

Definition at line 753 of file class.ilObjSCORMLearningModuleGUI.php.

754 {
755 $this->object->deleteTrackingDataOfUsers($_POST["user"]);
756 $this->ctrl->redirect($this, "modifyTrackingItems");
757 }
$_POST['username']
Definition: cron.php:12

References $_POST.

◆ confirmedStopUserOfflineMode()

ilObjSCORMLearningModuleGUI::confirmedStopUserOfflineMode ( )

Definition at line 1010 of file class.ilObjSCORMLearningModuleGUI.php.

1011 {
1012
1013 include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
1014 foreach($_POST["user"] as $id)
1015 {
1016 ilSCORMOfflineMode::stopOfflineModeForUser($this->object->getId(),$id);
1017 }
1018
1019 $this->offlineModeManager();
1020 }
offlineModeManager()
Manage offline mode for users @global ilTabs $ilTabs $global ilToolbar $ilToolbar.
stopOfflineModeForUser($obj_id, $user_id)

References $_POST, offlineModeManager(), and ilSCORMOfflineMode\stopOfflineModeForUser().

+ Here is the call graph for this function:

◆ decreaseAttempts()

ilObjSCORMLearningModuleGUI::decreaseAttempts ( )

Definition at line 853 of file class.ilObjSCORMLearningModuleGUI.php.

854 {
855 if (!isset($_POST["user"])) {
856 ilUtil::sendInfo($this->lng->txt("no_checkbox"),true);
857 }
858 $this->object->decreaseAttemptsForUser($_POST["user"]);
859 $this->ctrl->redirect($this, "modifyTrackingItems");
860 }

References $_POST, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ deleteTrackingForUser()

ilObjSCORMLearningModuleGUI::deleteTrackingForUser ( )

display deletion confirmation screen

Definition at line 711 of file class.ilObjSCORMLearningModuleGUI.php.

712 {
713 if(!isset($_POST["user"]))
714 {
715 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
716 }
717
718 // display confirmation message
719 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
720 $cgui = new ilConfirmationGUI();
721 $cgui->setFormAction($this->ctrl->getFormAction($this));
722 $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
723 $cgui->setCancel($this->lng->txt("cancel"), "cancelDeleteTracking");
724 $cgui->setConfirm($this->lng->txt("confirm"), "confirmedDeleteTracking");
725
726 foreach($_POST["user"] as $id)
727 {
728 if (ilObject::_exists($id) && ilObject::_lookUpType($id)=="usr" )
729 {
730 $user = new ilObjUser($id);
731
732 $caption = ilUtil::getImageTagByType("sahs", $this->tpl->tplPath).
733 " ".$this->lng->txt("cont_tracking_data").
734 ": ".$user->getLastname().", ".$user->getFirstname();
735
736
737 $cgui->addItem("user[]", $id, $caption);
738 }
739 }
740
741 $this->tpl->setContent($cgui->getHTML());
742 }
Confirmation screen class.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
redirection script todo: (a better solution should control the processing via a xml file)

References $_POST, ilObject\_exists(), and ilUtil\getImageTagByType().

+ Here is the call graph for this function:

◆ exportAll()

ilObjSCORMLearningModuleGUI::exportAll ( )
protected

Show export section for all users.

Definition at line 832 of file class.ilObjSCORMLearningModuleGUI.php.

833 {
834 $this->object->exportSelected(1);
835 }

◆ exportSelectionUsers()

ilObjSCORMLearningModuleGUI::exportSelectionUsers ( )
protected

Export selection for selected users.

Definition at line 840 of file class.ilObjSCORMLearningModuleGUI.php.

841 {
842 if(!count((array) $_POST['user']))
843 {
844 //ilUtil::sendFailure($this->lng->txt('select_one'),true);
845 ilUtil::sendInfo($this->lng->txt("no_checkbox"),true);
846 $this->ctrl->redirect($this,'modifyTrackingItems');
847 } else {
848 $this->object->exportSelected(0,$_POST["user"]);
849 }
850 }

References $_POST, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ getMaxFileSize()

ilObjSCORMLearningModuleGUI::getMaxFileSize ( )

Definition at line 351 of file class.ilObjSCORMLearningModuleGUI.php.

352 {
353 // get the value for the maximal uploadable filesize from the php.ini (if available)
354 $umf=get_cfg_var("upload_max_filesize");
355 // get the value for the maximal post data from the php.ini (if available)
356 $pms=get_cfg_var("post_max_size");
357
358 //convert from short-string representation to "real" bytes
359 $multiplier_a=array("K"=>1024, "M"=>1024*1024, "G"=>1024*1024*1024);
360
361 $umf_parts=preg_split("/(\d+)([K|G|M])/", $umf, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
362 $pms_parts=preg_split("/(\d+)([K|G|M])/", $pms, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
363
364 if (count($umf_parts) == 2) { $umf = $umf_parts[0]*$multiplier_a[$umf_parts[1]]; }
365 if (count($pms_parts) == 2) { $pms = $pms_parts[0]*$multiplier_a[$pms_parts[1]]; }
366
367 // use the smaller one as limit
368 $max_filesize=min($umf, $pms);
369
370 if (!$max_filesize) $max_filesize=max($umf, $pms);
371
372 //format for display in mega-bytes
373 return $max_filesize=sprintf("%.1f MB",$max_filesize/1024/1024);
374 }
echo;exit;}function LogoutNotification($SessionID){ global $ilDB;$q="SELECT session_id, data FROM usr_session WHERE expires > (\w+)\|/" PREG_SPLIT_NO_EMPTY PREG_SPLIT_DELIM_CAPTURE

References PREG_SPLIT_DELIM_CAPTURE.

◆ ilObjSCORMLearningModuleGUI()

ilObjSCORMLearningModuleGUI::ilObjSCORMLearningModuleGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor.

@access public

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

42 {
43 global $lng;
44
45 $lng->loadLanguageModule("content");
46 $lng->loadLanguageModule("search");
47
48 $this->type = "sahs";
49 $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
50 }
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.

References ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

+ Here is the call graph for this function:

◆ import()

ilObjSCORMLearningModuleGUI::import ( )
protected

gui functions for GUI export

Definition at line 771 of file class.ilObjSCORMLearningModuleGUI.php.

772 {
773 $form = $this->initImportForm();
774 if($form->checkInput())
775 {
776 $source = $form->getInput('csv');
777 $error = $this->object->importTrackingData($source['tmp_name']);
778 switch($error)
779 {
780 case 0 :
781 ilUtil::sendInfo('Tracking data imported', true);
782 $this->ctrl->redirect($this, "showTrackingItems");
783 break;
784 case -1 :
785 ilUtil::sendInfo($this->lng->txt('err_check_input'));
786 $this->importForm();
787 break;
788 }
789 }
790 ilUtil::sendInfo($this->lng->txt('err_check_input'));
791 $form->setValuesByPost();
792 $this->importForm();
793 }

References importForm(), initImportForm(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ importForm()

ilObjSCORMLearningModuleGUI::importForm ( )
protected

Show import form.

Definition at line 798 of file class.ilObjSCORMLearningModuleGUI.php.

799 {
800 global $ilTabs;
801
802 $ilTabs->clearTargets();
803 $ilTabs->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,'showTrackingItems'));
804
805 $form = $this->initImportForm();
806 $this->tpl->setContent($form->getHTML());
807 }

References initImportForm().

Referenced by import().

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

◆ initImportForm()

ilObjSCORMLearningModuleGUI::initImportForm ( )
protected

Init import form.

Definition at line 812 of file class.ilObjSCORMLearningModuleGUI.php.

813 {
814 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
815 $form = new ilPropertyFormGUI();
816 $form->setFormAction($this->ctrl->getFormAction($this));
817 $form->setTitle($this->lng->txt('cont_import_tracking'));
818 $form->addCommandButton('import', $this->lng->txt('import'));
819 $form->addCommandButton('showTrackingItems', $this->lng->txt('cancel'));
820
821 $csv = new ilFileInputGUI($this->lng->txt('select_file'),'csv');
822 $csv->setRequired(true);
823 $csv->setSuffixes(array('csv'));
824 $form->addItem($csv);
825
826 return $form;
827 }
This class represents a file property in a property form.
This class represents a property form user interface.

Referenced by import(), and importForm().

+ Here is the caller graph for this function:

◆ modifyTrackingItems()

ilObjSCORMLearningModuleGUI::modifyTrackingItems ( )
protected

Definition at line 649 of file class.ilObjSCORMLearningModuleGUI.php.

650 {
651 global $ilAccess;
652 if($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
653 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
655 if(!$privacy->enabledSahsProtocolData())
656 {
657 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
658 }
659
660 global $ilTabs, $ilToolbar;
661
662 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
663 $ilToolbar->addButton(
664 $this->lng->txt('import'),
665 $this->ctrl->getLinkTarget($this, 'importForm')
666 );
667 $ilToolbar->addButton(
668 $this->lng->txt('cont_export_all'),
669 $this->ctrl->getLinkTarget($this, 'exportAll')
670 );
671
673 $ilTabs->setTabActive('cont_tracking_data');
674 $ilTabs->setSubTabActive('cont_tracking_modify');
675
676 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
677 $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
678 $tbl->parse();
679 $this->tpl->setContent($tbl->getHTML());
680 }
681 }
$_GET["client_id"]
static _getInstance()
Get instance of ilPrivacySettings.

References $_GET, ilPrivacySettings\_getInstance(), and setSubTabs().

Referenced by applyUserTableFilter(), ilObjSCORM2004LearningModuleGUI\deleteTrackingData(), resetUserTableFilter(), ilObjSCORM2004LearningModuleGUI\showTrackingItems(), and showTrackingItems().

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

◆ newModuleVersion()

ilObjSCORMLearningModuleGUI::newModuleVersion ( )

upload new version of module

Definition at line 293 of file class.ilObjSCORMLearningModuleGUI.php.

294 {
295 global $ilTabs;
297 $ilTabs->setSubTabActive('cont_sc_new_version');
298
301
302 // display import form
303 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scorm_new_version_import.html", "Modules/ScormAicc");
304
305 $this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_lm.svg'));
306 $this->tpl->setVariable("ALT_IMG", $this->lng->txt("obj_sahs"));
307
308 $this->ctrl->setParameter($this, "new_type", "sahs");
309 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
310
311 $this->tpl->setVariable("BTN_NAME", "newModuleVersionUpload");
312 $this->tpl->setVariable("TARGET", ' target="'.
313 ilFrameTargetInfo::_getFrame("MainContent").'" ');
314
315 $this->tpl->setVariable("TXT_SELECT_LMTYPE", $this->lng->txt("type"));
316
317 if ($type == "scorm2004") {
318 $this->tpl->setVariable("TXT_TYPE", $this->lng->txt("lm_type_scorm2004"));
319 } else {
320 $this->tpl->setVariable("TXT_TYPE", $this->lng->txt("lm_type_scorm"));
321 }
322
323 include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
325 {
327 foreach($files as $file)
328 {
329 $file = htmlspecialchars($file, ENT_QUOTES, "utf-8");
330 $this->tpl->setCurrentBlock("option_uploaded_file");
331 $this->tpl->setVariable("UPLOADED_FILENAME", $file);
332 $this->tpl->setVariable("TXT_UPLOADED_FILENAME", $file);
333 $this->tpl->parseCurrentBlock();
334 }
335 $this->tpl->setCurrentBlock("select_uploaded_file");
336 $this->tpl->setVariable("TXT_SELECT_FROM_UPLOAD_DIR", $this->lng->txt("cont_select_from_upload_dir"));
337 $this->tpl->setVariable("TXT_UPLOADED_FILE", $this->lng->txt("cont_uploaded_file"));
338 $this->tpl->parseCurrentBlock();
339 }
340
341 $this->tpl->setVariable("TXT_UPLOAD", $this->lng->txt("upload"));
342 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
343 $this->tpl->setVariable("TXT_IMPORT_LM", $this->lng->txt("import_sahs"));
344 $this->tpl->setVariable("TXT_SELECT_FILE", $this->lng->txt("select_file"));
345
346 // gives out the limit as a little notice
347 $this->tpl->setVariable("TXT_FILE_INFO", $this->lng->txt("file_notice")." ".$this->getMaxFileSize());
348 }
print $file
static _getFrame($a_class, $a_type='')
Get content frame name.
_lookupSubType($a_obj_id)
lookup subtype id (scorm, aicc, hacp)
static _lookupObjectId($a_ref_id)
lookup object id
static _getUploadFiles()
Get a list of readable files in the upload directory.
static _getUploadDirectory()
Get the directory with uploaded files.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $_GET, $file, ilObjectGUI\$obj_id, ilFrameTargetInfo\_getFrame(), ilUploadFiles\_getUploadDirectory(), ilUploadFiles\_getUploadFiles(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilUtil\getImagePath(), and ilObjSAHSLearningModuleGUI\setSettingsSubTabs().

Referenced by newModuleVersionUpload().

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

◆ newModuleVersionUpload()

ilObjSCORMLearningModuleGUI::newModuleVersionUpload ( )

Definition at line 377 of file class.ilObjSCORMLearningModuleGUI.php.

378 {
379 global $_FILES, $rbacsystem;
380
381 $unzip = PATH_TO_UNZIP;
382 $tocheck = "imsmanifest.xml";
383
384 include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
385
386 // check create permission before because the uploaded file will be copied
387 if (!$rbacsystem->checkAccess("write", $_GET["ref_id"]))
388 {
389 $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->WARNING);
390 }
391 elseif ($_FILES["scormfile"]["name"])
392 {
393 // check if file was uploaded
394 $source = $_FILES["scormfile"]["tmp_name"];
395 if (($source == 'none') || (!$source))
396 {
397 ilUtil::sendInfo($this->lng->txt("upload_error_file_not_found"),true);
398 $this->newModuleVersion();
399 return;
400 }
401 }
402 elseif ($_POST["uploaded_file"])
403 {
404 // check if the file is in the ftp directory and readable
405 if (!ilUploadFiles::_checkUploadFile($_POST["uploaded_file"]))
406 {
407 $this->ilias->raiseError($this->lng->txt("upload_error_file_not_found"),$this->ilias->error_obj->MESSAGE);
408 }
409 // copy the uploaded file to the client web dir to analyze the imsmanifest
410 // the copy will be moved to the lm directory or deleted
411 $source = CLIENT_WEB_DIR . "/" . $_POST["uploaded_file"];
412 ilUploadFiles::_copyUploadFile($_POST["uploaded_file"], $source);
413 $source_is_copy = true;
414 }
415 else
416 {
417 ilUtil::sendInfo($this->lng->txt("upload_error_file_not_found"),true);
418 $this->newModuleVersion();
419 return;
420 }
421 // fim.
422
423 //unzip the imsmanifest-file from new uploaded file
424 $pathinfo = pathinfo($source);
425 $dir = $pathinfo["dirname"];
426 $file = $pathinfo["basename"];
427 $cdir = getcwd();
428 chdir($dir);
429
430 //we need more flexible unzip here than ILIAS standard classes allow
431 $unzipcmd = $unzip." -o ".ilUtil::escapeShellArg($source)." ".$tocheck;
432 exec($unzipcmd);
433 chdir($cdir);
434 $tmp_file = $dir."/".$tocheck.".".$_GET["ref_id"];
435
436 rename($dir."/".$tocheck,$tmp_file);
437 $new_manifest = file_get_contents($tmp_file);
438
439 //remove temp file
440 unlink($tmp_file);
441
442 //get old manifest file
443 $old_manifest = file_get_contents($this->object->getDataDirectory()."/".$tocheck);
444
445 //reload fixed version of file
446 $check ='/xmlns="http:\/\/www.imsglobal.org\/xsd\/imscp_v1p1"/';
447 $replace="xmlns=\"http://www.imsproject.org/xsd/imscp_rootv1p1p2\"";
448 $reload_manifest = preg_replace($check, $replace, $new_manifest);
449
450 //do testing for converted versions as well as earlier ILIAS version messed up utf8 conversion
451 if (strcmp($new_manifest,$old_manifest) == 0 || strcmp(utf8_encode($new_manifest),$old_manifest) == 0 ||
452 strcmp ($reload_manifest, $old_manifest) == 0 || strcmp(utf8_encode($reload_manifest),$old_manifest) == 0 ){
453
454 //get exisiting module version
455 $module_version = $this->object->getModuleVersion();
456
457 if ($_FILES["scormfile"]["name"])
458 {
459 //build targetdir in lm_data
460 $file_path = $this->object->getDataDirectory()."/".$_FILES["scormfile"]["name"].".".$module_version;
461
462 //move to data directory and add subfix for versioning
463 ilUtil::moveUploadedFile($_FILES["scormfile"]["tmp_name"],$_FILES["scormfile"]["name"], $file_path);
464 }
465 else
466 {
467 //build targetdir in lm_data
468 $file_path = $this->object->getDataDirectory()."/".$_POST["uploaded_file"].".".$module_version;
469 // move the already copied file to the lm_data directory
470 rename($source, $file_path);
471 }
472
473 //unzip and replace old extracted files
474 ilUtil::unzip($file_path, true);
475 ilUtil::renameExecutables($this->object->getDataDirectory()); //(security)
476
477 //increase module version
478 $this->object->setModuleVersion($module_version+1);
479 $this->object->update();
480
481 //redirect to properties and display success
482 ilUtil::sendInfo( $this->lng->txt("cont_new_module_added"), true);
483 ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$_GET["ref_id"]);
484 exit;
485 }
486 else
487 {
488 if ($source_is_copy)
489 {
490 unlink($source);
491 }
492
493 ilUtil::sendInfo($this->lng->txt("cont_invalid_new_module"),true);
494 $this->newModuleVersion();
495 }
496 }
newModuleVersion()
upload new version of module
static _copyUploadFile($a_file, $a_target, $a_raise_errors=true)
copy an uploaded file to the target directory (including virus check)
static _checkUploadFile($a_file)
Check if a file exists in the upload directory and is readable.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static escapeShellArg($a_arg)
static redirect($a_script)
http redirect to other script
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
exit
Definition: login.php:54

References $_GET, $_POST, $file, ilUploadFiles\_checkUploadFile(), ilUploadFiles\_copyUploadFile(), ilUtil\escapeShellArg(), exit, ilUtil\moveUploadedFile(), newModuleVersion(), ilUtil\redirect(), ilUtil\renameExecutables(), ilUtil\sendInfo(), and ilUtil\unzip().

+ Here is the call graph for this function:

◆ offlineModeManager()

ilObjSCORMLearningModuleGUI::offlineModeManager ( )
protected

Manage offline mode for users @global ilTabs $ilTabs $global ilToolbar $ilToolbar.

Definition at line 957 of file class.ilObjSCORMLearningModuleGUI.php.

958 {
959 global $rbacsystem, $tree, $tpl, $lng, $ilToolbar, $ilCtrl, $ilSetting;
960
961 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
962 if(!ilLearningProgressAccess::checkAccess($this->object->getRefId()))
963 {
964 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
965 }
966
967 include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
968 $tbl = new ilSCORMOfflineModeUsersTableGUI($this->object->getId(), $this, 'offlineModeManager');
969 $tbl->parse();
970 $this->tpl->setContent($tbl->getHTML());
971
972 }
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
GUI class ilSCORMOfflineModeUsersTableGUI.
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, and ilLearningProgressAccess\checkAccess().

Referenced by confirmedStopUserOfflineMode().

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

◆ properties()

ilObjSCORMLearningModuleGUI::properties ( )

scorm module properties

Reimplemented from ilObjSAHSLearningModuleGUI.

Reimplemented in ilObjSCORM2004LearningModuleGUI.

Definition at line 73 of file class.ilObjSCORMLearningModuleGUI.php.

74 {
75 global $rbacsystem, $tree, $tpl, $lng, $ilToolbar, $ilCtrl, $ilSetting, $ilTabs;
76
77 $lng->loadLanguageModule("style");
78
80 $ilTabs->setSubTabActive('cont_settings');
81
82 // view
83 $ilToolbar->addButton($this->lng->txt("view"),
84 "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->object->getRefID(),
85 "_blank");
86
87 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
88 $this->form = new ilPropertyFormGUI();
89 $this->form->setFormAction($ilCtrl->getFormAction($this));
90 $this->form->setTitle($this->lng->txt("cont_lm_properties"));
91
92 // SCORM-type
93 $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
94 $ne->setValue($this->lng->txt( "lm_type_" . ilObjSAHSLearningModule::_lookupSubType( $this->object->getID() ) ) );
95 $this->form->addItem($ne);
96
97 // version
98 $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
99 $ne->setValue($this->object->getModuleVersion());
100 $this->form->addItem($ne);
101
102 // online
103 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
104 $cb->setValue("y");
105 if ($this->object->getOnline())
106 {
107 $cb->setChecked(true);
108 }
109 $this->form->addItem($cb);
110
111 // offline Mode
112 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
113 $cb->setValue("y");
114 $cb->setChecked($this->object->getOfflineMode());
115 include_once("./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
116 if ($this->object->getOfflineMode()== true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
117 $cb->setDisabled(true);
118 $cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
119 } else {
120 $cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
121 }
122 $this->form->addItem($cb);
123
124 //
125 // presentation
126 //
127 $sh = new ilFormSectionHeaderGUI();
128 $sh->setTitle($this->lng->txt("cont_presentation"));
129 $this->form->addItem($sh);
130
131 // display mode (open)
132 $options = array(
133 "0" => $this->lng->txt("cont_open_normal"),
134 "1" => $this->lng->txt("cont_open_iframe_max"),
135 "2" => $this->lng->txt("cont_open_iframe_defined"),
136 "5" => $this->lng->txt("cont_open_window_undefined"),
137 "6" => $this->lng->txt("cont_open_window_defined")
138 );
139 $si = new ilSelectInputGUI($this->lng->txt("cont_open"), "open_mode");
140 $si->setOptions($options);
141 $si->setValue($this->object->getOpenMode());
142 $this->form->addItem($si);
143
144 // width
145 $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width");
146 $ni->setMaxLength(4);
147 $ni->setSize(4);
148 $ni->setValue($this->object->getWidth());
149 $this->form->addItem($ni);
150
151 // height
152 $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height");
153 $ni->setMaxLength(4);
154 $ni->setSize(4);
155 $ni->setValue($this->object->getHeight());
156 $this->form->addItem($ni);
157
158 // auto navigation to last visited item
159 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
160 $cb->setValue("y");
161 $cb->setChecked($this->object->getAuto_last_visited());
162 $cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
163 $this->form->addItem($cb);
164
165 // auto continue
166 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_auto_continue"), "auto_continue");
167 $cb->setValue("y");
168 $cb->setChecked($this->object->getAutoContinue());
169 $this->form->addItem($cb);
170
171 //
172 // scorm options
173 //
174 $sh = new ilFormSectionHeaderGUI();
175 $sh->setTitle($this->lng->txt("cont_scorm_options"));
176 $this->form->addItem($sh);
177
178 // max attempts
179 $ni = new ilNumberInputGUI($this->lng->txt("cont_sc_max_attempt"), "max_attempt");
180 $ni->setMaxLength(3);
181 $ni->setSize(3);
182 $ni->setValue($this->object->getMaxAttempt());
183 $this->form->addItem($ni);
184
185 // lesson mode
186 $options = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"),
187 "browse" => $this->lng->txt("cont_sc_less_mode_browse"));
188 $si = new ilSelectInputGUI($this->lng->txt("cont_def_lesson_mode"), "lesson_mode");
189 $si->setOptions($options);
190 $si->setValue($this->object->getDefaultLessonMode());
191 $this->form->addItem($si);
192
193 // credit mode
194 $options = array("credit" => $this->lng->txt("cont_credit_on"),
195 "no_credit" => $this->lng->txt("cont_credit_off"));
196 $si = new ilSelectInputGUI($this->lng->txt("cont_credit_mode"), "credit_mode");
197 $si->setOptions($options);
198 $si->setValue($this->object->getCreditMode());
199 $si->setInfo($this->lng->txt("cont_credit_mode_info"));
200 $this->form->addItem($si);
201
202 // set lesson mode review when completed
203 $options = array(
204 "n" => $this->lng->txt("cont_sc_auto_review_no"),
205// "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"),
206// "p" => $this->lng->txt("cont_sc_auto_review_passed"),
207// "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"),
208// "c" => $this->lng->txt("cont_sc_auto_review_completed"),
209// "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"),
210 "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"),
211 );
212 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
213 $si->setOptions($options);
214 $si->setValue($this->object->getAutoReviewChar());
215 $si->setInfo($this->lng->txt("cont_sc_auto_review_info_12"));
216 $this->form->addItem($si);
217
218 //
219 // rte settings
220 //
221 $sh = new ilFormSectionHeaderGUI();
222 $sh->setTitle($this->lng->txt("cont_rte_settings"));
223 $this->form->addItem($sh);
224
225 // unlimited session timeout
226 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
227 $cb->setValue("y");
228 $cb->setChecked($this->object->getSession());
229 $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
230 $this->form->addItem($cb);
231
232 // storage of interactions
233 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
234 $cb->setValue("y");
235 $cb->setChecked($this->object->getInteractions());
236 $this->form->addItem($cb);
237
238 // objectives
239 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
240 $cb->setValue("y");
241 $cb->setChecked($this->object->getObjectives());
242 $this->form->addItem($cb);
243
244 // time from lms
245 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
246 $cb->setValue("y");
247 $cb->setChecked($this->object->getTime_from_lms());
248 $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
249 $this->form->addItem($cb);
250
251 // check values
252 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
253 $cb->setValue("y");
254 $cb->setChecked($this->object->getCheck_values());
255 $this->form->addItem($cb);
256 // api adapter name
257 // $this->tpl->setVariable("TXT_API_ADAPTER", $this->lng->txt("cont_api_adapter"));
258 // $this->tpl->setVariable("VAL_API_ADAPTER", $this->object->getAPIAdapterName());
259 // api functions prefix
260 // $this->tpl->setVariable("TXT_API_PREFIX", $this->lng->txt("cont_api_func_prefix"));
261 // $this->tpl->setVariable("VAL_API_PREFIX", $this->object->getAPIFunctionsPrefix());
262
263 //
264 // debugging
265 //
266 $sh = new ilFormSectionHeaderGUI();
267 $sh->setTitle($this->lng->txt("cont_debugging"));
268 $this->form->addItem($sh);
269
270 // test tool
271 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
272 $cb->setValue("y");
273 $cb->setChecked($this->object->getDebug());
274 if ($this->object->getDebugActivated() == false)
275 {
276 $cb->setDisabled(true);
277 $cb->setInfo($this->lng->txt("cont_debug_deactivated"));
278 }
279 else
280 {
281 $cb->setInfo($this->lng->txt("cont_debug_deactivate"));
282 }
283 $this->form->addItem($cb);
284 $this->form->addCommandButton("saveProperties", $lng->txt("save"));
285
286 $tpl->setContent($this->form->getHTML());
287
288 }
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
This class represents a non editable value in a property form.
This class represents a number property in a property form.
This class represents a selection list property in a property form.
if(!is_array($argv)) $options

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, $options, $si, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilObjSAHSLearningModule\_lookupSubType(), ilSCORMOfflineMode\checkIfAnyoneIsInOfflineMode(), and ilObjSAHSLearningModuleGUI\setSettingsSubTabs().

+ Here is the call graph for this function:

◆ resetUserTableFilter()

ilObjSCORMLearningModuleGUI::resetUserTableFilter ( )
protected

Reset table filter.

Definition at line 699 of file class.ilObjSCORMLearningModuleGUI.php.

700 {
701 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
702 $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
703 $tbl->resetFilter();
704 $tbl->resetOffset();
705 $this->modifyTrackingItems();
706 }

References modifyTrackingItems().

+ Here is the call graph for this function:

◆ saveProperties()

ilObjSCORMLearningModuleGUI::saveProperties ( )

save properties

Reimplemented from ilObjSAHSLearningModuleGUI.

Reimplemented in ilObjSCORM2004LearningModuleGUI.

Definition at line 501 of file class.ilObjSCORMLearningModuleGUI.php.

502 {
503 //check if OfflineMode-Zip has to be created
504 $tmpOfflineMode= ilUtil::yn2tf($_POST["cobj_offline_mode"]);
505 if ($tmpOfflineMode == true) {
506 if ($this->object->getOfflineMode() == false) {
507 $this->object->zipLmForOfflineMode();
508 }
509 }
510 $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
511 $this->object->setOfflineMode($tmpOfflineMode);
512 $this->object->setOpenMode($_POST["open_mode"]);
513 $this->object->setWidth($_POST["width"]);
514 $this->object->setHeight($_POST["height"]);
515 $this->object->setAuto_last_visited(ilUtil::yn2tf($_POST["cobj_auto_last_visited"]));
516 $this->object->setAutoContinue(ilUtil::yn2tf($_POST["auto_continue"]));
517 $this->object->setMaxAttempt($_POST["max_attempt"]);
518 $this->object->setDefaultLessonMode($_POST["lesson_mode"]);
519 $this->object->setCreditMode($_POST["credit_mode"]);
520 $this->object->setAutoReview(ilUtil::yn2tf($_POST["auto_review"]));
521// $this->object->setAPIAdapterName($_POST["api_adapter"]);
522// $this->object->setAPIFunctionsPrefix($_POST["api_func_prefix"]);
523 $this->object->setSession(ilUtil::yn2tf($_POST["cobj_session"]));
524 $this->object->setInteractions(ilUtil::yn2tf($_POST["cobj_interactions"]));
525 $this->object->setObjectives(ilUtil::yn2tf($_POST["cobj_objectives"]));
526 $this->object->setTime_from_lms(ilUtil::yn2tf($_POST["cobj_time_from_lms"]));
527 $this->object->setCheck_values(ilUtil::yn2tf($_POST["cobj_check_values"]));
528 $this->object->setDebug(ilUtil::yn2tf($_POST["cobj_debug"]));
529 $this->object->update();
530 ilUtil::sendInfo($this->lng->txt("msg_obj_modified"), true);
531 $this->ctrl->redirect($this, "properties");
532 }
static yn2tf($a_yn)
convert "y"/"n" to true/false

References $_POST, ilUtil\sendInfo(), and ilUtil\yn2tf().

+ Here is the call graph for this function:

◆ setSubTabs()

ilObjSCORMLearningModuleGUI::setSubTabs ( )

Definition at line 931 of file class.ilObjSCORMLearningModuleGUI.php.

932 {
933 global $lng, $ilTabs, $ilCtrl, $ilAccess;
934
935 if($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
936 $ilTabs->addSubTabTarget("cont_tracking_byuser",
937 $this->ctrl->getLinkTarget($this, "showTrackingItems"), array("edit", ""),
938 get_class($this));
939
940 $ilTabs->addSubTabTarget("cont_tracking_bysco",
941 $this->ctrl->getLinkTarget($this, "showTrackingItemsBySco"), array("edit", ""),
942 get_class($this));
943 }
944 if($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
945 $ilTabs->addSubTabTarget("cont_tracking_modify",
946 $this->ctrl->getLinkTarget($this, "modifyTrackingItems"), array("edit", ""),
947 get_class($this));
948 }
949 }

References $_GET, $ilCtrl, and ilObjectGUI\$lng.

Referenced by ilObjSCORM2004LearningModuleGUI\initStylePropertiesForm(), modifyTrackingItems(), ilObjSCORM2004LearningModuleGUI\properties(), showTrackingItem(), showTrackingItemPerUser(), ilObjSCORM2004LearningModuleGUI\showTrackingItems(), showTrackingItems(), ilObjSCORM2004LearningModuleGUI\showTrackingItemsBySco(), showTrackingItemsBySco(), and showTrackingItemSco().

+ Here is the caller graph for this function:

◆ showTrackingItem()

ilObjSCORMLearningModuleGUI::showTrackingItem ( )
protected

show tracking data of item

Reimplemented in ilObjAICCLearningModuleGUI.

Definition at line 866 of file class.ilObjSCORMLearningModuleGUI.php.

867 {
868 global $ilTabs;
869
870 include_once "./Services/Table/classes/class.ilTableGUI.php";
871
872 $this->setSubTabs();
873 $ilTabs->setTabActive("cont_tracking_data");
874 $ilTabs->setSubTabActive("cont_tracking_byuser");
875
876 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserTableGUI.php';
877 $tbl = new ilSCORMTrackingItemsPerUserTableGUI($this->object->getId(), $this, 'showTrackingItem');
878 $tbl->setUserId((int) $_REQUEST['user_id']);
879 $tbl->parse();
880 $this->tpl->setContent($tbl->getHTML());
881 return true;
882 }
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

References $_REQUEST, and setSubTabs().

+ Here is the call graph for this function:

◆ showTrackingItemPerUser()

ilObjSCORMLearningModuleGUI::showTrackingItemPerUser ( )
protected

show tracking data of item per user

Definition at line 908 of file class.ilObjSCORMLearningModuleGUI.php.

909 {
910 global $ilTabs;
911
912 include_once "./Services/Table/classes/class.ilTableGUI.php";
913
914 $this->setSubTabs();
915 $ilTabs->setTabActive("cont_tracking_data");
916 $ilTabs->setSubTabActive("cont_tracking_byuser");
917
918 $this->ctrl->setParameter($this,'obj_id',(int) $_REQUEST['obj_id']);
919 $this->ctrl->setParameter($this,'user_id',(int) $_REQUEST['user_id']);
920
921 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemPerUserTableGUI.php';
922 $tbl = new ilSCORMTrackingItemPerUserTableGUI($this->object->getId(), $this, 'showTrackingItemPerUser');
923 $tbl->setUserId((int) $_REQUEST['user_id']);
924 $tbl->setScoId((int) $_REQUEST['obj_id']);
925 $tbl->parse();
926 $this->tpl->setContent($tbl->getHTML());
927 return true;
928 }

References $_REQUEST, and setSubTabs().

+ Here is the call graph for this function:

◆ showTrackingItems()

ilObjSCORMLearningModuleGUI::showTrackingItems ( )

Show tracking table @global ilTabs $ilTabs $global ilToolbar $ilToolbar.

Reimplemented in ilObjSCORM2004LearningModuleGUI, and ilObjAICCLearningModuleGUI.

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

589 {
590 global $ilTabs, $ilAccess;
591
592 $ilTabs->setTabActive('cont_tracking_data');
593
594 if($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
595
597 $ilTabs->setSubTabActive('cont_tracking_byuser');
598
599 $reports = array('exportSelectedSuccess','exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportSelectedRaw');
600
601 $userSelected = "all";
602 if (isset($_GET["userSelected"])) $userSelected = ilUtil::stripSlashes($_GET["userSelected"]);
603 if (isset($_POST["userSelected"])) $userSelected = ilUtil::stripSlashes($_POST["userSelected"]);
604 $this->ctrl->setParameter($this,'userSelected',$userSelected);
605
606 $report = "choose";
607 if (isset($_GET["report"])) $report = ilUtil::stripSlashes($_GET["report"]);
608 if (isset($_POST["report"])) $report = ilUtil::stripSlashes($_POST["report"]);
609 $this->ctrl->setParameter($this,'report',$report);
610
611 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserFilterGUI.php';
612 $filter = new ilSCORMTrackingItemsPerUserFilterGUI($this, 'showTrackingItems');
613 $filter->parse($userSelected,$report,$reports);
614 if($report == "choose") {
615 $this->tpl->setContent($filter->form->getHTML());
616 } else {
617 $usersSelected = array();
618 if ($userSelected != "all") $usersSelected[] = $userSelected;
619 else {
620 include_once "Services/Tracking/classes/class.ilTrQuery.php";
621 $users=ilTrQuery::getParticipantsForObject($this->ref_id);
622 foreach($users as $user) {
623 if(ilObject::_exists($user) && ilObject::_lookUpType($user) == 'usr') {
624 $usersSelected[] = $user;
625 }
626 }
627 }
628 $scosSelected = array();
629 $scos=$this->object->getTrackedItems();
630 foreach($scos as $row)
631 {
632 $scosSelected[]=(int)$row->getId();
633 }
634
635 //with check for course ...
636 // include_once "Services/Tracking/classes/class.ilTrQuery.php";
637 // $a_users=ilTrQuery::getParticipantsForObject($this->ref_id);
638 // var_dump($this->object->getTrackedUsers(""));
639 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
640 $tbl = new ilSCORMTrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItems', $usersSelected, $scosSelected, $report);
641 $this->tpl->setContent($filter->form->getHTML().$tbl->getHTML());
642 }
643 }
644 else if($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
645 $this->modifyTrackingItems();
646 }
647 return true;
648 }
Class ilSCORMTrackingItemsTableGUI.
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_GET, $_POST, $row, ilObject\_exists(), ilTrQuery\getParticipantsForObject(), modifyTrackingItems(), setSubTabs(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ showTrackingItemsBySco()

ilObjSCORMLearningModuleGUI::showTrackingItemsBySco ( )
protected

show tracking data

Reimplemented in ilObjSCORM2004LearningModuleGUI.

Definition at line 537 of file class.ilObjSCORMLearningModuleGUI.php.

538 {
539 global $ilTabs;
540
542 $ilTabs->setTabActive("cont_tracking_data");
543 $ilTabs->setSubTabActive("cont_tracking_bysco");
544
545 $reports = array('exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportSelectedRaw');//,'tracInteractionItem','tracInteractionUser','tracInteractionUserAnswers'
546 $scoSelected = "all";
547 if (isset($_GET["scoSelected"])) $scoSelected = ilUtil::stripSlashes($_GET["scoSelected"]);
548 if (isset($_POST["scoSelected"])) $scoSelected = ilUtil::stripSlashes($_POST["scoSelected"]);
549 $this->ctrl->setParameter($this,'scoSelected',$scoSelected);
550
551 $report = "choose";
552 if (isset($_GET["report"])) $report = ilUtil::stripSlashes($_GET["report"]);
553 if (isset($_POST["report"])) $report = ilUtil::stripSlashes($_POST["report"]);
554 $this->ctrl->setParameter($this,'report',$report);
555
556 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerScoFilterGUI.php';
557 $filter = new ilSCORMTrackingItemsPerScoFilterGUI($this, 'showTrackingItemsBySco');
558 $filter->parse($scoSelected,$report,$reports);
559 if($report == "choose") {
560 $this->tpl->setContent($filter->form->getHTML());
561 } else {
562 $scosSelected = array();
563 if ($scoSelected != "all") $scosSelected[] = $scoSelected;
564 else {
565 $scos=$this->object->getTrackedItems();
566 foreach($scos as $row)
567 {
568 $scosSelected[]=(int)$row->getId();
569 }
570 }
571 //with check for course ...
572 include_once "Services/Tracking/classes/class.ilTrQuery.php";
573 $a_users=ilTrQuery::getParticipantsForObject($this->ref_id);
574 // var_dump($this->object->getTrackedUsers(""));
575 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
576 $tbl = new ilSCORMTrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItemsBySco', $a_users, $scosSelected, $report);
577 $this->tpl->setContent($filter->form->getHTML().$tbl->getHTML());
578 }
579 return true;
580 }

References $_GET, $_POST, $row, ilTrQuery\getParticipantsForObject(), setSubTabs(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ showTrackingItemSco()

ilObjSCORMLearningModuleGUI::showTrackingItemSco ( )
protected

show tracking data of item

Definition at line 887 of file class.ilObjSCORMLearningModuleGUI.php.

888 {
889 global $ilTabs;
890
891 include_once "./Services/Table/classes/class.ilTableGUI.php";
892
893 $this->setSubTabs();
894 $ilTabs->setTabActive("cont_tracking_data");
895 $ilTabs->setSubTabActive("cont_tracking_bysco");
896
897 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsScoTableGUI.php';
898 $tbl = new ilSCORMTrackingItemsScoTableGUI($this->object->getId(), $this, 'showTrackingItemSco');
899 $tbl->setScoId((int) $_GET['obj_id']);
900 $tbl->parse();
901 $this->tpl->setContent($tbl->getHTML());
902 return true;
903 }

References $_GET, and setSubTabs().

+ Here is the call graph for this function:

◆ stopUserOfflineMode()

ilObjSCORMLearningModuleGUI::stopUserOfflineMode ( )
protected

Stop offline mode for selected users.

Definition at line 976 of file class.ilObjSCORMLearningModuleGUI.php.

977 {
978 if(!count((array) $_POST['user']))
979 {
980 ilUtil::sendFailure($this->lng->txt('select_one'),true);
981 $this->ctrl->redirect($this,'offlineModeManager');
982 }
983 // display confirmation message
984 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
985 $cgui = new ilConfirmationGUI();
986 $cgui->setFormAction($this->ctrl->getFormAction($this));
987 $cgui->setHeaderText($this->lng->txt("info_stop_offline_mode_sure"));
988 $cgui->setCancel($this->lng->txt("cancel"), "cancelStopUserOfflineMode");
989 $cgui->setConfirm($this->lng->txt("confirm"), "confirmedStopUserOfflineMode");
990 foreach($_POST["user"] as $id)
991 {
992 if (ilObject::_exists($id) && ilObject::_lookUpType($id)=="usr" )
993 {
994 $user = new ilObjUser($id);
995 $caption = ilUtil::getImageTagByType("sahs_offline", $this->tpl->tplPath).
996 " ".$this->lng->txt("stop_user_offline_mode_for_user").
997 ": ".$user->getLastname().", ".$user->getFirstname();
998 $cgui->addItem("user[]", $id, $caption);
999 }
1000 }
1001 $this->tpl->setContent($cgui->getHTML());
1002 }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $_POST, ilObject\_exists(), ilUtil\getImageTagByType(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

Field Documentation

◆ EXPORT_ALL

const ilObjSCORMLearningModuleGUI::EXPORT_ALL = 1

Definition at line 30 of file class.ilObjSCORMLearningModuleGUI.php.

◆ EXPORT_SELECTED

const ilObjSCORMLearningModuleGUI::EXPORT_SELECTED = 2

Definition at line 31 of file class.ilObjSCORMLearningModuleGUI.php.

◆ EXPORT_TYPE_RAW

const ilObjSCORMLearningModuleGUI::EXPORT_TYPE_RAW = 1

Definition at line 33 of file class.ilObjSCORMLearningModuleGUI.php.

◆ EXPORT_TYPE_SUCCESS

const ilObjSCORMLearningModuleGUI::EXPORT_TYPE_SUCCESS = 2

Definition at line 34 of file class.ilObjSCORMLearningModuleGUI.php.

◆ EXPORT_UNDEF

const ilObjSCORMLearningModuleGUI::EXPORT_UNDEF = 0

Definition at line 29 of file class.ilObjSCORMLearningModuleGUI.php.


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