24include_once 
'./Services/Calendar/classes/class.ilDate.php';
 
   71        $this->mapping_id = $a_mapping_id;
 
   84        $this->mapping_id = $a_id;
 
  103        $this->container_id = $a_id;
 
  122        $this->range_dt_start = $start;
 
  131        return $this->range_dt_start ? $this->range_dt_start : 
new ilDate(time(), 
IL_CAL_UNIX);
 
  141        $this->range_dt_end = $end;
 
  150        if ($this->range_dt_end) {
 
  165        $this->field_name = $a_field;
 
  203        $this->mapping_value = $a_value;
 
  247    public function delete()
 
  249        $sta = $this->db->manipulateF(
 
  250            'DELETE FROM ecs_container_mapping WHERE mapping_id = %s ',
 
  268        $sta = $this->db->manipulateF(
 
  269            'UPDATE ecs_container_mapping SET ' .
 
  270            'container_id = %s, ' .
 
  271            'field_name = %s, ' .
 
  272            'mapping_type = %s, ' .
 
  273            'mapping_value = %s, ' .
 
  274            'date_range_start = %s,' .
 
  275            'date_range_end = %s ' .
 
  276            'WHERE mapping_id = %s',
 
  277            array(
'integer',
'text',
'integer',
'text',
'integer',
'integer',
'integer'),
 
  306        $sta = $this->db->manipulateF(
 
  307            'INSERT INTO ecs_container_mapping  ' .
 
  308            '(mapping_id,container_id,field_name,mapping_type,mapping_value,date_range_start,date_range_end) ' .
 
  309            'VALUES(%s,%s,%s,%s,%s,%s,%s) ',
 
  310            array(
'integer',
'integer',
'text',
'integer',
'text',
'integer',
'integer'),
 
  386        include_once 
'./Services/WebServices/ECS/classes/class.ilECSUtils.php';
 
  391        foreach ($part as $part_id) {
 
  393                $part_string .= 
', ';
 
  397            $part_id_arr = explode(
'_', $part_id);
 
  399                $part_string .= 
$name;
 
  401                $part_string .= $part_id;
 
  413    public function matches(array $a_matchable_content)
 
  415        if (isset($a_matchable_content[$this->
getFieldName()])) {
 
  437                $values = explode(
',', $a_value);
 
  438                $ilLog->write(__METHOD__ . 
': Checking for value: ' . $a_value);
 
  443                $ilLog->write(__METHOD__ . 
': Checking for value: ' . $a_value);
 
  445                $values = array($a_value);
 
  449                $values = array($a_value);
 
  452        $values = explode(
',', $a_value);
 
  454        foreach ($values as $value) {
 
  455            $value = trim($value);
 
  460                        $attribute_value = trim($attribute_value);
 
  461                        if (strcasecmp($attribute_value, $value) == 0) {
 
  468                    include_once 
'./Services/Calendar/classes/class.ilDateTime.php';
 
  486        $res = $this->db->queryF(
 
  487            'SELECT * FROM ecs_container_mapping WHERE mapping_id = %s',
 
  491        while ($row = $this->db->fetchObject(
$res)) {
 
An exception for terminatinating execution or to throw for unit testing.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
static _after(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
Defines a rule for the assignment of ECS remote courses to categories.
setFieldName($a_field)
set field name
matchesValue($a_value, $a_type)
Check if value matches.
getFieldName()
get field name
getMappingValue()
get mapping value
setMappingId($a_id)
set mapping id
participantsToString()
get strong presentation of participants
getMappingId()
get mapping id
getByType()
get mapping by type
setDateRangeStart($start)
set date range start
getDateRangeEnd()
get date range end
conditionToString()
condition to string
getDateRangeStart()
get date range start
setByType($a_type)
set mapping by type
const ERR_MISSING_BY_TYPE
setMappingValue($a_value)
set mapping value
setDateRangeEnd($end)
set date range end
getContainerId()
get container id
setContainerId($a_id)
set container id
__construct($a_mapping_id=0)
Constructor.
setMappingType($a_type)
set mapping type
matches(array $a_matchable_content)
Check if rule matches a specific econtent.
getMappingAsArray()
get mapping values as array
getMappingType()
get mapping type
static lookupParticipantName($a_owner, $a_server_id)
Lookup participant name.
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
foreach($_POST as $key=> $value) $res