ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMDEducational Class Reference
+ Inheritance diagram for ilMDEducational:
+ Collaboration diagram for ilMDEducational:

Public Member Functions

 ilMDEducational ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
getTypicalAgeRangeIds ()
getTypicalAgeRange ($a_typical_age_range_id)
addTypicalAgeRange ()
getDescriptionIds ()
getDescription ($a_description_id)
addDescription ()
getLanguageIds ()
getLanguage ($a_language_id)
addLanguage ()
 setInteractivityType ($a_iat)
 getInteractivityType ()
 setLearningResourceType ($a_lrt)
 getLearningResourceType ()
 setInteractivityLevel ($a_iat)
 getInteractivityLevel ()
 setSemanticDensity ($a_sd)
 getSemanticDensity ()
 setIntendedEndUserRole ($a_ieur)
 getIntendedEndUserRole ()
 setContext ($a_context)
 getContext ()
 setDifficulty ($a_difficulty)
 getDifficulty ()
 setPhysicalTypicalLearningTime ($months, $days, $hours, $minutes, $seconds)
 setTypicalLearningTime ($a_tlt)
 getTypicalLearningTime ()
 getTypicalLearningTimeSeconds ()
 save ()
 update ()
 delete ()
 __getFields ()
 read ()
 toXML (&$writer)
 _getId ($a_rbac_id, $a_obj_id)
 _getTypicalLearningTimeSeconds ($a_rbac_id, $a_obj_id=0)
 ilMDEducational ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
getTypicalAgeRangeIds ()
getTypicalAgeRange ($a_typical_age_range_id)
addTypicalAgeRange ()
getDescriptionIds ()
getDescription ($a_description_id)
addDescription ()
getLanguageIds ()
getLanguage ($a_language_id)
addLanguage ()
 setInteractivityType ($a_iat)
 getInteractivityType ()
 setLearningResourceType ($a_lrt)
 getLearningResourceType ()
 setInteractivityLevel ($a_iat)
 getInteractivityLevel ()
 setSemanticDensity ($a_sd)
 getSemanticDensity ()
 setIntendedEndUserRole ($a_ieur)
 getIntendedEndUserRole ()
 setContext ($a_context)
 getContext ()
 setDifficulty ($a_difficulty)
 getDifficulty ()
 setTypicalLearningTime ($a_tlt)
 getTypicalLearningTime ()
 save ()
 update ()
 delete ()
 __getFields ()
 read ()
 toXML (&$writer)
 _getId ($a_rbac_id, $a_obj_id)
- Public Member Functions inherited from ilMDBase
 ilMDBase ($a_rbac_id=0, $a_obj_id=0, $a_type=0)
 setRBACId ($a_id)
 getRBACId ()
 setObjId ($a_id)
 getObjId ()
 setObjType ($a_type)
 getObjType ()
 setMetaId ($a_meta_id, $a_read_data=true)
 getMetaId ()
 setParentType ($a_parent_type)
 getParentType ()
 setParentId ($a_id)
 getParentId ()
 setExportMode ($a_export_mode=true)
 getExportMode ()
 validate ()
 ilMDBase ($a_rbac_id=0, $a_obj_id=0, $a_type=0)
 setRBACId ($a_id)
 getRBACId ()
 setObjId ($a_id)
 getObjId ()
 setObjType ($a_type)
 getObjType ()
 setMetaId ($a_meta_id, $a_read_data=true)
 getMetaId ()
 setParentType ($a_parent_type)
 getParentType ()
 setParentId ($a_id)
 getParentId ()
 validate ()

Additional Inherited Members

- Data Fields inherited from ilMDBase
 $rbac_id
 $obj_id
 $obj_type
 $export_mode = false

Detailed Description

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

Member Function Documentation

ilMDEducational::__getFields ( )

Definition at line 353 of file class.ilMDEducational.php.

References getContext(), getDifficulty(), getIntendedEndUserRole(), getInteractivityLevel(), getInteractivityType(), getLearningResourceType(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getSemanticDensity(), getTypicalLearningTime(), and ilUtil\prepareDBString().

{
return array('rbac_id' => $this->getRBACId(),
'obj_id' => $this->getObjId(),
'obj_type' => ilUtil::prepareDBString($this->getObjType()),
'interactivity_type' => ilUtil::prepareDBString($this->getInteractivityType()),
'learning_resource_type' => ilUtil::prepareDBString($this->getLearningResourceType()),
'interactivity_level' => ilUtil::prepareDBString($this->getInteractivityLevel()),
'semantic_density' => ilUtil::prepareDBString($this->getSemanticDensity()),
'intended_end_user_role' => ilUtil::prepareDBString($this->getIntendedEndUserRole()),
'context' => ilUtil::prepareDBString($this->getContext()),
'difficulty' => ilUtil::prepareDBString($this->getDifficulty()),
'typical_learning_time' => ilUtil::prepareDBString($this->getTypicalLearningTime()));
}

+ Here is the call graph for this function:

ilMDEducational::__getFields ( )

Definition at line 398 of file class.ilMDEducational.php.

References getContext(), getDifficulty(), getIntendedEndUserRole(), getInteractivityLevel(), getInteractivityType(), getLearningResourceType(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getSemanticDensity(), and getTypicalLearningTime().

Referenced by save().

{
return array('rbac_id' => array('integer',$this->getRBACId()),
'obj_id' => array('integer',$this->getObjId()),
'obj_type' => array('text',$this->getObjType()),
'interactivity_type' => array('text',$this->getInteractivityType()),
'learning_resource_type' => array('text',$this->getLearningResourceType()),
'interactivity_level' => array('text',$this->getInteractivityLevel()),
'semantic_density' => array('text',$this->getSemanticDensity()),
'intended_end_user_role' => array('text',$this->getIntendedEndUserRole()),
'context' => array('text',$this->getContext()),
'difficulty' => array('text',$this->getDifficulty()),
'typical_learning_time' => array('text',$this->getTypicalLearningTime()));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMDEducational::_getId (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 439 of file class.ilMDEducational.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

{
global $ilDB;
$query = "SELECT meta_educational_id FROM il_meta_educational ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
"AND obj_id = ".$ilDB->quote($a_obj_id);
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->meta_educational_id;
}
return false;
}
ilMDEducational::_getId (   $a_rbac_id,
  $a_obj_id 
)

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

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilMD\getEducational().

{
global $ilDB;
$query = "SELECT meta_educational_id FROM il_meta_educational ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
"AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->meta_educational_id;
}
return false;
}

+ Here is the caller graph for this function:

ilMDEducational::_getTypicalLearningTimeSeconds (   $a_rbac_id,
  $a_obj_id = 0 
)

Definition at line 527 of file class.ilMDEducational.php.

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

Referenced by ilLearningProgressBaseGUI\__readItemStatusInfo(), ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilLearningProgressBaseGUI\__showObjectDetails(), ilLPStatusCollectionTLT\_getStatusInfo(), ilLPStatusTypicalLearningTime\_getStatusInfo(), ilLPStatus\_getTypicalLearningTime(), ilLPStatusTypicalLearningTime\determinePercentage(), ilCourseContentGUI\editTimings(), and ilLPCollectionOfLMChapters\getPossibleItems().

{
global $ilDB;
$a_obj_id = $a_obj_id ? $a_obj_id : $a_rbac_id;
$query = "SELECT typical_learning_time FROM il_meta_educational ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
"AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
include_once './Services/MetaData/classes/class.ilMDUtils.php';
$time_arr = ilMDUtils::_LOMDurationToArray($row->typical_learning_time);
return 60 * 60 * 24 * 30 * $time_arr[0] +
60 * 60 * 24 * $time_arr[1] +
60 * 60 * $time_arr[2] +
60 * $time_arr[3] +
$time_arr[4];
}
return 0;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilMDEducational::addDescription ( )

Definition at line 91 of file class.ilMDEducational.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

{
include_once 'Services/MetaData/classes/class.ilMDDescription.php';
$des =& new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType());
$des->setParentId($this->getMetaId());
$des->setParentType('meta_educational');
return $des;
}

+ Here is the call graph for this function:

& ilMDEducational::addDescription ( )

Definition at line 91 of file class.ilMDEducational.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
$des =& new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType());
$des->setParentId($this->getMetaId());
$des->setParentType('meta_educational');
return $des;
}

+ Here is the call graph for this function:

& ilMDEducational::addLanguage ( )

Definition at line 120 of file class.ilMDEducational.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

{
include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
$lan =& new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType());
$lan->setParentId($this->getMetaId());
$lan->setParentType('meta_educational');
return $lan;
}

+ Here is the call graph for this function:

& ilMDEducational::addLanguage ( )

Definition at line 120 of file class.ilMDEducational.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
$lan =& new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType());
$lan->setParentId($this->getMetaId());
$lan->setParentType('meta_educational');
return $lan;
}

+ Here is the call graph for this function:

& ilMDEducational::addTypicalAgeRange ( )

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

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
$typ =& new ilMDTypicalAgeRange($this->getRBACId(),$this->getObjId(),$this->getObjType());
$typ->setParentId($this->getMetaId());
$typ->setParentType('meta_educational');
return $typ;
}

+ Here is the call graph for this function:

& ilMDEducational::addTypicalAgeRange ( )

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

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

{
include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
$typ =& new ilMDTypicalAgeRange($this->getRBACId(),$this->getObjId(),$this->getObjType());
$typ->setParentId($this->getMetaId());
$typ->setParentType('meta_educational');
return $typ;
}

+ Here is the call graph for this function:

ilMDEducational::delete ( )

Reimplemented from ilMDBase.

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

References $ilDB, $query, getDescription(), getDescriptionIds(), getLanguage(), getLanguageIds(), ilMDBase\getMetaId(), getTypicalAgeRange(), and getTypicalAgeRangeIds().

{
global $ilDB;
if($this->getMetaId())
{
$query = "DELETE FROM il_meta_educational ".
"WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId());
$this->db->query($query);
foreach($this->getTypicalAgeRangeIds() as $id)
{
$typ =& $this->getTypicalAgeRange($id);
$typ->delete();
}
foreach($this->getDescriptionIds() as $id)
{
$des =& $this->getDescription($id);
$des->delete();
}
foreach($this->getLanguageIds() as $id)
{
$lan =& $this->getLanguage($id);
$lan->delete();
}
return true;
}
return false;
}

+ Here is the call graph for this function:

ilMDEducational::delete ( )

Reimplemented from ilMDBase.

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

References $ilDB, $query, $res, getDescription(), getDescriptionIds(), getLanguage(), getLanguageIds(), ilMDBase\getMetaId(), getTypicalAgeRange(), and getTypicalAgeRangeIds().

{
global $ilDB;
if($this->getMetaId())
{
$query = "DELETE FROM il_meta_educational ".
"WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId());
$res = $ilDB->manipulate($query);
foreach($this->getTypicalAgeRangeIds() as $id)
{
$typ = $this->getTypicalAgeRange($id);
$typ->delete();
}
foreach($this->getDescriptionIds() as $id)
{
$des = $this->getDescription($id);
$des->delete();
}
foreach($this->getLanguageIds() as $id)
{
$lan = $this->getLanguage($id);
$lan->delete();
}
return true;
}
return false;
}

+ Here is the call graph for this function:

ilMDEducational::getContext ( )

Definition at line 254 of file class.ilMDEducational.php.

Referenced by __getFields(), and toXML().

{
return $this->context;
}

+ Here is the caller graph for this function:

ilMDEducational::getContext ( )

Definition at line 254 of file class.ilMDEducational.php.

{
return $this->context;
}
& ilMDEducational::getDescription (   $a_description_id)

Definition at line 78 of file class.ilMDEducational.php.

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
if(!$a_description_id)
{
return false;
}
$des =& new ilMDDescription();
$des->setMetaId($a_description_id);
return $des;
}
& ilMDEducational::getDescription (   $a_description_id)

Definition at line 78 of file class.ilMDEducational.php.

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDDescription.php';
if(!$a_description_id)
{
return false;
}
$des =& new ilMDDescription();
$des->setMetaId($a_description_id);
return $des;
}

+ Here is the caller graph for this function:

& ilMDEducational::getDescriptionIds ( )

Definition at line 72 of file class.ilMDEducational.php.

References ilMDDescription\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
}

+ Here is the call graph for this function:

& ilMDEducational::getDescriptionIds ( )

Definition at line 72 of file class.ilMDEducational.php.

References ilMDDescription\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDDescription.php';
return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMDEducational::getDifficulty ( )

Definition at line 274 of file class.ilMDEducational.php.

Referenced by __getFields(), and toXML().

{
return $this->difficulty;
}

+ Here is the caller graph for this function:

ilMDEducational::getDifficulty ( )

Definition at line 274 of file class.ilMDEducational.php.

{
return $this->difficulty;
}
ilMDEducational::getIntendedEndUserRole ( )

Definition at line 235 of file class.ilMDEducational.php.

Referenced by __getFields(), and toXML().

{
return $this->intended_end_user_role;
}

+ Here is the caller graph for this function:

ilMDEducational::getIntendedEndUserRole ( )

Definition at line 235 of file class.ilMDEducational.php.

{
return $this->intended_end_user_role;
}
ilMDEducational::getInteractivityLevel ( )

Definition at line 196 of file class.ilMDEducational.php.

Referenced by __getFields(), and toXML().

{
return $this->interactivity_level;
}

+ Here is the caller graph for this function:

ilMDEducational::getInteractivityLevel ( )

Definition at line 196 of file class.ilMDEducational.php.

{
return $this->interactivity_level;
}
ilMDEducational::getInteractivityType ( )

Definition at line 146 of file class.ilMDEducational.php.

Referenced by __getFields(), and toXML().

{
return $this->interactivity_type;
}

+ Here is the caller graph for this function:

ilMDEducational::getInteractivityType ( )

Definition at line 146 of file class.ilMDEducational.php.

{
return $this->interactivity_type;
}
& ilMDEducational::getLanguage (   $a_language_id)

Definition at line 107 of file class.ilMDEducational.php.

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
if(!$a_language_id)
{
return false;
}
$lan =& new ilMDLanguage();
$lan->setMetaId($a_language_id);
return $lan;
}

+ Here is the caller graph for this function:

& ilMDEducational::getLanguage (   $a_language_id)

Definition at line 107 of file class.ilMDEducational.php.

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
if(!$a_language_id)
{
return false;
}
$lan =& new ilMDLanguage();
$lan->setMetaId($a_language_id);
return $lan;
}
& ilMDEducational::getLanguageIds ( )

Definition at line 101 of file class.ilMDEducational.php.

References ilMDLanguage\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilMDEducational::getLanguageIds ( )

Definition at line 101 of file class.ilMDEducational.php.

References ilMDLanguage\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
}

+ Here is the call graph for this function:

ilMDEducational::getLearningResourceType ( )

Definition at line 176 of file class.ilMDEducational.php.

{
return $this->learning_resource_type;
}
ilMDEducational::getLearningResourceType ( )

Definition at line 176 of file class.ilMDEducational.php.

Referenced by __getFields(), and toXML().

{
return $this->learning_resource_type;
}

+ Here is the caller graph for this function:

ilMDEducational::getSemanticDensity ( )

Definition at line 216 of file class.ilMDEducational.php.

Referenced by __getFields(), and toXML().

{
return $this->semantic_density;
}

+ Here is the caller graph for this function:

ilMDEducational::getSemanticDensity ( )

Definition at line 216 of file class.ilMDEducational.php.

{
return $this->semantic_density;
}
& ilMDEducational::getTypicalAgeRange (   $a_typical_age_range_id)

Definition at line 49 of file class.ilMDEducational.php.

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
if(!$a_typical_age_range_id)
{
return false;
}
$typ =& new ilMDTypicalAgeRange();
$typ->setMetaId($a_typical_age_range_id);
return $typ;
}
& ilMDEducational::getTypicalAgeRange (   $a_typical_age_range_id)

Definition at line 49 of file class.ilMDEducational.php.

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
if(!$a_typical_age_range_id)
{
return false;
}
$typ =& new ilMDTypicalAgeRange();
$typ->setMetaId($a_typical_age_range_id);
return $typ;
}

+ Here is the caller graph for this function:

& ilMDEducational::getTypicalAgeRangeIds ( )

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

References ilMDTypicalAgeRange\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
return ilMDTypicalAgeRange::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
}

+ Here is the call graph for this function:

& ilMDEducational::getTypicalAgeRangeIds ( )

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

References ilMDTypicalAgeRange\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
return ilMDTypicalAgeRange::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMDEducational::getTypicalLearningTime ( )

Definition at line 282 of file class.ilMDEducational.php.

{
return $this->typical_learning_time;
}
ilMDEducational::getTypicalLearningTime ( )

Definition at line 320 of file class.ilMDEducational.php.

Referenced by __getFields(), getTypicalLearningTimeSeconds(), and toXML().

{
return $this->typical_learning_time;
}

+ Here is the caller graph for this function:

ilMDEducational::getTypicalLearningTimeSeconds ( )

Definition at line 325 of file class.ilMDEducational.php.

References ilMDUtils\_LOMDurationToArray(), and getTypicalLearningTime().

{
include_once './Services/MetaData/classes/class.ilMDUtils.php';
return 60 * 60 * 24 * 30 * $time_arr[0] + 60 * 60 * 24 * $time_arr[1] + 60 * 60 * $time_arr[2] + 60 * $time_arr[3] + $time_arr[4];
}

+ Here is the call graph for this function:

ilMDEducational::ilMDEducational (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

Definition at line 35 of file class.ilMDEducational.php.

References ilMDBase\ilMDBase().

{
parent::ilMDBase($a_rbac_id,
$a_obj_id,
$a_obj_type);
}

+ Here is the call graph for this function:

ilMDEducational::ilMDEducational (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

Definition at line 35 of file class.ilMDEducational.php.

References ilMDBase\ilMDBase().

{
parent::ilMDBase($a_rbac_id,
$a_obj_id,
$a_obj_type);
}

+ Here is the call graph for this function:

ilMDEducational::read ( )

Definition at line 368 of file class.ilMDEducational.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, ilMDBase\getMetaId(), setContext(), setDifficulty(), setIntendedEndUserRole(), setInteractivityLevel(), setInteractivityType(), setLearningResourceType(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setSemanticDensity(), setTypicalLearningTime(), and ilUtil\stripSlashes().

{
global $ilDB;
if($this->getMetaId())
{
$query = "SELECT * FROM il_meta_educational ".
"WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId());
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setRBACId($row->rbac_id);
$this->setObjId($row->obj_id);
$this->setObjType($row->obj_type);
$this->setInteractivityType(ilUtil::stripSlashes($row->interactivity_type));
$this->setLearningResourceType(ilUtil::stripSlashes($row->learning_resource_type));
$this->setInteractivityLevel(ilUtil::stripSlashes($row->interactivity_level));
$this->setSemanticDensity(ilUtil::stripSlashes($row->semantic_density));
$this->setIntendedEndUserRole(ilUtil::stripSlashes($row->intended_end_user_role));
$this->setDifficulty(ilUtil::stripSlashes($row->difficulty));
$this->setTypicalLearningTime(ilUtil::stripSlashes($row->typical_learning_time));
}
return true;
}
return false;
}

+ Here is the call graph for this function:

ilMDEducational::read ( )

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

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, ilMDBase\getMetaId(), setContext(), setDifficulty(), setIntendedEndUserRole(), setInteractivityLevel(), setInteractivityType(), setLearningResourceType(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setSemanticDensity(), and setTypicalLearningTime().

{
global $ilDB;
if($this->getMetaId())
{
$query = "SELECT * FROM il_meta_educational ".
"WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId() ,'integer');
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setRBACId($row->rbac_id);
$this->setObjId($row->obj_id);
$this->setObjType($row->obj_type);
$this->setInteractivityType($row->interactivity_type);
$this->setLearningResourceType($row->learning_resource_type);
$this->setInteractivityLevel($row->interactivity_level);
$this->setSemanticDensity($row->semantic_density);
$this->setIntendedEndUserRole($row->intended_end_user_role);
$this->setContext($row->context);
$this->setDifficulty($row->difficulty);
$this->setTypicalLearningTime($row->typical_learning_time);
}
return true;
}
return false;
}

+ Here is the call graph for this function:

ilMDEducational::save ( )

Reimplemented from ilMDBase.

Definition at line 288 of file class.ilMDEducational.php.

References ilMDBase\getMetaId(), and ilMDBase\setMetaId().

{
if($this->db->autoExecute('il_meta_educational',
$this->__getFields(),
DB_AUTOQUERY_INSERT))
{
$this->setMetaId($this->db->getLastInsertId());
return $this->getMetaId();
}
return false;
}

+ Here is the call graph for this function:

ilMDEducational::save ( )

Reimplemented from ilMDBase.

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

References $ilDB, __getFields(), ilMDBase\getMetaId(), and ilMDBase\setMetaId().

{
global $ilDB;
$fields = $this->__getFields();
$fields['meta_educational_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_educational'));
if($this->db->insert('il_meta_educational',$fields))
{
$this->setMetaId($next_id);
return $this->getMetaId();
}
return false;
}

+ Here is the call graph for this function:

ilMDEducational::setContext (   $a_context)

Definition at line 239 of file class.ilMDEducational.php.

Referenced by read().

{
switch($a_context)
{
case 'School':
case 'HigherEducation':
case 'Training':
case 'Other':
$this->context = $a_context;
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

ilMDEducational::setContext (   $a_context)

Definition at line 239 of file class.ilMDEducational.php.

{
switch($a_context)
{
case 'School':
case 'HigherEducation':
case 'Training':
case 'Other':
$this->context = $a_context;
return true;
default:
return false;
}
}
ilMDEducational::setDifficulty (   $a_difficulty)

Definition at line 258 of file class.ilMDEducational.php.

{
switch($a_difficulty)
{
case 'VeryEasy':
case 'Easy':
case 'Medium':
case 'Difficult':
case 'VeryDifficult':
$this->difficulty = $a_difficulty;
return true;
default:
return false;
}
}
ilMDEducational::setDifficulty (   $a_difficulty)

Definition at line 258 of file class.ilMDEducational.php.

Referenced by read().

{
switch($a_difficulty)
{
case 'VeryEasy':
case 'Easy':
case 'Medium':
case 'Difficult':
case 'VeryDifficult':
$this->difficulty = $a_difficulty;
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

ilMDEducational::setIntendedEndUserRole (   $a_ieur)

Definition at line 220 of file class.ilMDEducational.php.

{
switch($a_ieur)
{
case 'Teacher':
case 'Author':
case 'Learner':
case 'Manager':
$this->intended_end_user_role = $a_ieur;
return true;
default:
return false;
}
}
ilMDEducational::setIntendedEndUserRole (   $a_ieur)

Definition at line 220 of file class.ilMDEducational.php.

Referenced by read().

{
switch($a_ieur)
{
case 'Teacher':
case 'Author':
case 'Learner':
case 'Manager':
$this->intended_end_user_role = $a_ieur;
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

ilMDEducational::setInteractivityLevel (   $a_iat)

Definition at line 180 of file class.ilMDEducational.php.

Referenced by read().

{
switch($a_iat)
{
case 'VeryLow':
case 'Low':
case 'Medium':
case 'High':
case 'VeryHigh':
$this->interactivity_level = $a_iat;
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

ilMDEducational::setInteractivityLevel (   $a_iat)

Definition at line 180 of file class.ilMDEducational.php.

{
switch($a_iat)
{
case 'VeryLow':
case 'Low':
case 'Medium':
case 'High':
case 'VeryHigh':
$this->interactivity_level = $a_iat;
return true;
default:
return false;
}
}
ilMDEducational::setInteractivityType (   $a_iat)

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

{
switch($a_iat)
{
case 'Active':
case 'Expositive':
case 'Mixed':
$this->interactivity_type = $a_iat;
return true;
default:
return false;
}
}
ilMDEducational::setInteractivityType (   $a_iat)

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

Referenced by read().

{
switch($a_iat)
{
case 'Active':
case 'Expositive':
case 'Mixed':
$this->interactivity_type = $a_iat;
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

ilMDEducational::setLearningResourceType (   $a_lrt)

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

{
switch($a_lrt)
{
case 'Exercise':
case 'Simulation':
case 'Questionnaire':
case 'Diagram':
case 'Figure':
case 'Graph':
case 'Index':
case 'Slide':
case 'Table':
case 'NarrativeText':
case 'Exam':
case 'Experiment':
case 'ProblemStatement':
case 'SelfAssessment':
case 'Lecture':
$this->learning_resource_type = $a_lrt;
return true;
default:
return false;
}
}
ilMDEducational::setLearningResourceType (   $a_lrt)

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

Referenced by read().

{
switch($a_lrt)
{
case 'Exercise':
case 'Simulation':
case 'Questionnaire':
case 'Diagram':
case 'Figure':
case 'Graph':
case 'Index':
case 'Slide':
case 'Table':
case 'NarrativeText':
case 'Exam':
case 'Experiment':
case 'ProblemStatement':
case 'SelfAssessment':
case 'Lecture':
$this->learning_resource_type = $a_lrt;
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

ilMDEducational::setPhysicalTypicalLearningTime (   $months,
  $days,
  $hours,
  $minutes,
  $seconds 
)

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

References setTypicalLearningTime().

{
if(!$months and !$days and !$hours and !$minutes and !$seconds)
{
$this->setTypicalLearningTime('PT00H00M');
return true;
}
$tlt = 'P';
if($months)
{
$tlt .= ($months.'M');
}
if($days)
{
$tlt .= ($days.'D');
}
if($hours or $minutes or $seconds)
{
$tlt .= 'T';
}
if($hours)
{
$tlt .= ($hours.'H');
}
if($minutes)
{
$tlt .= ($minutes.'M');
}
if($seconds)
{
$tlt .= ($seconds.'S');
}
$this->setTypicalLearningTime($tlt);
return true;
}

+ Here is the call graph for this function:

ilMDEducational::setSemanticDensity (   $a_sd)

Definition at line 200 of file class.ilMDEducational.php.

Referenced by read().

{
switch($a_sd)
{
case 'VeryLow':
case 'Low':
case 'Medium':
case 'High':
case 'VeryHigh':
$this->semantic_density = $a_sd;
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

ilMDEducational::setSemanticDensity (   $a_sd)

Definition at line 200 of file class.ilMDEducational.php.

{
switch($a_sd)
{
case 'VeryLow':
case 'Low':
case 'Medium':
case 'High':
case 'VeryHigh':
$this->semantic_density = $a_sd;
return true;
default:
return false;
}
}
ilMDEducational::setTypicalLearningTime (   $a_tlt)

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

{
$this->typical_learning_time = $a_tlt;
}
ilMDEducational::setTypicalLearningTime (   $a_tlt)

Definition at line 316 of file class.ilMDEducational.php.

Referenced by read(), and setPhysicalTypicalLearningTime().

{
$this->typical_learning_time = $a_tlt;
}

+ Here is the caller graph for this function:

ilMDEducational::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 404 of file class.ilMDEducational.php.

References $lang, getContext(), getDescription(), getDescriptionIds(), getDifficulty(), getIntendedEndUserRole(), getInteractivityLevel(), getInteractivityType(), getLanguage(), getLanguageIds(), getLearningResourceType(), getSemanticDensity(), getTypicalAgeRange(), getTypicalAgeRangeIds(), and getTypicalLearningTime().

{
$writer->xmlStartTag('Educational',
array('InteractivityType' => $this->getInteractivityType(),
'LearningResourceType' => $this->getLearningResourceType(),
'InteractivityLevel' => $this->getInteractivityLevel(),
'SemanticDensity' => $this->getSemanticDensity(),
'IntendedEndUserRole' => $this->getIntendedEndUserRole(),
'Context' => $this->getContext(),
'Difficulty' => $this->getDifficulty()));
// TypicalAgeRange
foreach($this->getTypicalAgeRangeIds() as $id)
{
$key =& $this->getTypicalAgeRange($id);
$key->toXML($writer);
}
// TypicalLearningTime
$writer->xmlElement('TypicalLearningTime',null,$this->getTypicalLearningTime());
// Description
foreach($this->getDescriptionIds() as $id)
{
$key =& $this->getDescription($id);
$key->toXML($writer);
}
// Language
foreach($this->getLanguageIds() as $id)
{
$lang =& $this->getLanguage($id);
$lang->toXML($writer);
}
$writer->xmlEndTag('Educational');
}

+ Here is the call graph for this function:

ilMDEducational::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 449 of file class.ilMDEducational.php.

References $lang, getContext(), getDescription(), getDescriptionIds(), getDifficulty(), getIntendedEndUserRole(), getInteractivityLevel(), getInteractivityType(), getLanguage(), getLanguageIds(), getLearningResourceType(), ilMDBase\getObjId(), ilMDBase\getRBACId(), getSemanticDensity(), getTypicalAgeRange(), getTypicalAgeRangeIds(), and getTypicalLearningTime().

{
$writer->xmlStartTag('Educational',
array('InteractivityType' => $this->getInteractivityType()
: 'Active',
'LearningResourceType' => $this->getLearningResourceType()
: 'Exercise',
'InteractivityLevel' => $this->getInteractivityLevel()
: 'Medium',
'SemanticDensity' => $this->getSemanticDensity()
? $this->getSemanticDensity()
: 'Medium',
'IntendedEndUserRole' => $this->getIntendedEndUserRole()
: 'Learner',
'Context' => $this->getContext()
? $this->getContext()
: 'Other',
'Difficulty' => $this->getDifficulty()
? $this->getDifficulty()
: 'Medium'));
// TypicalAgeRange
$typ_ages = $this->getTypicalAgeRangeIds();
foreach($typ_ages as $id)
{
$key =& $this->getTypicalAgeRange($id);
// extra test due to bug 5316 (may be due to eLaix import)
if (is_object($key))
{
$key->toXML($writer);
}
}
if(!count($typ_ages))
{
include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
$typ = new ilMDTypicalAgeRange($this->getRBACId(),$this->getObjId());
$typ->toXML($writer);
}
// TypicalLearningTime
$writer->xmlElement('TypicalLearningTime',null,$this->getTypicalLearningTime());
// Description
foreach($this->getDescriptionIds() as $id)
{
$key =& $this->getDescription($id);
$key->toXML($writer);
}
// Language
foreach($this->getLanguageIds() as $id)
{
$lang =& $this->getLanguage($id);
$lang->toXML($writer);
}
$writer->xmlEndTag('Educational');
}

+ Here is the call graph for this function:

ilMDEducational::update ( )

Reimplemented from ilMDBase.

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

References $ilDB, and ilMDBase\getMetaId().

{
global $ilDB;
if($this->getMetaId())
{
if($this->db->autoExecute('il_meta_educational',
$this->__getFields(),
DB_AUTOQUERY_UPDATE,
"meta_educational_id = ".$ilDB->quote($this->getMetaId())))
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

ilMDEducational::update ( )

Reimplemented from ilMDBase.

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

References $ilDB, and ilMDBase\getMetaId().

{
global $ilDB;
if($this->getMetaId())
{
if($this->db->update('il_meta_educational',
$this->__getFields(),
array("meta_educational_id" => array('integer',$this->getMetaId()))))
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:


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