Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
ConditionalAdmission Class Reference
Inheritance diagram for ConditionalAdmission:
AdmissionRule

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=[])
 
- 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=[])
 
 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 = []
 
 $conditiongroups = []
 
 $ungrouped_conditions = []
 
 $quota = []
 
 $conditiongroups_allowed = null
 
 $siblings = []
 
- Data Fields inherited from AdmissionRule
 $endTime = 0
 
 $id = ''
 
 $message = ''
 
 $default_message = ''
 
 $startTime = 0
 
 $courseSetId = ''
 
 $siblings = []
 
 $siblings_override = false
 

Constructor & Destructor Documentation

__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).

Member Function Documentation

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

Adds a new UserFilter to this rule.

Parameters
UserFiltercondition
Stringgroup
Intquota
Returns
ConditionalAdmission
conditiongroupsAllowed ( )

Checks if condition groups are allowed.

Returns
Boolean
delete ( )

Deletes the admission rule and all associated data.

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 ( )

Gets all grouped conditiongroups.

Returns
Array
getConditions ( )

Gets all defined conditions.

Returns
Array
static getDescription ( )
static

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

getMessage (   $condition = null)
static getName ( )
static

Return this rule's name.

getQuota (   $group_id)

Gets quota for given conditiongroup.

Returns
Array
getTemplate ( )

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

Returns
String
getUngroupedConditions ( )

Gets all grouped conditiongroups.

Returns
Array
load ( )

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

removeCondition (   $conditionId)

Removes the condition with the given ID from the rule.

Parameters
StringconditionId
Returns
ConditionalAdmission
removeConditionGroups ( )

Removes condition groups and sets all conditions as ungrouped.

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.
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.
setSiblings (   $siblings = [])
store ( )

Helper function for storing data to DB.

toString ( )

A textual description of the current rule.

Returns
String
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.

Field Documentation

$conditiongroups = []

Grouped conditions that must be fulfilled for successful admission.

$conditiongroups_allowed = null

Are condition groups allowed?

$conditions = []

All conditions that must be fulfilled for successful admission.

$quota = []

Quota for grouped conditions

$siblings = []

courseset siblings of this rule

$ungrouped_conditions = []

Conditions that must be fulfilled for successful admission.


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