32 include_once
'class.ilMDBase.php';
39 include_once
'Services/MetaData/classes/class.ilMDEntity.php';
45 include_once
'Services/MetaData/classes/class.ilMDEntity.php';
52 $ent->setMetaId($a_entity_id);
58 include_once
'Services/MetaData/classes/class.ilMDEntity.php';
62 $ent->setParentType(
'meta_contribute');
78 case 'GraphicalDesigner':
79 case 'TechnicalImplementer':
80 case 'ContentProvider':
81 case 'TechnicalValidator':
82 case 'EducationalValidator':
84 case 'InstructionalDesigner':
85 case 'SubjectMatterExpert':
88 case 'PointOfContact':
89 $this->role = $a_role;
102 $this->
date = $a_date;
115 $fields[
'meta_contribute_id'] =
array(
'integer',$next_id = $ilDB->nextId(
'il_meta_contribute'));
117 if($this->db->insert(
'il_meta_contribute',$fields))
131 if($this->db->update(
'il_meta_contribute',
132 $this->__getFields(),
147 $query =
"DELETE FROM il_meta_contribute ".
148 "WHERE meta_contribute_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
177 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
181 $query =
"SELECT * FROM il_meta_contribute ".
182 "WHERE meta_contribute_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
206 $writer->xmlStartTag(
'Contribute',
array(
'Role' => $this->
getRole()
212 foreach($entities as $id)
215 $ent->toXML($writer);
217 if(!count($entities))
219 include_once
'Services/MetaData/classes/class.ilMDEntity.php';
221 $ent->toXML($writer);
224 $writer->xmlElement(
'Date',null,$this->
getDate());
225 $writer->xmlEndTag(
'Contribute');
230 static function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
234 $query =
"SELECT meta_contribute_id FROM il_meta_contribute ".
235 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
236 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
237 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
238 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text');
243 $ids[] =
$row->meta_contribute_id;
245 return $ids ? $ids :
array();
264 $query =
"SELECT entity,ent.parent_type,role FROM il_meta_entity ent ".
265 "JOIN il_meta_contribute con ON ent.parent_id = con.meta_contribute_id ".
266 "WHERE ent.rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
267 "AND ent.obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
271 if(
$row->role ==
'Author' and $row->parent_type ==
'meta_contribute')
273 $authors[] = trim(
$row->entity);
276 return $authors ? $authors :
array();
& getEntity($a_entity_id)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static _lookupAuthors($a_rbac_id, $a_obj_id, $a_obj_type)
Lookup authors.
setMetaId($a_meta_id, $a_read_data=true)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.
setParentType($a_parent_type)