ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjSAHSLearningModule Class Reference

Class ilObjSCORMLearningModule. More...

+ Inheritance diagram for ilObjSAHSLearningModule:
+ Collaboration diagram for ilObjSAHSLearningModule:

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor public. More...
 
 create ($upload=false)
 create file based lm More...
 
 read ()
 read object More...
 
 setEditable ($a_editable)
 Set Editable. More...
 
 getEditable ()
 Get Editable. More...
 
 setTries ($a_tries)
 Set default tries for questions. More...
 
 getTries ()
 Get Tries. More...
 
 setLocalization ($a_val)
 Set localization. More...
 
 getLocalization ()
 Get localization. More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 createDataDirectory ()
 creates data directory for package files ("./data/lm_data/lm_<id>") More...
 
 getDataDirectory ($mode="filesystem")
 get data directory of lm More...
 
 getAPIAdapterName ()
 get api adapter name More...
 
 setAPIAdapterName ($a_api)
 set api adapter name More...
 
 getAPIFunctionsPrefix ()
 get api functions prefix More...
 
 setAPIFunctionsPrefix ($a_prefix)
 set api functions prefix More...
 
 getCreditMode ()
 get credit mode More...
 
 setCreditMode ($a_credit_mode)
 set credit mode More...
 
 setDefaultLessonMode ($a_lesson_mode)
 set default lesson mode More...
 
 getDefaultLessonMode ()
 get default lesson mode More...
 
 getStyleSheetId ()
 get ID of assigned style sheet object More...
 
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object More...
 
 setAutoReview ($a_auto_review)
 set auto review as true/false for SCORM 1.2, HACP, SAHS, AICC More...
 
 getAutoReview ()
 get auto review as true/false for SCORM 1.2, HACP, SAHS, AICC More...
 
 setAutoReviewChar ($a_auto_review)
 set auto review as Char for SCORM 2004 More...
 
 getAutoReviewChar ()
 get auto review as Char for SCORM 2004 More...
 
 getMaxAttempt ()
 get max attempt More...
 
 setMaxAttempt ($a_max_attempt)
 set max attempt More...
 
 getModuleVersion ()
 get module version More...
 
 getAssignedGlossary ()
 get assigned glossary More...
 
 setAssignedGlossary ($a_assigned_glossary)
 set assigned glossary More...
 
 setModuleVersion ($a_module_version)
 set max attempt More...
 
 getSession ()
 get session setting More...
 
 setSession ($a_session)
 set session setting More...
 
 getNoMenu ()
 disable menu More...
 
 setNoMenu ($a_no_menu)
 disable menu More...
 
 getHideNavig ()
 hide navigation tree More...
 
 setHideNavig ($a_hide_navig)
 disable menu More...
 
 getCacheDeactivated ()
 BrowserCacheDisabled for SCORM 2004 / ENABLE_JS_DEBUG. More...
 
 getSessionDeactivated ()
 sessionDisabled for SCORM 2004 More...
 
 getDebugActivated ()
 debugActivated More...
 
 getIe_compatibility ()
 set compatibility mode for Internet Exlorer manually More...
 
 setIe_compatibility ($a_ie_compatibility)
 
 getIe_force_render ()
 force Internet Explorer to render again after some Milliseconds - useful for learning Modules with a lot of iframesor frames and IE >=10 More...
 
 setIe_force_render ($a_ie_force_render)
 
 getFourth_Edition ()
 SCORM 2004 4th edition features. More...
 
 setFourth_edition ($a_fourth_edition)
 
 getSequencing ()
 sequencing More...
 
 setSequencing ($a_sequencing)
 
 getInteractions ()
 interactions More...
 
 setInteractions ($a_interactions)
 
 getObjectives ()
 objectives More...
 
 setObjectives ($a_objectives)
 
 getComments ()
 comments More...
 
 setComments ($a_comments)
 
 getTime_from_lms ()
 time_from_lms More...
 
 setTime_from_lms ($a_time_from_lms)
 
 getCheck_values ()
 check_values More...
 
 setCheck_values ($a_check_values)
 
 getOfflineMode ()
 offlineMode More...
 
 setOfflineMode ($a_offline_mode)
 
 getDebug ()
 debug More...
 
 setDebug ($a_debug)
 debug More...
 
 getDebugPw ()
 debug pw More...
 
 setDebugPw ($a_debug_pw)
 debug pw More...
 
 setAutoContinue ($a_auto_continue)
 get auto continue More...
 
 getAutoContinue ()
 set auto continue More...
 
 getAuto_last_visited ()
 auto_last_visited More...
 
 setAuto_last_visited ($a_auto_last_visited)
 
 setSequencingExpertMode ($a_val)
 Set sequencing expert mode. More...
 
 getSequencingExpertMode ()
 Get sequencing expert mode. More...
 
 setAutoSuspend ($a_auto_suspend)
 get auto continue More...
 
 getAutoSuspend ()
 set auto continue More...
 
 getOpenMode ()
 open_mode 0: in Tab/new Window like in previous versions 1: in iFrame with width=100% and heigth=100% 2: in iFrame with specified width and height 3: 4: 5: in new Window without specified width and height 6: in new Window with specified width and height More...
 
 setOpenMode ($a_open_mode)
 
 getWidth ()
 width More...
 
 setWidth ($a_width)
 
 getHeight ()
 height More...
 
 setHeight ($a_height)
 
 getMasteryScore ()
 get mastery_score More...
 
 setMasteryScore ($a_mastery_score)
 set mastery_score More...
 
 checkMasteryScoreValues ()
 check mastery_score / min_normalized_measure of SCOs (SCORM 1.2) / objectives (SCORM 2004) More...
 
 getMasteryScoreValues ()
 get mastery_score_values More...
 
 update ()
 update values for mastery_score / min_normalized_measure in database - not requested More...
 
 setOnline ($a_online)
 get online More...
 
 getOnline ()
 set online More...
 
 setSubType ($a_sub_type)
 get sub type More...
 
 getSubType ()
 set sub type More...
 
 delete ()
 delete SCORM learning module and all related data More...
 
 getPointsInPercent ()
 Returns the points in percent for the learning module This is called by the certificate generator if [SCORM_POINTS] is inserted. More...
 
 getMaxPoints ()
 Returns score.max for the learning module, refered to the last sco where score.max is set. More...
 
 populateByDirectoy ($a_dir, $a_filename="")
 Populate by directory. More...
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone scorm object. More...
 
 zipLmForOfflineMode ()
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ... More...
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _lookupOnline ($a_id)
 check wether scorm module is online More...
 
static getAffectiveLocalization ($a_id)
 Get affective localization. More...
 
static _lookupSubType ($a_obj_id)
 lookup subtype id (scorm, aicc, hacp) More...
 
static _getTries ($a_id)
 
static getScormModulesForGlossary ($a_glo_id)
 Get SCORM modules that assign a certain glossary. More...
 
static lookupAssignedGlossary ($a_slm_id)
 Get SCORM modules that assign a certain glossary. More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
static setDeletedDates ($a_ref_ids)
 Set deleted date type $ilDB. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

 $validator
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $ilias
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSAHSLearningModule::__construct (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

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

32  {
33  $this->type = "sahs";
34  parent::__construct($a_id,$a_call_by_reference);
35  }

Member Function Documentation

◆ _getTries()

static ilObjSAHSLearningModule::_getTries (   $a_id)
static

Definition at line 230 of file class.ilObjSAHSLearningModule.php.

References $ilDB, $lm_set, and array.

Referenced by ilPCQuestionGUI\edit().

231  {
232  global $ilDB;
233 
234  $lm_set = $ilDB->queryF('SELECT question_tries FROM sahs_lm WHERE id = %s',
235  array('integer'), array($a_id));
236  $lm_rec = $ilDB->fetchAssoc($lm_set);
237 
238  return $lm_rec['question_tries'];
239  }
Create styles array
The data for the language used.
$lm_set
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupOnline()

static ilObjSAHSLearningModule::_lookupOnline (   $a_id)
static

check wether scorm module is online

Definition at line 122 of file class.ilObjSAHSLearningModule.php.

References $ilDB, $lm_set, array, and ilUtil\yn2tf().

123  {
124  global $ilDB;
125 
126  $lm_set = $ilDB->queryF('SELECT c_online FROM sahs_lm WHERE id = %s',
127  array('integer'), array($a_id));
128  $lm_rec = $ilDB->fetchAssoc($lm_set);
129 
130  return ilUtil::yn2tf($lm_rec["c_online"]);
131  }
Create styles array
The data for the language used.
$lm_set
global $ilDB
static yn2tf($a_yn)
convert "y"/"n" to true/false
+ Here is the call graph for this function:

◆ _lookupSubType()

static ilObjSAHSLearningModule::_lookupSubType (   $a_obj_id)
static

lookup subtype id (scorm, aicc, hacp)

Parameters
int$a_idobject id

Definition at line 158 of file class.ilObjSAHSLearningModule.php.

References $ilDB, and array.

Referenced by ilSCORMOfflineMode\__construct(), ilLPStatusSCORM\_getStatusInfo(), ilObjSAHSLearningModuleAccess\_lookupUserCertificate(), ilCtrl\checkLPSettingsForward(), checkMasteryScoreValues(), ilLPStatusSCORM\determinePercentage(), ilLPStatusSCORM\determineStatus(), ilSCORMPresentationGUI\downloadCertificate(), ilSAHSEditGUI\executeCommand(), ilSAHSPresentationGUI\executeCommand(), ilSCORMVerificationTableGUI\getItems(), ilTrQuery\getObjectsDataForUser(), ilTrQuery\getParticipantsForObject(), ilLPCollectionOfSCOs\getPossibleItems(), ilObjSAHSLearningModuleListGUI\getProperties(), ilLPCollectionOfSCOs\getScoresForUserAndCP_Node_Id(), ilTrQuery\getSCOsStatusForUser(), ilScormLP\getValidModes(), ilObjSCORM2004LearningModuleGUI\initPropertiesForm(), ilObjSCORMLearningModuleGUI\newModuleVersion(), ilObjSCORMLearningModuleGUI\properties(), ilLPStatusSCORM\refreshStatus(), ilObjSCORMVerificationGUI\save(), and ilSAHSPresentationGUI\setInfoTabs().

159  {
160  global $ilDB;
161 
162  $obj_set = $ilDB->queryF('SELECT c_type FROM sahs_lm WHERE id = %s',
163  array('integer'), array($a_obj_id));
164  $obj_rec = $ilDB->fetchAssoc($obj_set);
165 
166  return $obj_rec["c_type"];
167  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ checkMasteryScoreValues()

ilObjSAHSLearningModule::checkMasteryScoreValues ( )

check mastery_score / min_normalized_measure of SCOs (SCORM 1.2) / objectives (SCORM 2004)

Definition at line 805 of file class.ilObjSAHSLearningModule.php.

References $ilDB, ilObject\$type, _lookupSubType(), and array.

806  {
807  global $ilDB;
808  $s_result = "";
809  $a_result = array();
810  $type = $this->_lookupSubType( $this->getID() );
811 
812  if ($type == "scorm2004") {
813  $set = $ilDB->query("SELECT minnormalmeasure FROM cp_objective, cp_node".
814  " WHERE satisfiedbymeasure=1 AND minnormalmeasure is not null AND cp_objective.cp_node_id=cp_node.cp_node_id AND".
815  " slm_id = ".$ilDB->quote($this->getID(), "integer"));
816  while ($rec = $ilDB->fetchAssoc($set)) {
817  $tmpval = $rec["minnormalmeasure"]*100;
818  if (!in_array($tmpval,$a_result)) $a_result[] = $tmpval;
819  }
820  } else {
821  $set = $ilDB->query("SELECT masteryscore FROM sc_item,scorm_object".
822  " WHERE sc_item.masteryscore is not null AND sc_item.obj_id=scorm_object.obj_id AND".
823  " slm_id = ".$ilDB->quote($this->getID(), "integer"));
824  while ($rec = $ilDB->fetchAssoc($set)) {
825  if (!in_array($rec["masteryscore"],$a_result)) $a_result[] = $rec["masteryscore"];
826  }
827  }
828  $s_result = implode(", ",$a_result);
829  $this->mastery_score_values = $s_result;
830  }
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, aicc, hacp)
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ cloneObject()

ilObjSAHSLearningModule::cloneObject (   $a_target_id,
  $a_copy_id = 0,
  $a_omit_tree = false 
)

Clone scorm object.

Parameters
inttarget ref_id
intcopy id

Definition at line 1298 of file class.ilObjSAHSLearningModule.php.

References $ilDB, ilObject\$ilias, $ilUser, ilCopyWizardOptions\_getInstance(), ilObject\cloneMetaData(), getAPIAdapterName(), getAPIFunctionsPrefix(), getAssignedGlossary(), getAuto_last_visited(), getAutoContinue(), getAutoReviewChar(), getAutoSuspend(), getCheck_values(), getComments(), getCreditMode(), getDebug(), getDebugPw(), getDefaultLessonMode(), ilObject\getDescription(), getEditable(), getHeight(), getHideNavig(), getIe_compatibility(), getIe_force_render(), getInteractions(), getLocalization(), getMaxAttempt(), getModuleVersion(), getNoMenu(), getObjectives(), getOfflineMode(), getOnline(), getOpenMode(), ilObject\getRefId(), getSequencing(), getSequencingExpertMode(), getSession(), getStyleSheetId(), getSubType(), getTime_from_lms(), ilObject\getTitle(), getTries(), getWidth(), and populateByDirectoy().

1299  {
1300  global $ilDB, $ilUser, $ilias;
1301 
1302  $new_obj = parent::cloneObject($a_target_id,$a_copy_id, $a_omit_tree);
1303  $this->cloneMetaData($new_obj);
1304 
1305  //copy online status if object is not the root copy object
1306  $cp_options = ilCopyWizardOptions::_getInstance($a_copy_id);
1307 
1308  if(!$cp_options->isRootNode($this->getRefId()))
1309  {
1310  $new_obj->setOnline($this->getOnline());
1311  }
1312 
1313  // copy properties
1314  $new_obj->setTitle($this->getTitle());
1315  $new_obj->setDescription($this->getDescription());
1316  $new_obj->setSubType($this->getSubType());
1317  $new_obj->setAPIAdapterName($this->getAPIAdapterName());
1318  $new_obj->setAPIFunctionsPrefix($this->getAPIFunctionsPrefix());
1319  $new_obj->setAutoReviewChar($this->getAutoReviewChar());
1320  $new_obj->setDefaultLessonMode($this->getDefaultLessonMode());
1321  $new_obj->setEditable($this->getEditable());
1322  $new_obj->setMaxAttempt($this->getMaxAttempt());
1323  $new_obj->setModuleVersion($this->getModuleVersion());
1324  $new_obj->setModuleVersion(1);
1325  $new_obj->setCreditMode($this->getCreditMode());
1326  $new_obj->setAssignedGlossary($this->getAssignedGlossary());
1327  $new_obj->setTries($this->getTries());
1328  $new_obj->setSession($this->getSession());
1329  $new_obj->setNoMenu($this->getNoMenu());
1330  $new_obj->setHideNavig($this->getHideNavig());
1331  $new_obj->setFourth_edition($this->getFourth_edition());
1332  $new_obj->setSequencing($this->getSequencing());
1333  $new_obj->setInteractions($this->getInteractions());
1334  $new_obj->setObjectives($this->getObjectives());
1335  $new_obj->setComments($this->getComments());
1336  $new_obj->setTime_from_lms($this->getTime_from_lms());
1337  $new_obj->setDebug($this->getDebug());
1338  $new_obj->setLocalization($this->getLocalization());
1339  $new_obj->setSequencingExpertMode($this->getSequencingExpertMode());
1340  $new_obj->setDebugPw($this->getDebugPw());
1341  $new_obj->setOpenMode($this->getOpenMode());
1342  $new_obj->setWidth($this->getWidth());
1343  $new_obj->setHeight($this->getHeight());
1344  $new_obj->setAutoContinue($this->getAutoContinue());
1345  $new_obj->setAuto_last_visited($this->getAuto_last_visited());
1346  $new_obj->setCheck_values($this->getCheck_values());
1347  $new_obj->setOfflineMode($this->getOfflineMode());
1348  $new_obj->setAutoSuspend($this->getAutoSuspend());
1349  $new_obj->setIe_compatibility($this->getIe_compatibility());
1350  $new_obj->setIe_force_render($this->getIe_force_render());
1351  $new_obj->setStyleSheetId($this->getStyleSheetId());
1352  $new_obj->update();
1353 
1354 
1355  // set/copy stylesheet
1356 /* include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1357  $style_id = $this->getStyleSheetId();
1358  if ($style_id > 0 && !ilObjStyleSheet::_lookupStandard($style_id))
1359  {
1360  $style_obj = $ilias->obj_factory->getInstanceByObjId($style_id);
1361  $new_id = $style_obj->ilClone();
1362  $new_obj->setStyleSheetId($new_id);
1363  $new_obj->update();
1364  }*/
1365 
1366  // up to this point $new_obj is of type ilobjsahslearning module
1367 
1368  // create instance of correct subtype and call forward it to
1369  // cloneIntoNewObject method
1370  switch ($this->getSubType())
1371  {
1372  case "scorm":
1373  include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php");
1374  $source_obj = new ilObjSCORMLearningModule($this->getRefId());
1375  $new_obj = new ilObjSCORMLearningModule($new_obj->getRefId());
1376  break;
1377 
1378  case "scorm2004":
1379  include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
1380  $source_obj = new ilObjSCORM2004LearningModule($this->getRefId());
1381  $new_obj = new ilObjSCORM2004LearningModule($new_obj->getRefId());
1382  break;
1383 
1384  case "aicc":
1385  include_once("./Modules/ScormAicc/classes/class.ilObjAICCLearningModule.php");
1386  $source_obj = new ilObjAICCLearningModule($this->getRefId());
1387  $new_obj = new ilObjAICCLearningModule($new_obj->getRefId());
1388  break;
1389 
1390  case "hacp":
1391  include_once("./Modules/ScormAicc/classes/class.ilObjHACPLearningModule.php");
1392  $source_obj = new ilObjHACPLearningModule($this->getRefId());
1393  $new_obj = new ilObjHACPLearningModule($new_obj->getRefId());
1394  break;
1395 
1396  }
1397 
1398  // copy data directory
1399  $new_obj->populateByDirectoy($source_obj->getDataDirectory());
1400 
1401  // copy authored content ...
1402  if ($new_obj->getEditable())
1403  {
1404  $source_obj->copyAuthoredContent($new_obj);
1405  }
1406  else
1407  {
1408  // ... or read manifest file
1409  $new_obj->readObject();
1410  }
1411 
1412  return $new_obj;
1413  }
getSequencingExpertMode()
Get sequencing expert mode.
getStyleSheetId()
get ID of assigned style sheet object
getIe_compatibility()
set compatibility mode for Internet Exlorer manually
Class ilObjAICCLearningModule.
Class ilObjAICCLearningModule.
getAutoReviewChar()
get auto review as Char for SCORM 2004
getAPIAdapterName()
get api adapter name
getAssignedGlossary()
get assigned glossary
getAPIFunctionsPrefix()
get api functions prefix
populateByDirectoy($a_dir, $a_filename="")
Populate by directory.
getIe_force_render()
force Internet Explorer to render again after some Milliseconds - useful for learning Modules with a ...
static _getInstance($a_copy_id)
Get instance of copy wizard options.
getOpenMode()
open_mode 0: in Tab/new Window like in previous versions 1: in iFrame with width=100% and heigth=100%...
getTitle()
get object title public
getDescription()
get object description
$ilUser
Definition: imgupload.php:18
cloneMetaData($target_obj)
Copy meta data.
Class ilObjSCORM2004LearningModule.
global $ilDB
getRefId()
get reference id public
getDefaultLessonMode()
get default lesson mode
Class ilObjSCORMLearningModule.
+ Here is the call graph for this function:

◆ create()

ilObjSAHSLearningModule::create (   $upload = false)

create file based lm

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

References $ilDB, array, createDataDirectory(), ilObject\createMetaData(), getEditable(), ilObject\getId(), getLocalization(), getSequencingExpertMode(), and getSubType().

41  {
42  global $ilDB;
43 
44  parent::create();
45  if(!$upload)
46  $this->createMetaData();
47 
48  $this->createDataDirectory();
49 
50  $ilDB->manipulateF('
51  INSERT INTO sahs_lm (id, c_online, api_adapter, c_type, editable, seq_exp_mode,localization)
52  VALUES (%s,%s,%s,%s,%s,%s,%s)',
53  array('integer', 'text', 'text', 'text', 'integer','integer','text'),
54  array($this->getId(),'n','API', $this->getSubType(),(int)$this->getEditable(),
55  (int)$this->getSequencingExpertMode(), $this->getLocalization()
56  ));
57  }
getSequencingExpertMode()
Get sequencing expert mode.
createMetaData()
create meta data entry
createDataDirectory()
creates data directory for package files ("./data/lm_data/lm_<id>")
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ createDataDirectory()

ilObjSAHSLearningModule::createDataDirectory ( )

creates data directory for package files ("./data/lm_data/lm_<id>")

Definition at line 257 of file class.ilObjSAHSLearningModule.php.

References getDataDirectory(), ilUtil\getWebspaceDir(), and ilUtil\makeDir().

Referenced by create().

258  {
259  $lm_data_dir = ilUtil::getWebspaceDir()."/lm_data";
260  ilUtil::makeDir($lm_data_dir);
262  }
getDataDirectory($mode="filesystem")
get data directory of lm
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilObjSAHSLearningModule::delete ( )

delete SCORM learning module and all related data

this method has been tested on may 9th 2004 meta data, scorm lm data, scorm tree, scorm objects (organization(s), manifest, resources and items), tracking data and data directory have been deleted correctly as desired

public

Returns
boolean true if all object data were removed; false if only a references were removed

Definition at line 1124 of file class.ilObjSAHSLearningModule.php.

References $ilDB, $ilLog, $res, $row, ilSCORMObject\_getInstance(), array, ilUtil\delDir(), ilObject\deleteMetaData(), getDataDirectory(), ilObject\getId(), and getSubType().

1125  {
1126  global $ilDB, $ilLog;
1127 
1128  // always call parent delete function first!!
1129  if (!parent::delete())
1130  {
1131  return false;
1132  }
1133 
1134  // delete meta data of scorm content object
1135  $this->deleteMetaData();
1136 
1137  // delete data directory
1138  ilUtil::delDir($this->getDataDirectory());
1139 
1140  // delete scorm learning module record
1141  $ilDB->manipulateF('DELETE FROM sahs_lm WHERE id = %s',
1142  array('integer'), array($this->getId()));
1143 
1144  $ilLog->write("SAHS Delete(SAHSLM), Subtype: ".$this->getSubType());
1145 
1146  if ($this->getSubType() == "scorm")
1147  {
1148  // remove all scorm objects and scorm tree
1149  include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMTree.php");
1150  include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMObject.php");
1151  $sc_tree = new ilSCORMTree($this->getId());
1152  $r_id = $sc_tree->readRootId();
1153  if ($r_id > 0)
1154  {
1155  $items = $sc_tree->getSubTree($sc_tree->getNodeData($r_id));
1156  foreach($items as $item)
1157  {
1158  $sc_object = ilSCORMObject::_getInstance($item["obj_id"], $this->getId());
1159  if (is_object($sc_object))
1160  {
1161  $sc_object->delete();
1162  }
1163  }
1164  $sc_tree->removeTree($sc_tree->getTreeId());
1165  }
1166  }
1167 
1168  if ($this->getSubType() != "scorm")
1169  {
1170  // delete aicc data
1171  $res = $ilDB->queryF('
1172  SELECT aicc_object.obj_id FROM aicc_object, aicc_units
1173  WHERE aicc_object.obj_id = aicc_units.obj_id
1174  AND aicc_object.slm_id = %s',
1175  array('integer'), array($this->getId()));
1176 
1177  while($row = $ilDB->fetchAssoc($res))
1178  {
1179  $obj_id = $row['obj_id'];
1180  $ilDB->manipulateF('
1181  DELETE FROM aicc_units WHERE obj_id = %s',
1182  array('integer'), array($obj_id));
1183  }
1184 
1185  $res = $ilDB->queryF('
1186  SELECT aicc_object.obj_id FROM aicc_object, aicc_course
1187  WHERE aicc_object.obj_id = aicc_course.obj_id
1188  AND aicc_object.slm_id = %s',
1189  array('integer'), array($this->getId()));
1190 
1191  while($row = $ilDB->fetchAssoc($res))
1192  {
1193  $obj_id = $row['obj_id'];
1194  $ilDB->manipulateF('
1195  DELETE FROM aicc_course WHERE obj_id = %s',
1196  array('integer'), array($obj_id));
1197  }
1198 
1199  $ilDB->manipulateF('
1200  DELETE FROM aicc_object WHERE slm_id = %s',
1201  array('integer'), array($this->getId()));
1202  }
1203 
1204  $q_log = "DELETE FROM scorm_tracking WHERE obj_id = ".$ilDB->quote($this->getId());
1205  $ilLog->write("SAHS Delete(SAHSLM): ".$q_log);
1206 
1207  $ilDB->manipulateF('DELETE FROM scorm_tracking WHERE obj_id = %s',
1208  array('integer'), array($this->getId()));
1209 
1210  $q_log = "DELETE FROM sahs_user WHERE obj_id = ".$ilDB->quote($this->getId());
1211  $ilLog->write("SAHS Delete(SAHSLM): ".$q_log);
1212 
1213  $ilDB->manipulateF('DELETE FROM sahs_user WHERE obj_id = %s',
1214  array('integer'), array($this->getId()));
1215 
1216  // always call parent delete function at the end!!
1217  return true;
1218  }
getDataDirectory($mode="filesystem")
get data directory of lm
getId()
get object id public
SCORM Object Tree.
Create styles array
The data for the language used.
global $ilDB
deleteMetaData()
delete meta data entry
& _getInstance($a_id, $a_slm_id)
get instance of specialized GUI class
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
+ Here is the call graph for this function:

◆ getAffectiveLocalization()

static ilObjSAHSLearningModule::getAffectiveLocalization (   $a_id)
static

Get affective localization.

Parameters
int$a_idscorm lm id

Definition at line 138 of file class.ilObjSAHSLearningModule.php.

References $ilDB, $lm_set, ilObject\$lng, and array.

Referenced by ilSCORM2004PageConfig\configureByObjectId(), ilSCORM2004Asset\exportHTMLPageObjects(), ilSCORM2004ScoGUI\getGloOverviewOv(), ilSCORM2004PageGUI\postOutputProcessing(), and ilSCORM2004ScoGUI\sco_preview().

139  {
140  global $ilDB, $lng;
141 
142  $lm_set = $ilDB->queryF('SELECT localization FROM sahs_lm WHERE id = %s',
143  array('integer'), array($a_id));
144  $lm_rec = $ilDB->fetchAssoc($lm_set);
145  $inst_lang = $lng->getInstalledLanguages();
146  if ($lm_rec["localization"] != "" && in_array($lm_rec["localization"], $inst_lang))
147  {
148  return $lm_rec["localization"];
149  }
150  return $lng->getLangKey();
151  }
Create styles array
The data for the language used.
$lm_set
global $ilDB
+ Here is the caller graph for this function:

◆ getAPIAdapterName()

ilObjSAHSLearningModule::getAPIAdapterName ( )

get api adapter name

Definition at line 278 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

279  {
280  return $this->api_adapter;
281  }
+ Here is the caller graph for this function:

◆ getAPIFunctionsPrefix()

ilObjSAHSLearningModule::getAPIFunctionsPrefix ( )

get api functions prefix

Definition at line 294 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

295  {
296  return $this->api_func_prefix;
297  }
+ Here is the caller graph for this function:

◆ getAssignedGlossary()

ilObjSAHSLearningModule::getAssignedGlossary ( )

get assigned glossary

Definition at line 413 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), ilObjSCORM2004LearningModule\exportHTMLScoObjects(), ilObjSCORM2004LearningModule\exportPDF(), ilObjSCORM2004LearningModule\exportScorm(), and update().

414  {
415  return $this->assigned_glossary;
416  }
+ Here is the caller graph for this function:

◆ getAuto_last_visited()

ilObjSAHSLearningModule::getAuto_last_visited ( )

auto_last_visited

Definition at line 695 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

696  {
697  return $this->auto_last_visited;
698  }
+ Here is the caller graph for this function:

◆ getAutoContinue()

ilObjSAHSLearningModule::getAutoContinue ( )

set auto continue

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

Referenced by cloneObject(), and update().

688  {
689  return $this->auto_continue;
690  }
+ Here is the caller graph for this function:

◆ getAutoReview()

ilObjSAHSLearningModule::getAutoReview ( )

get auto review as true/false for SCORM 1.2, HACP, SAHS, AICC

Definition at line 365 of file class.ilObjSAHSLearningModule.php.

References ilUtil\yn2tf().

366  {
367  return ilUtil::yn2tf($this->auto_review);
368  }
static yn2tf($a_yn)
convert "y"/"n" to true/false
+ Here is the call graph for this function:

◆ getAutoReviewChar()

ilObjSAHSLearningModule::getAutoReviewChar ( )

get auto review as Char for SCORM 2004

Definition at line 380 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

381  {
382  return $this->auto_review;
383  }
+ Here is the caller graph for this function:

◆ getAutoSuspend()

ilObjSAHSLearningModule::getAutoSuspend ( )

set auto continue

Definition at line 736 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

737  {
738  return $this->auto_suspend;
739  }
+ Here is the caller graph for this function:

◆ getCacheDeactivated()

ilObjSAHSLearningModule::getCacheDeactivated ( )

BrowserCacheDisabled for SCORM 2004 / ENABLE_JS_DEBUG.

Definition at line 484 of file class.ilObjSAHSLearningModule.php.

References $ilSetting, and $lm_set.

485  {
486  global $ilSetting;
487  $lm_set = new ilSetting("lm");
488  if ($lm_set->get("scormdebug_disable_cache") == "1") return true;
489  return false;
490  }
ILIAS Setting Class.
$lm_set
global $ilSetting
Definition: privfeed.php:17

◆ getCheck_values()

ilObjSAHSLearningModule::getCheck_values ( )

check_values

Definition at line 621 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

622  {
623  return $this->check_values;
624  }
+ Here is the caller graph for this function:

◆ getComments()

ilObjSAHSLearningModule::getComments ( )

comments

Definition at line 595 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

596  {
597  return $this->comments;
598  }
+ Here is the caller graph for this function:

◆ getCreditMode()

ilObjSAHSLearningModule::getCreditMode ( )

get credit mode

Definition at line 310 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

311  {
312  return $this->credit_mode;
313  }
+ Here is the caller graph for this function:

◆ getDataDirectory()

ilObjSAHSLearningModule::getDataDirectory (   $mode = "filesystem")

get data directory of lm

Definition at line 267 of file class.ilObjSAHSLearningModule.php.

References ilObject\getId(), and ilUtil\getWebspaceDir().

Referenced by ilObjSCORM2004LearningModule\convert_1_2_to_2004(), createDataDirectory(), ilObjAICCLearningModule\delete(), delete(), populateByDirectoy(), ilObjAICCLearningModule\readObject(), ilObjSCORM2004LearningModule\readObject(), and ilObjSCORMLearningModule\readObject().

268  {
269  $lm_data_dir = ilUtil::getWebspaceDir($mode)."/lm_data";
270  $lm_dir = $lm_data_dir."/lm_".$this->getId();
271 
272  return $lm_dir;
273  }
getId()
get object id public
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDebug()

ilObjSAHSLearningModule::getDebug ( )

debug

Definition at line 648 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

649  {
650  return $this->debug;
651  }
+ Here is the caller graph for this function:

◆ getDebugActivated()

ilObjSAHSLearningModule::getDebugActivated ( )

debugActivated

Definition at line 506 of file class.ilObjSAHSLearningModule.php.

References $ilSetting, and $lm_set.

507  {
508  global $ilSetting;
509  $lm_set = new ilSetting("lm");
510  if ($lm_set->get("scormdebug_global_activate") == "1") return true;
511  return false;
512  }
ILIAS Setting Class.
$lm_set
global $ilSetting
Definition: privfeed.php:17

◆ getDebugPw()

ilObjSAHSLearningModule::getDebugPw ( )

debug pw

Definition at line 664 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

665  {
666  return $this->debug_pw;
667  }
+ Here is the caller graph for this function:

◆ getDefaultLessonMode()

ilObjSAHSLearningModule::getDefaultLessonMode ( )

get default lesson mode

Definition at line 334 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

335  {
336  return $this->lesson_mode;
337  }
+ Here is the caller graph for this function:

◆ getDiskUsage()

ilObjSAHSLearningModule::getDiskUsage ( )

Gets the disk usage of the object in bytes.

public

Returns
integer the disk usage in bytes

Definition at line 246 of file class.ilObjSAHSLearningModule.php.

References ilObjSAHSLearningModuleAccess\_lookupDiskUsage().

247  {
248  require_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php");
250  }
static _lookupDiskUsage($a_id)
Returns the number of bytes used on the harddisk by the learning module with the specified object id...
+ Here is the call graph for this function:

◆ getEditable()

ilObjSAHSLearningModule::getEditable ( )

Get Editable.

Returns
boolean Editable

Definition at line 184 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), create(), ilObjSCORM2004LearningModule\readObject(), and update().

185  {
186  return $this->editable;
187  }
+ Here is the caller graph for this function:

◆ getFourth_Edition()

ilObjSAHSLearningModule::getFourth_Edition ( )

SCORM 2004 4th edition features.

Definition at line 543 of file class.ilObjSAHSLearningModule.php.

544  {
545  return $this->fourth_edition;
546  }

◆ getHeight()

ilObjSAHSLearningModule::getHeight ( )

height

Definition at line 776 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

777  {
778  return $this->height;
779  }
+ Here is the caller graph for this function:

◆ getHideNavig()

ilObjSAHSLearningModule::getHideNavig ( )

hide navigation tree

Definition at line 468 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

469  {
470  return $this->hide_navig;
471  }
+ Here is the caller graph for this function:

◆ getIe_compatibility()

ilObjSAHSLearningModule::getIe_compatibility ( )

set compatibility mode for Internet Exlorer manually

Definition at line 517 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

518  {
519  return $this->ie_compatibility;
520  }
+ Here is the caller graph for this function:

◆ getIe_force_render()

ilObjSAHSLearningModule::getIe_force_render ( )

force Internet Explorer to render again after some Milliseconds - useful for learning Modules with a lot of iframesor frames and IE >=10

Definition at line 530 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

531  {
532  return $this->ie_force_render;
533  }
+ Here is the caller graph for this function:

◆ getInteractions()

ilObjSAHSLearningModule::getInteractions ( )

interactions

Definition at line 569 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

570  {
571  return $this->interactions;
572  }
+ Here is the caller graph for this function:

◆ getLocalization()

ilObjSAHSLearningModule::getLocalization ( )

Get localization.

Returns
string localization

Definition at line 225 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), create(), and update().

226  {
227  return $this->localization;
228  }
+ Here is the caller graph for this function:

◆ getMasteryScore()

ilObjSAHSLearningModule::getMasteryScore ( )

get mastery_score

Definition at line 789 of file class.ilObjSAHSLearningModule.php.

Referenced by update().

790  {
791  return $this->mastery_score;
792  }
+ Here is the caller graph for this function:

◆ getMasteryScoreValues()

ilObjSAHSLearningModule::getMasteryScoreValues ( )

get mastery_score_values

Definition at line 835 of file class.ilObjSAHSLearningModule.php.

836  {
837  return $this->mastery_score_values;
838  }

◆ getMaxAttempt()

ilObjSAHSLearningModule::getMaxAttempt ( )

get max attempt

Definition at line 388 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

389  {
390  return $this->max_attempt;
391  }
+ Here is the caller graph for this function:

◆ getMaxPoints()

ilObjSAHSLearningModule::getMaxPoints ( )

Returns score.max for the learning module, refered to the last sco where score.max is set.

This is called by the certificate generator if [SCORM_POINTS_MAX] is inserted.

public

Returns
float

Definition at line 1256 of file class.ilObjSAHSLearningModule.php.

References $ilUser, $res, ilObjSCORM2004LearningModule\_getMaxScoreForUser(), ilObject\getId(), and getSubType().

1257  {
1258  global $ilUser;
1259 
1260  if(strcmp($this->getSubType(), 'scorm2004') == 0)
1261  {
1262  $res = ilObjSCORM2004LearningModule::_getMaxScoreForUser($this->getId(), $ilUser->getId());
1263  return $res;
1264  }
1265  else
1266  {
1267  return null;
1268  }
1269  }
getId()
get object id public
$ilUser
Definition: imgupload.php:18
static _getMaxScoreForUser($a_id, $a_user)
Returns score.max for the learning module, refered to the last sco where score.max is set...
+ Here is the call graph for this function:

◆ getModuleVersion()

ilObjSAHSLearningModule::getModuleVersion ( )

get module version

Definition at line 405 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

406  {
407  return $this->module_version;
408  }
+ Here is the caller graph for this function:

◆ getNoMenu()

ilObjSAHSLearningModule::getNoMenu ( )

disable menu

Definition at line 452 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

453  {
454  return $this->no_menu;
455  }
+ Here is the caller graph for this function:

◆ getObjectives()

ilObjSAHSLearningModule::getObjectives ( )

objectives

Definition at line 582 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

583  {
584  return $this->objectives;
585  }
+ Here is the caller graph for this function:

◆ getOfflineMode()

ilObjSAHSLearningModule::getOfflineMode ( )

offlineMode

Definition at line 634 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

635  {
636  return $this->offline_mode;
637  }
+ Here is the caller graph for this function:

◆ getOnline()

ilObjSAHSLearningModule::getOnline ( )

set online

Definition at line 1092 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

1093  {
1094  return $this->online;
1095  }
+ Here is the caller graph for this function:

◆ getOpenMode()

ilObjSAHSLearningModule::getOpenMode ( )

open_mode 0: in Tab/new Window like in previous versions 1: in iFrame with width=100% and heigth=100% 2: in iFrame with specified width and height 3: 4: 5: in new Window without specified width and height 6: in new Window with specified width and height

Definition at line 752 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

753  {
754  return $this->open_mode;
755  }
+ Here is the caller graph for this function:

◆ getPointsInPercent()

ilObjSAHSLearningModule::getPointsInPercent ( )

Returns the points in percent for the learning module This is called by the certificate generator if [SCORM_POINTS] is inserted.

Definition at line 1225 of file class.ilObjSAHSLearningModule.php.

References $ilUser, $res, ilObjSCORM2004LearningModule\_getUniqueScaledScoreForUser(), ilObject\getId(), and getSubType().

1226  {
1227  global $ilUser;
1228  if (strcmp($this->getSubType(), "scorm2004") == 0)
1229  {
1231  if (!is_null($res))
1232  {
1233  return $res * 100.0;
1234  }
1235  else
1236  {
1237  return $res;
1238  }
1239  }
1240  else
1241  {
1242  return null;
1243  }
1244  }
getId()
get object id public
static _getUniqueScaledScoreForUser($a_id, $a_user)
Get the Unique Scaled Score of a course Conditions: Only one SCO may set cmi.score.scaled.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ getScormModulesForGlossary()

static ilObjSAHSLearningModule::getScormModulesForGlossary (   $a_glo_id)
static

Get SCORM modules that assign a certain glossary.

Parameters

Definition at line 1043 of file class.ilObjSAHSLearningModule.php.

References $ilDB, ilObject\_hasUntrashedReference(), and array.

Referenced by ilObjGlossaryGUI\addUsagesToInfo(), and ilObjGlossary\getDeletionDependencies().

1044  {
1045  global $ilDB;
1046 
1047  $set = $ilDB->query("SELECT DISTINCT id FROM sahs_lm WHERE ".
1048  " glossary = ".$ilDB->quote($a_glo_id, "integer"));
1049  $sms = array();
1050  while ($rec = $ilDB->fetchAssoc($set))
1051  {
1052  if (ilObject::_hasUntrashedReference($rec["id"]))
1053  {
1054  $sms[] = $rec["id"];
1055  }
1056  }
1057  return $sms;
1058  }
static _hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSequencing()

ilObjSAHSLearningModule::getSequencing ( )

sequencing

Definition at line 556 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

557  {
558  return $this->sequencing;
559  }
+ Here is the caller graph for this function:

◆ getSequencingExpertMode()

ilObjSAHSLearningModule::getSequencingExpertMode ( )

Get sequencing expert mode.

Returns
boolean sequencing expert mode

Definition at line 721 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), create(), and update().

722  {
723  return $this->seq_exp_mode;
724  }
+ Here is the caller graph for this function:

◆ getSession()

ilObjSAHSLearningModule::getSession ( )

get session setting

Definition at line 436 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

437  {
438  return $this->session;
439  }
+ Here is the caller graph for this function:

◆ getSessionDeactivated()

ilObjSAHSLearningModule::getSessionDeactivated ( )

sessionDisabled for SCORM 2004

Definition at line 495 of file class.ilObjSAHSLearningModule.php.

References $ilSetting, and $lm_set.

496  {
497  global $ilSetting;
498  $lm_set = new ilSetting("lm");
499  if ($lm_set->get("scorm_without_session") == "1") return true;
500  return false;
501  }
ILIAS Setting Class.
$lm_set
global $ilSetting
Definition: privfeed.php:17

◆ getStyleSheetId()

ilObjSAHSLearningModule::getStyleSheetId ( )

get ID of assigned style sheet object

Definition at line 341 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), ilObjSCORM2004LearningModule\copyAuthoredContent(), ilObjSCORM2004LearningModule\prepareHTMLExporter(), read(), and update().

342  {
343  return $this->style_id;
344  }
+ Here is the caller graph for this function:

◆ getSubType()

ilObjSAHSLearningModule::getSubType ( )

set sub type

Definition at line 1108 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), create(), delete(), getMaxPoints(), getPointsInPercent(), and update().

1109  {
1110  return $this->sub_type;
1111  }
+ Here is the caller graph for this function:

◆ getTime_from_lms()

ilObjSAHSLearningModule::getTime_from_lms ( )

time_from_lms

Definition at line 608 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

609  {
610  return $this->time_from_lms;
611  }
+ Here is the caller graph for this function:

◆ getTries()

ilObjSAHSLearningModule::getTries ( )

Get Tries.

Returns
boolean tries

Definition at line 205 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

206  {
207  return $this->tries;
208  }
+ Here is the caller graph for this function:

◆ getWidth()

ilObjSAHSLearningModule::getWidth ( )

width

Definition at line 764 of file class.ilObjSAHSLearningModule.php.

Referenced by cloneObject(), and update().

765  {
766  return $this->width;
767  }
+ Here is the caller graph for this function:

◆ lookupAssignedGlossary()

static ilObjSAHSLearningModule::lookupAssignedGlossary (   $a_slm_id)
static

Get SCORM modules that assign a certain glossary.

Parameters

Definition at line 1066 of file class.ilObjSAHSLearningModule.php.

References $ilDB, and ilObject\_lookupType().

Referenced by ilSCORM2004PageConfig\configureByObjectId().

1067  {
1068  global $ilDB;
1069 
1070  $set = $ilDB->query("SELECT DISTINCT glossary FROM sahs_lm WHERE ".
1071  " id = ".$ilDB->quote($a_slm_id, "integer"));
1072  $rec = $ilDB->fetchAssoc($set);
1073  $glo_id = $rec["glossary"];
1074  if (ilObject::_lookupType($glo_id) == "glo")
1075  {
1076  return $glo_id;
1077  }
1078  return 0;
1079  }
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateByDirectoy()

ilObjSAHSLearningModule::populateByDirectoy (   $a_dir,
  $a_filename = "" 
)

Populate by directory.

Add a filename to do a special check for ILIAS SCORM export files. If the corresponding directory is found within the passed directory path (i.e. "htlm_<id>") this subdirectory is used instead.

Parameters

Definition at line 1280 of file class.ilObjSAHSLearningModule.php.

References getDataDirectory(), ilUtil\rCopy(), and ilUtil\renameExecutables().

Referenced by cloneObject().

1281  {
1282  /*preg_match("/.*sahs_([0-9]*)\.zip/", $a_filename, $match);
1283  if (is_dir($a_dir."/sahs_".$match[1]))
1284  {
1285  $a_dir = $a_dir."/sahs_".$match[1];
1286  }*/
1287  ilUtil::rCopy($a_dir, $this->getDataDirectory());
1289  }
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
getDataDirectory($mode="filesystem")
get data directory of lm
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilObjSAHSLearningModule::read ( )

read object

Definition at line 62 of file class.ilObjSAHSLearningModule.php.

References $ilDB, $lm_set, ilObject\_lookupType(), array, ilObject\getId(), getStyleSheetId(), setAPIAdapterName(), setAPIFunctionsPrefix(), setAssignedGlossary(), setAuto_last_visited(), setAutoContinue(), setAutoReviewChar(), setAutoSuspend(), setCheck_values(), setComments(), setCreditMode(), setDebug(), setDebugPw(), setDefaultLessonMode(), setEditable(), setFourth_edition(), setHeight(), setHideNavig(), setIe_compatibility(), setIe_force_render(), setInteractions(), setLocalization(), setMasteryScore(), setMaxAttempt(), setModuleVersion(), setNoMenu(), setObjectives(), setOfflineMode(), setOnline(), setOpenMode(), setSequencing(), setSequencingExpertMode(), setSession(), setStyleSheetId(), setSubType(), setTime_from_lms(), setTries(), setWidth(), and ilUtil\yn2tf().

63  {
64  global $ilDB;
65 
66  parent::read();
67 
68  $lm_set = $ilDB->queryF('SELECT * FROM sahs_lm WHERE id = %s',
69  array('integer'),array($this->getId()));
70 
71  while($lm_rec = $ilDB->fetchAssoc($lm_set))
72  {
73  $this->setOnline(ilUtil::yn2tf($lm_rec["c_online"]));
74  $this->setAutoReviewChar($lm_rec["auto_review"]);
75  $this->setAPIAdapterName($lm_rec["api_adapter"]);
76  $this->setDefaultLessonMode($lm_rec["default_lesson_mode"]);
77  $this->setAPIFunctionsPrefix($lm_rec["api_func_prefix"]);
78  $this->setCreditMode($lm_rec["credit"]);
79  $this->setSubType($lm_rec["c_type"]);
80  $this->setEditable($lm_rec["editable"]);
81  $this->setStyleSheetId($lm_rec["stylesheet"]);
82  $this->setMaxAttempt($lm_rec["max_attempt"]);
83  $this->setModuleVersion($lm_rec["module_version"]);
84  $this->setAssignedGlossary($lm_rec["glossary"]);
85  $this->setTries($lm_rec["question_tries"]);
86  $this->setLocalization($lm_rec["localization"]);
87  $this->setSession(ilUtil::yn2tf($lm_rec["unlimited_session"]));
88  $this->setNoMenu(ilUtil::yn2tf($lm_rec["no_menu"]));
89  $this->setHideNavig(ilUtil::yn2tf($lm_rec["hide_navig"]));
90  $this->setFourth_edition(ilUtil::yn2tf($lm_rec["fourth_edition"]));
91  $this->setSequencing(ilUtil::yn2tf($lm_rec["sequencing"]));
92  $this->setInteractions(ilUtil::yn2tf($lm_rec["interactions"]));
93  $this->setObjectives(ilUtil::yn2tf($lm_rec["objectives"]));
94  $this->setComments(ilUtil::yn2tf($lm_rec["comments"]));
95  $this->setTime_from_lms(ilUtil::yn2tf($lm_rec["time_from_lms"]));
96  $this->setDebug(ilUtil::yn2tf($lm_rec["debug"]));
97  $this->setDebugPw($lm_rec["debugpw"]);
98  $this->setSequencingExpertMode($lm_rec["seq_exp_mode"]);
99  $this->setOpenMode($lm_rec["open_mode"]);
100  $this->setWidth($lm_rec["width"]);
101  $this->setHeight($lm_rec["height"]);
102  $this->setAutoContinue(ilUtil::yn2tf($lm_rec["auto_continue"]));
103  $this->setAuto_last_visited(ilUtil::yn2tf($lm_rec["auto_last_visited"]));
104  $this->setCheck_values(ilUtil::yn2tf($lm_rec["check_values"]));
105  $this->setOfflineMode(ilUtil::yn2tf($lm_rec["offline_mode"]));
106  $this->setAutoSuspend(ilUtil::yn2tf($lm_rec["auto_suspend"]));
107  $this->setIe_compatibility(ilUtil::yn2tf($lm_rec["ie_compatibility"]));
108  $this->setIe_force_render(ilUtil::yn2tf($lm_rec["ie_force_render"]));
109  $this->setMasteryScore($lm_rec["mastery_score"]);
110 
111  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
112  if (ilObject::_lookupType($this->getStyleSheetId()) != "sty")
113  {
114  $this->setStyleSheetId(0);
115  }
116  }
117  }
getStyleSheetId()
get ID of assigned style sheet object
setCreditMode($a_credit_mode)
set credit mode
setAPIFunctionsPrefix($a_prefix)
set api functions prefix
setSubType($a_sub_type)
get sub type
setAutoSuspend($a_auto_suspend)
get auto continue
setTries($a_tries)
Set default tries for questions.
setAutoReviewChar($a_auto_review)
set auto review as Char for SCORM 2004
setAutoContinue($a_auto_continue)
get auto continue
setLocalization($a_val)
Set localization.
setStyleSheetId($a_style_id)
set ID of assigned style sheet object
getId()
get object id public
setAuto_last_visited($a_auto_last_visited)
setHideNavig($a_hide_navig)
disable menu
setMasteryScore($a_mastery_score)
set mastery_score
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
setSession($a_session)
set session setting
setSequencingExpertMode($a_val)
Set sequencing expert mode.
$lm_set
setAPIAdapterName($a_api)
set api adapter name
global $ilDB
setEditable($a_editable)
Set Editable.
static yn2tf($a_yn)
convert "y"/"n" to true/false
setDefaultLessonMode($a_lesson_mode)
set default lesson mode
setAssignedGlossary($a_assigned_glossary)
set assigned glossary
setMaxAttempt($a_max_attempt)
set max attempt
setModuleVersion($a_module_version)
set max attempt
+ Here is the call graph for this function:

◆ setAPIAdapterName()

ilObjSAHSLearningModule::setAPIAdapterName (   $a_api)

set api adapter name

Definition at line 286 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

287  {
288  $this->api_adapter = $a_api;
289  }
+ Here is the caller graph for this function:

◆ setAPIFunctionsPrefix()

ilObjSAHSLearningModule::setAPIFunctionsPrefix (   $a_prefix)

set api functions prefix

Definition at line 302 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

303  {
304  $this->api_func_prefix = $a_prefix;
305  }
+ Here is the caller graph for this function:

◆ setAssignedGlossary()

ilObjSAHSLearningModule::setAssignedGlossary (   $a_assigned_glossary)

set assigned glossary

Definition at line 421 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

422  {
423  $this->assigned_glossary = $a_assigned_glossary;
424  }
+ Here is the caller graph for this function:

◆ setAuto_last_visited()

ilObjSAHSLearningModule::setAuto_last_visited (   $a_auto_last_visited)

Definition at line 700 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

701  {
702  $this->auto_last_visited = $a_auto_last_visited;
703  }
+ Here is the caller graph for this function:

◆ setAutoContinue()

ilObjSAHSLearningModule::setAutoContinue (   $a_auto_continue)

get auto continue

Definition at line 680 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

681  {
682  $this->auto_continue = $a_auto_continue;
683  }
+ Here is the caller graph for this function:

◆ setAutoReview()

ilObjSAHSLearningModule::setAutoReview (   $a_auto_review)

set auto review as true/false for SCORM 1.2, HACP, SAHS, AICC

Definition at line 358 of file class.ilObjSAHSLearningModule.php.

References ilUtil\tf2yn().

359  {
360  $this->auto_review = ilUtil::tf2yn($a_auto_review);
361  }
static tf2yn($a_tf)
convert true/false to "y"/"n"
+ Here is the call graph for this function:

◆ setAutoReviewChar()

ilObjSAHSLearningModule::setAutoReviewChar (   $a_auto_review)

set auto review as Char for SCORM 2004

Definition at line 373 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

374  {
375  $this->auto_review = $a_auto_review;
376  }
+ Here is the caller graph for this function:

◆ setAutoSuspend()

ilObjSAHSLearningModule::setAutoSuspend (   $a_auto_suspend)

get auto continue

Definition at line 729 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

730  {
731  $this->auto_suspend = $a_auto_suspend;
732  }
+ Here is the caller graph for this function:

◆ setCheck_values()

ilObjSAHSLearningModule::setCheck_values (   $a_check_values)

Definition at line 626 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

627  {
628  $this->check_values = $a_check_values;
629  }
+ Here is the caller graph for this function:

◆ setComments()

ilObjSAHSLearningModule::setComments (   $a_comments)

Definition at line 600 of file class.ilObjSAHSLearningModule.php.

References comments.

Referenced by read().

601  {
602  $this->comments = $a_comments;
603  }
Add comments
+ Here is the caller graph for this function:

◆ setCreditMode()

ilObjSAHSLearningModule::setCreditMode (   $a_credit_mode)

set credit mode

Definition at line 318 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

319  {
320  $this->credit_mode = $a_credit_mode;
321  }
+ Here is the caller graph for this function:

◆ setDebug()

ilObjSAHSLearningModule::setDebug (   $a_debug)

debug

Definition at line 656 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

657  {
658  $this->debug = $a_debug;
659  }
+ Here is the caller graph for this function:

◆ setDebugPw()

ilObjSAHSLearningModule::setDebugPw (   $a_debug_pw)

debug pw

Definition at line 672 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

673  {
674  $this->debug_pw = $a_debug_pw;
675  }
+ Here is the caller graph for this function:

◆ setDefaultLessonMode()

ilObjSAHSLearningModule::setDefaultLessonMode (   $a_lesson_mode)

set default lesson mode

Definition at line 326 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

327  {
328  $this->lesson_mode = $a_lesson_mode;
329  }
+ Here is the caller graph for this function:

◆ setEditable()

ilObjSAHSLearningModule::setEditable (   $a_editable)

Set Editable.

Parameters
boolean$a_editableEditable

Definition at line 174 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

175  {
176  $this->editable = $a_editable;
177  }
+ Here is the caller graph for this function:

◆ setFourth_edition()

ilObjSAHSLearningModule::setFourth_edition (   $a_fourth_edition)

Definition at line 548 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

549  {
550  $this->fourth_edition = $a_fourth_edition;
551  }
+ Here is the caller graph for this function:

◆ setHeight()

ilObjSAHSLearningModule::setHeight (   $a_height)

Definition at line 780 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

781  {
782  $this->height = $a_height;
783  }
+ Here is the caller graph for this function:

◆ setHideNavig()

ilObjSAHSLearningModule::setHideNavig (   $a_hide_navig)

disable menu

Definition at line 476 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

477  {
478  $this->hide_navig = $a_hide_navig;
479  }
+ Here is the caller graph for this function:

◆ setIe_compatibility()

ilObjSAHSLearningModule::setIe_compatibility (   $a_ie_compatibility)

Definition at line 522 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

523  {
524  $this->ie_compatibility = $a_ie_compatibility;
525  }
+ Here is the caller graph for this function:

◆ setIe_force_render()

ilObjSAHSLearningModule::setIe_force_render (   $a_ie_force_render)

Definition at line 535 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

536  {
537  $this->ie_force_render = $a_ie_force_render;
538  }
+ Here is the caller graph for this function:

◆ setInteractions()

ilObjSAHSLearningModule::setInteractions (   $a_interactions)

Definition at line 574 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

575  {
576  $this->interactions = $a_interactions;
577  }
+ Here is the caller graph for this function:

◆ setLocalization()

ilObjSAHSLearningModule::setLocalization (   $a_val)

Set localization.

Parameters
string$a_vallocalization

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

Referenced by read().

216  {
217  $this->localization = $a_val;
218  }
+ Here is the caller graph for this function:

◆ setMasteryScore()

ilObjSAHSLearningModule::setMasteryScore (   $a_mastery_score)

set mastery_score

Definition at line 797 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

798  {
799  $this->mastery_score = $a_mastery_score;
800  }
+ Here is the caller graph for this function:

◆ setMaxAttempt()

ilObjSAHSLearningModule::setMaxAttempt (   $a_max_attempt)

set max attempt

Definition at line 397 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

398  {
399  $this->max_attempt = $a_max_attempt;
400  }
+ Here is the caller graph for this function:

◆ setModuleVersion()

ilObjSAHSLearningModule::setModuleVersion (   $a_module_version)

set max attempt

Definition at line 428 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

429  {
430  $this->module_version = $a_module_version;
431  }
+ Here is the caller graph for this function:

◆ setNoMenu()

ilObjSAHSLearningModule::setNoMenu (   $a_no_menu)

disable menu

Definition at line 460 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

461  {
462  $this->no_menu = $a_no_menu;
463  }
+ Here is the caller graph for this function:

◆ setObjectives()

ilObjSAHSLearningModule::setObjectives (   $a_objectives)

Definition at line 587 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

588  {
589  $this->objectives = $a_objectives;
590  }
+ Here is the caller graph for this function:

◆ setOfflineMode()

ilObjSAHSLearningModule::setOfflineMode (   $a_offline_mode)

Definition at line 639 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

640  {
641  $this->offline_mode = $a_offline_mode;
642  }
+ Here is the caller graph for this function:

◆ setOnline()

ilObjSAHSLearningModule::setOnline (   $a_online)

get online

Definition at line 1084 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

1085  {
1086  $this->online = $a_online;
1087  }
+ Here is the caller graph for this function:

◆ setOpenMode()

ilObjSAHSLearningModule::setOpenMode (   $a_open_mode)

Definition at line 756 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

757  {
758  $this->open_mode = $a_open_mode;
759  }
+ Here is the caller graph for this function:

◆ setSequencing()

ilObjSAHSLearningModule::setSequencing (   $a_sequencing)

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

Referenced by read().

562  {
563  $this->sequencing = $a_sequencing;
564  }
+ Here is the caller graph for this function:

◆ setSequencingExpertMode()

ilObjSAHSLearningModule::setSequencingExpertMode (   $a_val)

Set sequencing expert mode.

Parameters
boolean$a_valsequencing expert mode

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

Referenced by read().

712  {
713  $this->seq_exp_mode = $a_val;
714  }
+ Here is the caller graph for this function:

◆ setSession()

ilObjSAHSLearningModule::setSession (   $a_session)

set session setting

Definition at line 444 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

445  {
446  $this->session = $a_session;
447  }
+ Here is the caller graph for this function:

◆ setStyleSheetId()

ilObjSAHSLearningModule::setStyleSheetId (   $a_style_id)

set ID of assigned style sheet object

Definition at line 349 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

350  {
351  $this->style_id = $a_style_id;
352  }
+ Here is the caller graph for this function:

◆ setSubType()

ilObjSAHSLearningModule::setSubType (   $a_sub_type)

get sub type

Definition at line 1100 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

1101  {
1102  $this->sub_type = $a_sub_type;
1103  }
+ Here is the caller graph for this function:

◆ setTime_from_lms()

ilObjSAHSLearningModule::setTime_from_lms (   $a_time_from_lms)

Definition at line 613 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

614  {
615  $this->time_from_lms = $a_time_from_lms;
616  }
+ Here is the caller graph for this function:

◆ setTries()

ilObjSAHSLearningModule::setTries (   $a_tries)

Set default tries for questions.

Parameters
boolean$a_trestries

Definition at line 195 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

196  {
197  $this->tries = $a_tries;
198  }
+ Here is the caller graph for this function:

◆ setWidth()

ilObjSAHSLearningModule::setWidth (   $a_width)

Definition at line 768 of file class.ilObjSAHSLearningModule.php.

Referenced by read().

769  {
770  $this->width = $a_width;
771  }
+ Here is the caller graph for this function:

◆ update()

ilObjSAHSLearningModule::update ( )

update values for mastery_score / min_normalized_measure in database - not requested

update meta data only update object data

public

Returns
boolean

Definition at line 905 of file class.ilObjSAHSLearningModule.php.

References $ilDB, array, getAPIAdapterName(), getAPIFunctionsPrefix(), getAssignedGlossary(), getAuto_last_visited(), getAutoContinue(), getAutoReviewChar(), getAutoSuspend(), getCheck_values(), getComments(), getCreditMode(), getDebug(), getDebugPw(), getDefaultLessonMode(), getEditable(), getHeight(), getHideNavig(), ilObject\getId(), getIe_compatibility(), getIe_force_render(), getInteractions(), getLocalization(), getMasteryScore(), getMaxAttempt(), getModuleVersion(), getNoMenu(), getObjectives(), getOfflineMode(), getOnline(), getOpenMode(), getSequencing(), getSequencingExpertMode(), getSession(), getStyleSheetId(), getSubType(), getTime_from_lms(), getTries(), getWidth(), ilUtil\tf2yn(), and ilObject\updateMetaData().

906  {
907  global $ilDB;
908 
909  $this->updateMetaData();
910  parent::update();
911 
912  $s_mastery_score = $this->getMasteryScore();
913  if ($s_mastery_score == "") $s_mastery_score = null;
914 
915  $statement = $ilDB->manipulateF('
916  UPDATE sahs_lm
917  SET c_online = %s,
918  api_adapter = %s,
919  api_func_prefix = %s,
920  auto_review = %s,
921  default_lesson_mode = %s,
922  c_type = %s,
923  stylesheet = %s,
924  editable = %s,
925  max_attempt = %s,
926  module_version = %s,
927  credit = %s,
928  glossary = %s,
929  question_tries = %s,
930  unlimited_session = %s,
931  no_menu = %s,
932  hide_navig = %s,
933  fourth_edition =%s,
934  sequencing = %s,
935  interactions = %s,
936  objectives = %s,
937  comments = %s,
938  time_from_lms = %s,
939  debug = %s,
940  localization = %s,
941  seq_exp_mode = %s,
942  debugpw = %s,
943  open_mode = %s,
944  width = %s,
945  height = %s,
946  auto_continue = %s,
947  auto_last_visited = %s,
948  check_values = %s,
949  offline_mode = %s,
950  auto_suspend = %s,
951  ie_compatibility = %s,
952  ie_force_render = %s,
953  mastery_score = %s
954  WHERE id = %s',
955  array( 'text',
956  'text',
957  'text',
958  'text',
959  'text',
960  'text',
961  'integer',
962  'integer',
963  'integer',
964  'integer',
965  'text',
966  'integer',
967  'integer',
968  'text',
969  'text',
970  'text',
971  'text',
972  'text',
973  'text',
974  'text',
975  'text',
976  'text',
977  'text',
978  'text',
979  'integer',
980  'text',
981  'integer',
982  'integer',
983  'integer',
984  'text',
985  'text',
986  'text',
987  'text',
988  'text',
989  'text',
990  'text',
991  'integer',
992  'integer'
993  ),
994  array( ilUtil::tf2yn($this->getOnline()),
995  $this->getAPIAdapterName(),
996  $this->getAPIFunctionsPrefix(),
997  $this->getAutoReviewChar(),
998  $this->getDefaultLessonMode(),
999  $this->getSubType(),
1000  $this->getStyleSheetId(),
1001  $this->getEditable(),
1002  $this->getMaxAttempt(),
1003  $this->getModuleVersion(),
1004  $this->getCreditMode(),
1005  $this->getAssignedGlossary(),
1006  $this->getTries(),
1007  ilUtil::tf2yn($this->getSession()),
1008  ilUtil::tf2yn($this->getNoMenu()),
1009  ilUtil::tf2yn($this->getHideNavig()),
1010  ilUtil::tf2yn($this->getFourth_edition()),
1011  ilUtil::tf2yn($this->getSequencing()),
1012  ilUtil::tf2yn($this->getInteractions()),
1013  ilUtil::tf2yn($this->getObjectives()),
1014  ilUtil::tf2yn($this->getComments()),
1015  ilUtil::tf2yn($this->getTime_from_lms()),
1016  ilUtil::tf2yn($this->getDebug()),
1017  $this->getLocalization(),
1018  $this->getSequencingExpertMode(),
1019  $this->getDebugPw(),
1020  $this->getOpenMode(),
1021  $this->getWidth(),
1022  $this->getHeight(),
1023  ilUtil::tf2yn($this->getAutoContinue()),
1025  ilUtil::tf2yn($this->getCheck_values()),
1026  ilUtil::tf2yn($this->getOfflineMode()),
1027  ilUtil::tf2yn($this->getAutoSuspend()),
1030  $s_mastery_score,
1031  $this->getId())
1032  );
1033 
1034  return true;
1035  }
getSequencingExpertMode()
Get sequencing expert mode.
getStyleSheetId()
get ID of assigned style sheet object
static tf2yn($a_tf)
convert true/false to "y"/"n"
getIe_compatibility()
set compatibility mode for Internet Exlorer manually
updateMetaData()
update meta data entry
getAutoReviewChar()
get auto review as Char for SCORM 2004
getAPIAdapterName()
get api adapter name
getAssignedGlossary()
get assigned glossary
getAPIFunctionsPrefix()
get api functions prefix
getIe_force_render()
force Internet Explorer to render again after some Milliseconds - useful for learning Modules with a ...
getId()
get object id public
getOpenMode()
open_mode 0: in Tab/new Window like in previous versions 1: in iFrame with width=100% and heigth=100%...
Create styles array
The data for the language used.
global $ilDB
getDefaultLessonMode()
get default lesson mode
+ Here is the call graph for this function:

◆ zipLmForOfflineMode()

ilObjSAHSLearningModule::zipLmForOfflineMode ( )

Definition at line 1415 of file class.ilObjSAHSLearningModule.php.

References ilUtil\getDataDir(), ilObject\getId(), ilUtil\getWebspaceDir(), and ilUtil\zip().

1416  {
1417  $lmDir=ilUtil::getWebspaceDir("filesystem")."/lm_data/lm_".$this->getId();
1418  $zipFile=ilUtil::getDataDir()."/lm_data/lm_".$this->getId();
1419  return ilUtil::zip($lmDir, $zipFile, true);
1420  }
getId()
get object id public
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static getDataDir()
get data directory (outside webspace)
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

Field Documentation

◆ $validator

ilObjSAHSLearningModule::$validator

Definition at line 22 of file class.ilObjSAHSLearningModule.php.


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