24 include_once
'./Services/Calendar/classes/class.ilDate.php';
66 $this->mapping_id = $a_mapping_id;
79 $this->mapping_id = $a_id;
98 $this->container_id = $a_id;
117 $this->range_dt_start = $start;
126 return $this->range_dt_start ? $this->range_dt_start :
new ilDate(time(),
IL_CAL_UNIX);
136 $this->range_dt_end = $end;
145 if($this->range_dt_end)
161 $this->field_name = $a_field;
180 $this->mapping_type = $a_type;
199 $this->mapping_value = $a_value;
224 public function delete()
226 $sta = $this->db->manipulateF(
'DELETE FROM ecs_container_mapping WHERE mapping_id = %s ',
238 $sta = $this->db->manipulateF(
239 'UPDATE ecs_container_mapping SET '.
240 'container_id = %s, '.
242 'mapping_type = %s, '.
243 'mapping_value = %s, '.
244 'date_range_start = %s,'.
245 'date_range_end = %s '.
246 'WHERE mapping_id = %s',
247 array(
'integer',
'text',
'integer',
'text',
'integer',
'integer',
'integer'),
267 $mapping_id = $ilDB->nextId(
'ecs_container_mapping');
268 $sta = $this->db->manipulateF(
269 'INSERT INTO ecs_container_mapping '.
270 '(mapping_id,container_id,field_name,mapping_type,mapping_value,date_range_start,date_range_end) '.
271 'VALUES(%s,%s,%s,%s,%s,%s,%s) ',
272 array(
'integer',
'integer',
'text',
'integer',
'text',
'integer',
'integer'),
315 case self::TYPE_FIXED:
323 case self::TYPE_DURATION:
324 include_once
'./Services/Calendar/classes/class.ilDatePresentation.php';
338 include_once
'./Services/WebServices/ECS/classes/class.ilECSUtils.php';
343 foreach($part as $part_id)
347 $part_string .=
', ';
352 $part_string .=
$name;
356 $part_string .= $part_id;
368 public function matches(ilECSEcontent $econtent)
374 case 'study_courses':
381 if(!is_object($econtent->getTimePlace()))
412 case self::ATTR_ARRAY:
413 $values = explode(
',',$a_value);
414 $ilLog->write(__METHOD__.
': Checking for value: '. $a_value);
415 $ilLog->write(__METHOD__.
': Checking against attribute values: '. $this->getMappingValue());
419 $ilLog->write(__METHOD__.
': Checking for value: '. $a_value);
420 $ilLog->write(__METHOD__.
': Checking against attribute values: '. $this->getMappingValue());
421 $values = array($a_value);
425 $values = array($a_value);
428 $values = explode(
',',$a_value);
430 foreach($values as $value)
432 $value = trim($value);
435 case self::TYPE_FIXED:
439 $attribute_value = trim($attribute_value);
440 if(strcasecmp($attribute_value,$value) == 0)
447 case self::TYPE_DURATION:
448 include_once
'./Services/Calendar/classes/class.ilDateTime.php';
467 $res = $this->db->queryF(
'SELECT * FROM ecs_container_mapping WHERE mapping_id = %s',
471 while(
$row = $this->db->fetchObject(
$res))