53        $query = 
"SELECT * FROM usr_starting_point WHERE id = " . 
$ilDB->quote($a_id, 
'integer');
 
   56        while ($point = 
$ilDB->fetchAssoc(
$res)) {
 
   73        $this->starting_point = $a_starting_point;
 
   95        $this->starting_object = $a_starting_object;
 
  117        $this->starting_position = $a_starting_position;
 
  139        $this->rule_type = $a_rule_type;
 
  161        $this->rule_options = $a_rule_options;
 
  184        $query = 
"SELECT * FROM usr_starting_point";
 
  187        while ($point = 
$ilDB->fetchAssoc(
$res)) {
 
  189                "id" => $point[
"id"],
 
  190                "position" => $point[
"position"],
 
  191                "starting_point" => $point[
'starting_point'],
 
  192                "starting_object" => $point[
'starting_object'],
 
  193                "rule_type" => $point[
'rule_type'],
 
  194                "rule_options" => $point[
'rule_options']
 
  209        $query = 
"SELECT * FROM usr_starting_point WHERE rule_options LIKE %s";
 
  214            $options = unserialize($sp[
'rule_options']);
 
  216            $roles[
$options[
'role_id']] = array(
 
  218                "starting_point" => $sp[
'starting_point'],
 
  219                "starting_object" => $sp[
'starting_object'],
 
  220                "position" => $sp[
'position'],
 
  236        require_once 
"./Services/AccessControl/classes/class.ilObjRole.php";
 
  238        $global_roles = $rbacreview->getGlobalRoles();
 
  242        $ids_roles_with_sp = array();
 
  243        foreach ($roles_with_starting_point as $role) {
 
  244            array_push($ids_roles_with_sp, $role[
'role_id']);
 
  247        $ids_roles_without_sp = array_diff($global_roles, $ids_roles_with_sp);
 
  250        foreach ($ids_roles_without_sp as $roleid) {
 
  253                "id" => $role_obj->getId(),
 
  254                "title" => $role_obj->getTitle(),
 
  270        $position = $max_position + 10;
 
  272        $next_id = 
$ilDB->nextId(
'usr_starting_point');
 
  283            "INSERT INTO usr_starting_point (id, starting_point, starting_object, position, rule_type, rule_options) VALUES (%s, %s, %s, %s, %s, %s)",
 
  284            array(
'integer', 
'integer', 
'integer', 
'integer', 
'integer', 
'text'),
 
  297            'UPDATE usr_starting_point 
  298                        SET starting_point = %s, 
  299                                starting_object = %s, 
  304            array(
'integer', 
'integer', 
'integer', 
'integer', 
'text', 
'integer'),
 
  313    public function delete()
 
  317        $query = 
"DELETE FROM usr_starting_point WHERE id = " . 
$ilDB->quote($this->
id, 
"integer");
 
  318        $ilDB->manipulate(
$query);
 
  331        $result = 
$ilDB->query(
"SELECT max(position) as max_order FROM usr_starting_point");
 
  334            $order_val = (int) 
$row[
'max_order'];
 
  347        foreach ($a_items as $k => $v) {
 
  350                $item[
'starting_position'] = $ord_const;
 
  352                $a_items[$ord_const] = $item;
 
  353                $ord_const = $ord_const + 10;
 
  370        foreach ($a_items as 
$id => $position) {
 
  371            if ($position > self::ORDER_POSITION_MIN && $position < self::ORDER_POSITION_MAX) {
 
  373                    "UPDATE usr_starting_point SET" .
 
  374                    " position = " . 
$ilDB->quote($nr, 
'integer') .
 
  375                    " WHERE id = " . 
$ilDB->quote(
$id, 
'integer')
 
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
save()
insert starting point into database
getPosition()
Gets the starting point position.
getStartingObject()
Gets the starting object.
static getRolesWithStartingPoint()
get array with all roles which have starting point defined.
setStartingObject($a_starting_object)
Sets the starting object.
update()
update starting point
setData($a_id)
Set data for the starting point.
static getStartingPoints()
Get all the starting points in database.
getRuleType()
Gets the rule type.
setPosition($a_starting_position)
Sets the starting position.
setRuleOptions($a_rule_options)
Sets rule type options.
getRuleOptions()
Gets the rule options.
setRuleType($a_rule_type)
Sets rule type.
saveOrder($a_items)
Save all starting point positions.
const USER_SELECTION_RULE
getStartingPoint()
Gets the starting point.
setStartingPoint($a_starting_point)
Sets the starting point.
static reArrangePositions($a_items)
static getGlobalRolesWithoutStartingPoint()
Get id and title of the roles without starting points.
__construct($a_id=0)
Constructor.
foreach($_POST as $key=> $value) $res