ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjSAHSLearningModuleGUI Class Reference

SCORM/AICC/HACP Learning Modules. More...

+ Inheritance diagram for ilObjSAHSLearningModuleGUI:
+ Collaboration diagram for ilObjSAHSLearningModuleGUI:

Public Member Functions

 ilObjSAHSLearningModuleGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor.
executeCommand ()
 execute command
 viewObject ()
 list childs of current object
 properties ()
 module properties
 saveProperties ()
 save properties
 initCreationForms ($a_new_type)
 no manual SCORM creation, only import at the time
 initCreationForm ()
 Init form.
 initUploadForm ()
 Init upload form.
 uploadObject ()
 display status information or report errors messages in case of error
 upload ()
 saveObject ()
 save new learning module to db
 info ()
 permission form
 owner ()
 show owner of learning module
 getTemplate ()
 output main header (title and locator)
 setTabs ()
 output main frameset of media pool left frame: explorer tree of folders right frame: media pool content
 certificate ()
 Shows the certificate editor.
 getTabs (&$tabs_gui)
 adds tabs to tab gui object
 _goto ($a_target)
 goto target course
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 editContent ()
 List files.
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- 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 ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __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
 __showClipboardTable ($a_result_set, $a_from="")
 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
 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.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.

Detailed Description

Member Function Documentation

ilObjSAHSLearningModuleGUI::_goto (   $a_target)

goto target course

Definition at line 709 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET, $ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendInfo().

{
global $ilAccess, $ilErr, $lng;
$parts = explode("_", $a_target);
if ($ilAccess->checkAccess("write", "", $parts[0]))
{
$_GET["cmd"] = "";
$_GET["baseClass"] = "ilSAHSEditGUI";
$_GET["ref_id"] = $parts[0];
$_GET["obj_id"] = $parts[1];
include("ilias.php");
}
if ($ilAccess->checkAccess("visible", "", $parts[0]))
{
$_GET["cmd"] = "infoScreen";
$_GET["baseClass"] = "ilSAHSPresentationGUI";
$_GET["ref_id"] = $parts[0];
include("ilias.php");
}
else
{
if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
ilUtil::sendInfo(sprintf($lng->txt("msg_no_perm_read_item"),
}
}
$ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::addLocatorItems ( )

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 745 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET.

{
global $ilLocator;
if (is_object($this->object))
{
$ilLocator->addItem($this->object->getTitle(),
$this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "", $_GET["ref_id"]);
}
}
ilObjSAHSLearningModuleGUI::certificate ( )

Shows the certificate editor.

Definition at line 590 of file class.ilObjSAHSLearningModuleGUI.php.

{
include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
include_once "./Modules/ScormAicc/classes/class.ilSCORMCertificateAdapter.php";
$output_gui = new ilCertificateGUI(new ilSCORMCertificateAdapter($this->object));
$output_gui->certificateEditor();
}
ilObjSAHSLearningModuleGUI::editContent ( )

List files.

Parameters
@return

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

References $ilCtrl.

{
global $ilCtrl;
if (!$this->object->getEditable())
{
$ilCtrl->redirectByClass("ilfilesystemgui", "listFiles");
}
else
{
$ilCtrl->redirectByClass("ilobjscorm2004learningmodulegui", "editOrganization");
}
}
& ilObjSAHSLearningModuleGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Reimplemented in ilObjSCORM2004LearningModuleGUI.

Definition at line 37 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET, $cmd, $ilErr, $ret, ilMDEditorGUI\addObserver(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getTemplate(), LP_MODE_REPOSITORY, ilObjectGUI\omitLocator(), ilObjectGUI\prepareOutput(), ilObjectGUI\setLocator(), ilFileSystemGUI\setTableId(), and setTabs().

{
global $ilAccess, $ilTabs, $ilErr;
if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
$this->getCreationMode() == true)
{
$this->prepareOutput();
}
else
{
$this->getTemplate();
$this->setLocator();
$this->setTabs();
}
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case 'ilmdeditorgui':
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->WARNING);
}
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
$md_gui->addObserver($this->object,'MDUpdateListener','General');
$this->ctrl->forwardCommand($md_gui);
break;
case 'ilpermissiongui':
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case "ilfilesystemgui":
$this->fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
$this->fs_gui->setTableId("sahsfs".$this->object->getId());
$ret =& $this->ctrl->forwardCommand($this->fs_gui);
break;
case "ilcertificategui":
include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
include_once "./Modules/ScormAicc/classes/class.ilSCORMCertificateAdapter.php";
$output_gui = new ilCertificateGUI(new ilSCORMCertificateAdapter($this->object));
$ret =& $this->ctrl->forwardCommand($output_gui);
break;
case "illearningprogressgui":
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$new_gui =& new ilLearningProgressGUI(LP_MODE_REPOSITORY,$this->object->getRefId());
$this->ctrl->forwardCommand($new_gui);
break;
case 'illicensegui':
include_once("./Services/License/classes/class.ilLicenseGUI.php");
$license_gui =& new ilLicenseGUI($this);
$ret =& $this->ctrl->forwardCommand($license_gui);
break;
case "ilinfoscreengui":
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->enableLearningProgress();
// add read / back button
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
if (!$this->object->getEditable())
{
$info->addButton($this->lng->txt("view"),
"ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->object->getRefID(),
' target="ilContObj'.$this->object->getId().'" ');
}
}
$info->enableNews();
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
{
$info->enableNewsEditing();
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
if ($enable_internal_rss)
{
$info->setBlockProperty("news", "settings", true);
}
}
// show standard meta data section
$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
// forward the command
$this->ctrl->forwardCommand($info);
break;
case "ilcommonactiondispatchergui":
include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
$this->ctrl->forwardCommand($gui);
break;
case "ilobjstylesheetgui":
//$this->addLocations();
$this->ctrl->setReturn($this, "properties");
$ilTabs->clearTargets();
$style_gui =& new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
$style_gui->omitLocator();
if ($cmd == "create" || $_GET["new_type"]=="sty")
{
$style_gui->setCreationMode(true);
}
//$ret =& $style_gui->executeCommand();
if ($cmd == "confirmedDelete")
{
$this->object->setStyleSheetId(0);
$this->object->update();
}
$ret =& $this->ctrl->forwardCommand($style_gui);
if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
{
$style_id = $ret;
$this->object->setStyleSheetId($style_id);
$this->object->update();
$this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
}
break;
default:
if ($this->object && !$this->object->getEditable())
{
$cmd = $this->ctrl->getCmd("properties");
}
else
{
$cmd = $this->ctrl->getCmd("frameset");
}
if ((strtolower($_GET["baseClass"]) == "iladministrationgui" ||
$this->getCreationMode() == true) &&
$cmd != "frameset")
{
$cmd.= "Object";
}
// #9225
if($cmd == "redrawHeaderAction")
{
$cmd .= "Object";
}
$ret =& $this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::getTabs ( $tabs_gui)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjectGUI.

Reimplemented in ilObjSCORM2004LearningModuleGUI.

Definition at line 603 of file class.ilObjSAHSLearningModuleGUI.php.

References $ilCtrl, $ilUser, ilPrivacySettings\_getInstance(), ilLicenseAccess\_isEnabled(), ilLearningProgressAccess\checkAccess(), and ilCertificate\isActive().

Referenced by setTabs().

{
global $rbacsystem, $ilUser, $ilCtrl, $ilHelp;
if ($this->ctrl->getCmd() == "delete")
{
return;
}
switch ($this->object->getSubType())
{
case "scorm2004":
$ilHelp->setScreenIdComponent("sahs13");
break;
case "scorm":
$ilHelp->setScreenIdComponent("sahs12");
break;
}
// file system gui tabs
// properties
$ilCtrl->setParameterByClass("ilfilesystemgui", "resetoffset", 1);
$tabs_gui->addTarget("cont_list_files",
$this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"), "",
"ilfilesystemgui");
$ilCtrl->setParameterByClass("ilfilesystemgui", "resetoffset", "");
// info screen
$force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui")
? true
: false;
$tabs_gui->addTarget("info_short",
$this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "",
"ilinfoscreengui", "", $force_active);
// properties
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "properties"), array("", "properties"),
get_class($this));
// learning progress
include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
if(ilLearningProgressAccess::checkAccess($this->object->getRefId()))
{
$tabs_gui->addTarget('learning_progress',
$this->ctrl->getLinkTargetByClass(array('illearningprogressgui'),''),
'',
array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
}
include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
if($privacy->enabledSahsProtocolData())
{
// tracking data
$tabs_gui->addTarget("cont_tracking_data",
$this->ctrl->getLinkTarget($this, "showTrackingItems"), "showTrackingItems",
get_class($this));
}
// certificate subtab
include_once "Services/Certificate/classes/class.ilCertificate.php";
{
// create and insert object in objecttree
switch ($this->object->getSubType())
{
case "scorm2004":
case "scorm":
// certificate
$tabs_gui->addTarget("certificate",
$this->ctrl->getLinkTarget($this, "certificate"),
array("certificate", "certificateEditor", "certificateRemoveBackground", "certificateSave",
"certificatePreview", "certificateDelete", "certificateUpload", "certificateImport")
);
break;
}
}
include_once("Services/License/classes/class.ilLicenseAccess.php");
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId())
{
$tabs_gui->addTarget("license",
$this->ctrl->getLinkTargetByClass('illicensegui', ''),
"", "illicensegui");
}
// edit meta
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
"", "ilmdeditorgui");
// perm
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::getTemplate ( )

output main header (title and locator)

Definition at line 555 of file class.ilObjSAHSLearningModuleGUI.php.

References ilObjectGUI\$lng.

Referenced by executeCommand(), and ilObjSCORM2004LearningModuleGUI\executeCommand().

{
global $lng;
$this->tpl->getStandardTemplate();
}

+ Here is the caller graph for this function:

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

Constructor.

public

Definition at line 25 of file class.ilObjSAHSLearningModuleGUI.php.

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

{
global $lng;
$lng->loadLanguageModule("content");
$this->type = "sahs";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::info ( )

permission form

Definition at line 539 of file class.ilObjSAHSLearningModuleGUI.php.

{
$this->infoObject();
}
ilObjSAHSLearningModuleGUI::initCreationForm ( )

Init form.

Parameters
int$a_modeEdit Mode

Definition at line 251 of file class.ilObjSAHSLearningModuleGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilFrameTargetInfo\_getFrame(), ilTextAreaInputGUI\setCols(), and ilTextInputGUI\setMaxLength().

Referenced by initCreationForms().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($this->lng->txt("title"), "title");
$ti->setMaxLength(128);
$ti->setSize(40);
$ti->setRequired(true);
$this->form->addItem($ti);
// text area
$ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
$ta->setCols(40);
$ta->setRows(2);
$this->form->addItem($ta);
$this->form->addCommandButton("save", $lng->txt("create"));
$this->form->addCommandButton("cancel", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("scorm_new"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
$this->form->setTarget(ilFrameTargetInfo::_getFrame("MainContent"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::initCreationForms (   $a_new_type)

no manual SCORM creation, only import at the time

Reimplemented from ilObjectGUI.

Definition at line 233 of file class.ilObjSAHSLearningModuleGUI.php.

References ilObjectGUI\CFORM_IMPORT, ilObjectGUI\CFORM_NEW, initCreationForm(), and initUploadForm().

{
$forms = array();
$this->initUploadForm();
$forms[self::CFORM_IMPORT] = $this->form;
$this->initCreationForm();
$forms[self::CFORM_NEW] = $this->form;
return $forms;
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::initUploadForm ( )

Init upload form.

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

References $file, $ilCtrl, ilObjectGUI\$lng, $si, ilFrameTargetInfo\_getFrame(), ilUploadFiles\_getUploadDirectory(), ilUploadFiles\_getUploadFiles(), ilRadioOption\addSubItem(), ilSelectInputGUI\setOptions(), ilFormPropertyGUI\setRequired(), ilCheckboxInputGUI\setValue(), and ilRadioGroupInputGUI\setValue().

Referenced by initCreationForms().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// type selection
$options = array(
"scorm2004" => $lng->txt("lm_type_scorm2004"),
"scorm" => $lng->txt("lm_type_scorm"),
"aicc" => $lng->txt("lm_type_aicc"),
"hacp" => $lng->txt("lm_type_hacp")
);
$si = new ilSelectInputGUI($this->lng->txt("type"), "sub_type");
$si->setOptions($options);
$this->form->addItem($si);
// input file
$fi = new ilFileInputGUI($this->lng->txt("select_file"), "scormfile");
$fi->setRequired(true);
$this->form->addItem($fi);
// todo "uploaded file"
// todo wysiwyg editor removement
include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
{
$options = array();
$fi->setRequired(false);
$options[""] = $this->lng->txt("cont_select_from_upload_dir");
foreach($files as $file)
{
$file = htmlspecialchars($file, ENT_QUOTES, "utf-8");
$options[$file] = $file;
}
//
$si = new ilSelectInputGUI($this->lng->txt("cont_uploaded_file"), "uploaded_file");
$si->setOptions($options);
$this->form->addItem($si);
}
// validate file
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_validate_file"), "validate");
$cb->setValue("y");
//$cb->setChecked(true);
$this->form->addItem($cb);
// import for editing
$cb = new ilCheckboxInputGUI($this->lng->txt("sahs_authoring_mode"), "editable");
$cb->setValue("y");
$cb->setInfo($this->lng->txt("sahs_authoring_mode_info"));
$this->form->addItem($cb);
//
$radg = new ilRadioGroupInputGUI($lng->txt("sahs_sequencing"), "import_sequencing");
$radg->setValue(0);
$op1 = new ilRadioOption($lng->txt("sahs_std_sequencing"), 0,$lng->txt("sahs_std_sequencing_info"));
$radg->addOption($op1);
$op1 = new ilRadioOption($lng->txt("sahs_import_sequencing"), 1,$lng->txt("sahs_import_sequencing_info"));
$radg->addOption($op1);
$cb->addSubItem($radg);
$this->form->addCommandButton("upload", $lng->txt("import"));
$this->form->addCommandButton("cancel", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("import_sahs"));
$this->form->setFormAction($ilCtrl->getFormAction($this, "upload"));
$this->form->setTarget(ilFrameTargetInfo::_getFrame("MainContent"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::owner ( )

show owner of learning module

Definition at line 547 of file class.ilObjSAHSLearningModuleGUI.php.

{
$this->ownerObject();
}
ilObjSAHSLearningModuleGUI::properties ( )

module properties

Reimplemented in ilObjSCORM2004LearningModuleGUI, and ilObjSCORMLearningModuleGUI.

Definition at line 215 of file class.ilObjSAHSLearningModuleGUI.php.

{
}
ilObjSAHSLearningModuleGUI::saveObject ( )

save new learning module to db

Reimplemented from ilObjectGUI.

Definition at line 511 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET, $_POST, ilUtil\redirect(), ilUtil\sendInfo(), and ilUtil\stripSlashes().

{
if (trim($_POST["title"]) == "")
{
$this->ilias->raiseError($this->lng->txt("msg_no_title"),$this->ilias->error_obj->MESSAGE);
}
include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
$newObj->setTitle(ilUtil::stripSlashes($_POST["title"]));
$newObj->setSubType("scorm2004");
$newObj->setEditable(true);
$newObj->setDescription(ilUtil::stripSlashes($_POST["desc"]));
$newObj->create();
$newObj->createReference();
$newObj->putInTree($_GET["ref_id"]);
$newObj->setPermissions($_GET["ref_id"]);
$newObj->notify("new",$_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$newObj->getRefId());
$newObj->createDataDirectory();
$newObj->createScorm2004Tree();
ilUtil::sendInfo( $this->lng->txt($newObj->getType()."_added"), true);
ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$newObj->getRefId());
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::saveProperties ( )

save properties

Reimplemented in ilObjSCORM2004LearningModuleGUI, and ilObjSCORMLearningModuleGUI.

Definition at line 222 of file class.ilObjSAHSLearningModuleGUI.php.

{
}
ilObjSAHSLearningModuleGUI::setTabs ( )

output main frameset of media pool left frame: explorer tree of folders right frame: media pool content

output tabs

Reimplemented from ilObjectGUI.

Definition at line 580 of file class.ilObjSAHSLearningModuleGUI.php.

References ilUtil\getImagePath(), and getTabs().

Referenced by executeCommand(), and ilObjSCORM2004LearningModuleGUI\executeCommand().

{
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm_b.png"));
$this->tpl->setTitle($this->object->getTitle());
$this->getTabs($this->tabs_gui);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::upload ( )

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

References uploadObject().

{
$this->uploadObject();
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::uploadObject ( )

display status information or report errors messages in case of error

public

Definition at line 364 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET, $_POST, $file, $title, ilUploadFiles\_checkUploadFile(), ilUploadFiles\_copyUploadFile(), ilObject\_writeTitle(), ilUtil\moveUploadedFile(), ilUtil\redirect(), ilUtil\renameExecutables(), ilUtil\sendInfo(), and ilUtil\unzip().

Referenced by upload().

{
global $_FILES, $rbacsystem;
include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
// check create permission
if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], "sahs"))
{
$this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->WARNING);
}
elseif ($_FILES["scormfile"]["name"])
{
// check if file was uploaded
$source = $_FILES["scormfile"]["tmp_name"];
if (($source == 'none') || (!$source))
{
$this->ilias->raiseError($this->lng->txt("msg_no_file"),$this->ilias->error_obj->MESSAGE);
}
// get_cfg_var("upload_max_filesize"); // get the may filesize form t he php.ini
switch ($__FILES["scormfile"]["error"])
{
case UPLOAD_ERR_INI_SIZE:
$this->ilias->raiseError($this->lng->txt("err_max_file_size_exceeds"),$this->ilias->error_obj->MESSAGE);
break;
case UPLOAD_ERR_FORM_SIZE:
$this->ilias->raiseError($this->lng->txt("err_max_file_size_exceeds"),$this->ilias->error_obj->MESSAGE);
break;
case UPLOAD_ERR_PARTIAL:
$this->ilias->raiseError($this->lng->txt("err_partial_file_upload"),$this->ilias->error_obj->MESSAGE);
break;
case UPLOAD_ERR_NO_FILE:
$this->ilias->raiseError($this->lng->txt("err_no_file_uploaded"),$this->ilias->error_obj->MESSAGE);
break;
}
$file = pathinfo($_FILES["scormfile"]["name"]);
}
elseif ($_POST["uploaded_file"])
{
// check if the file is in the upload directory and readable
if (!ilUploadFiles::_checkUploadFile($_POST["uploaded_file"]))
{
$this->ilias->raiseError($this->lng->txt("upload_error_file_not_found"),$this->ilias->error_obj->MESSAGE);
}
$file = pathinfo($_POST["uploaded_file"]);
}
else
{
$this->ilias->raiseError($this->lng->txt("msg_no_file"),$this->ilias->error_obj->MESSAGE);
}
$name = substr($file["basename"], 0, strlen($file["basename"]) - strlen($file["extension"]) - 1);
if ($name == "")
{
$name = $this->lng->txt("no_title");
}
// create and insert object in objecttree
switch ($_POST["sub_type"])
{
case "scorm2004":
include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
$newObj->setEditable($_POST["editable"]=='y');
$newObj->setImportSequencing($_POST["import_sequencing"]);
$newObj->setSequencingExpertMode($_POST["import_sequencing"]);
break;
case "scorm":
include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php");
$newObj = new ilObjSCORMLearningModule();
break;
case "aicc":
include_once("./Modules/ScormAicc/classes/class.ilObjAICCLearningModule.php");
$newObj = new ilObjAICCLearningModule();
break;
case "hacp":
include_once("./Modules/ScormAicc/classes/class.ilObjHACPLearningModule.php");
$newObj = new ilObjHACPLearningModule();
break;
}
$newObj->setTitle($name);
$newObj->setSubType($_POST["sub_type"]);
$newObj->setDescription("");
$newObj->create(true);
$newObj->createReference();
$newObj->putInTree($_GET["ref_id"]);
$newObj->setPermissions($_GET["ref_id"]);
$newObj->notify("new",$_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$newObj->getRefId());
// create data directory, copy file to directory
$newObj->createDataDirectory();
if ($_FILES["scormfile"]["name"])
{
// copy uploaded file to data directory
$file_path = $newObj->getDataDirectory()."/".$_FILES["scormfile"]["name"];
ilUtil::moveUploadedFile($_FILES["scormfile"]["tmp_name"],
$_FILES["scormfile"]["name"], $file_path);
}
else
{
// copy uploaded file to data directory
$file_path = $newObj->getDataDirectory()."/". $_POST["uploaded_file"];
ilUploadFiles::_copyUploadFile($_POST["uploaded_file"], $file_path);
}
ilUtil::unzip($file_path);
ilUtil::renameExecutables($newObj->getDataDirectory());
$title = $newObj->readObject();
if ($title != "")
{
ilObject::_writeTitle($newObj->getId(), $title);
/*$md = new ilMD($newObj->getId(),0, $newObj->getType());
if(is_object($md_gen = $md->getGeneral()))
{
$md_gen->setTitle($title);
$md_gen->update();
}*/
}
ilUtil::sendInfo( $this->lng->txt($newObj->getType()."_added"), true);
ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$newObj->getRefId());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::viewObject ( )

list childs of current object

public

Reimplemented from ilObjectGUI.

Definition at line 201 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET.

{
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
}
else
{
}
}

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