Stud.IP  4.2 Revision
ConditionalAdmission Class Reference
Inheritance diagram for ConditionalAdmission:
Inheritance graph
Collaboration diagram for ConditionalAdmission:
Collaboration graph

Public Member Functions

 __construct ($ruleId='', $courseSetId='')
 
 addCondition ($condition, $group='', $quota=0)
 
 delete ()
 
 getAffectedUsers ()
 
 getConditions ()
 
 getConditionGroups ()
 
 getUngroupedConditions ()
 
 getQuota ($group_id)
 
 getTemplate ()
 
 load ()
 
 conditiongroupsAllowed ()
 
 removeConditionGroups ()
 
 removeCondition ($conditionId)
 
 ruleApplies ($userId, $courseId)
 
 setAllData ($data)
 
 store ()
 
 toString ()
 
 validate ($data)
 
 getMessage ($condition=null)
 
 __clone ()
 
 setSiblings ($siblings=array())
 
- Public Member Functions inherited from AdmissionRule
 __construct ($ruleId='', $courseSetId='')
 
 afterSeatDistribution ($courseset)
 
 checkTimeFrame ()
 
 delete ()
 
 generateId ($tableName)
 
 getAffectedUsers ()
 
 getEndTime ()
 
 getInput ()
 
 getId ()
 
 getMessage ()
 
 getStartTime ()
 
 getTemplate ()
 
 load ()
 
 beforeSeatDistribution ($courseset)
 
 ruleApplies ($userId, $courseId)
 
 setAllData ($data)
 
 setEndTime ($newEndTime)
 
 setMessage ($newMessage)
 
 setStartTime ($newStartTime)
 
 store ()
 
 toString ()
 
 validate ($data)
 
 __toString ()
 
 loadSiblings ()
 
 getSiblings ()
 
 setSiblings ($siblings=array())
 
 isCombinationAllowed ($admission_rule)
 
 __clone ()
 

Static Public Member Functions

static getDescription ()
 
static getName ()
 
- Static Public Member Functions inherited from AdmissionRule
static getAvailableAdmissionRules ($activeOnly=true)
 
static getInputFrame ()
 
static getDescription ()
 
static getName ()
 

Data Fields

 $conditions = array()
 
 $conditiongroups = array()
 
 $ungrouped_conditions = array()
 
 $quota = array()
 
 $conditiongroups_allowed = null
 
 $siblings = array()
 
- Data Fields inherited from AdmissionRule
 $endTime = 0
 
 $id = ''
 
 $message = ''
 
 $default_message = ''
 
 $startTime = 0
 
 $courseSetId = ''
 
 $siblings = array()
 
 $siblings_override = false
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $ruleId = '',
  $courseSetId = '' 
)

Standard constructor.

Parameters
StringruleId If this rule has been saved previously, it will be loaded from database.
Returns
AdmissionRule the current object (this).
Here is the call graph for this function:

Member Function Documentation

◆ __clone()

__clone ( )

◆ addCondition()

addCondition (   $condition,
  $group = '',
  $quota = 0 
)

Adds a new UserFilter to this rule.

Parameters
UserFiltercondition
Stringgroup
Intquota
Returns
ConditionalAdmission
Here is the caller graph for this function:

◆ conditiongroupsAllowed()

conditiongroupsAllowed ( )

Checks if condition groups are allowed.

Returns
Boolean
Here is the call graph for this function:

◆ delete()

delete ( )

Deletes the admission rule and all associated data.

Here is the call graph for this function:

◆ getAffectedUsers()

getAffectedUsers ( )

Gets all users that are matched by thís rule.

Returns
Array An array containing IDs of users who are matched by this rule.

◆ getConditionGroups()

getConditionGroups ( )

Gets all grouped conditiongroups.

Returns
Array

◆ getConditions()

getConditions ( )

Gets all defined conditions.

Returns
Array

◆ getDescription()

static getDescription ( )
static

Gets some text that describes what this AdmissionRule (or respective subclass) does.

◆ getMessage()

getMessage (   $condition = null)

◆ getName()

static getName ( )
static

Return this rule's name.

◆ getQuota()

getQuota (   $group_id)

Gets quota for given conditiongroup.

Returns
Array

◆ getTemplate()

getTemplate ( )

Gets the template that provides a configuration GUI for this rule.

Returns
String

◆ getUngroupedConditions()

getUngroupedConditions ( )

Gets all grouped conditiongroups.

Returns
Array

◆ load()

load ( )

Helper function for loading data from DB. Generic AdmissionRule data is loaded with the parent load() method.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCondition()

removeCondition (   $conditionId)

Removes the condition with the given ID from the rule.

Parameters
StringconditionId
Returns
ConditionalAdmission

◆ removeConditionGroups()

removeConditionGroups ( )

Removes condition groups and sets all conditions as ungrouped.

◆ ruleApplies()

ruleApplies (   $userId,
  $courseId 
)

Checks whether the given user fulfills the configured admission conditions. Only one of the conditions needs to be fulfilled (logical operator OR). The fields in a condition are in conjunction (logical operator AND).

Parameters
String$userId
String$courseId
Returns
Array Array with conditions that have failed. If array is empty, everything's all right.
Here is the call graph for this function:

◆ setAllData()

setAllData (   $data)

Uses the given data to fill the object values. This can be used as a generic function for storing data if the concrete rule type isn't known in advance.

Parameters
Array$data
Returns
AdmissionRule This object.
Here is the call graph for this function:

◆ setSiblings()

setSiblings (   $siblings = array())

◆ store()

store ( )

Helper function for storing data to DB.

Here is the call graph for this function:

◆ toString()

toString ( )

A textual description of the current rule.

Returns
String

◆ validate()

validate (   $data)

Validates if the given request data is sufficient to configure this rule (e.g. if required values are present).

Parameters
ArrayRequest data
Returns
Array Error messages.
Here is the call graph for this function:

Field Documentation

◆ $conditiongroups

$conditiongroups = array()

Grouped conditions that must be fulfilled for successful admission.

◆ $conditiongroups_allowed

$conditiongroups_allowed = null

Are condition groups allowed?

◆ $conditions

$conditions = array()

All conditions that must be fulfilled for successful admission.

◆ $quota

$quota = array()

Quota for grouped conditions

◆ $siblings

$siblings = array()

courseset siblings of this rule

◆ $ungrouped_conditions

$ungrouped_conditions = array()

Conditions that must be fulfilled for successful admission.


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