Detailed Description
AutoInsert.class.php Provides functions required by StEP00216:
- Assign seminars for automatic registration of certain user types
- Maintenance of registration rules
Example of use:
# show all auto insert seminars
# Save a new auto insert seminar with the user status
AutoInsert::saveSeminar($sem_id, $rechte);
Member Function Documentation
| static checkAutoInsertUser |
( |
|
$seminar_id, |
|
|
|
$user_id |
|
) |
| |
|
static |
Tests whether a user was already automatically registered for a certain seminar.
- Parameters
-
| string | $seminar_id | Id of the seminar |
| string | $user_id | If of the user |
- Returns
- bool Indicates whether the user was already registered
| static checkNewUser |
( |
|
$status, |
|
|
|
$user_id |
|
) |
| |
|
static |
Checks whether a user is already automatically registered for all seminars according to his status. PLEASE NOTE: The user will be registered in all seminars he's not yet registered in.
- Parameters
-
| string | $status | Current user status |
| string | $user_id | Id of the user |
- Returns
- array List of all seminar names the user was registered in
| static checkOldUser |
( |
|
$old_status, |
|
|
|
$new_status, |
|
|
|
$user_id |
|
) |
| |
|
static |
Checks whether a user is already automatically registered for all seminars according to his changed status. PLEASE NOTE: The user will be registered in all seminars he's not yet registered in.
- Parameters
-
| string | $old_status | Old user status |
| string | $new_status | Current user status |
| string | $user_id | Id of the user |
- Returns
- array List of all seminar names the user was registered in
| static checkSeminar |
( |
|
$seminar_id | ) |
|
|
static |
Tests if a seminar already has an autoinsert record
- Parameters
-
| string | $seminar_id | Id of the seminar |
- Returns
- bool Indicating whether the seminar already has an autoinsert record
| static deleteSeminar |
( |
|
$seminar_id | ) |
|
|
static |
Removes a seminar from the autoinsertion process.
- Parameters
-
| string | $seminar_id | Id of the seminar |
Check if at least one seminar is used by the autoinsert functions
- Returns
- bool Indicating whether at least one seminar is used
| static getAllSeminars |
( |
|
$only_sem_id = false | ) |
|
|
static |
Returns a list of all seminars enabled for autoinsertion
- Parameters
-
| bool | Indicates whether only the seminar ids (true) or the full dataset shall be returned (false) |
- Returns
- array The list of all enabled seminars (format according to $only_sem_id)
| static getSeminar |
( |
|
$seminar_id | ) |
|
|
static |
Returns a seminar's info for autoinsertion
- Parameters
-
| string | $seminar_id | Id of the seminar |
- Returns
- array The seminar's data as an associative array
| static saveAutoInsertUser |
( |
|
$seminar_id, |
|
|
|
$user_id |
|
) |
| |
|
static |
Store the user's automatic registration in a seminar redundantly to avoid an annoying reregistration although the user explicitely left the according seminar
- Parameters
-
| string | $user_id | Id of the user |
| string | $seminar_id | Id of the seminar |
| static saveSeminar |
( |
|
$seminar_id, |
|
|
|
$status |
|
) |
| |
|
static |
Enables a seminar for autoinsertion of users with the given status(ses)
- Parameters
-
| string | $seminar_id | Id of the seminar |
| mixed | $status | Either a single string or an array of strings containing the status(ses) to enable for autoinsertion |
| static updateSeminar |
( |
|
$seminar_id, |
|
|
|
$status, |
|
|
|
$remove = false |
|
) |
| |
|
static |
Updates an autoinsert record for a given seminar, dependent on the parameter $remove it either inserts or removes the record for the given parameters
- Parameters
-
| string | $seminar_id | Id of the seminar |
| string | $status | Status for autoinsertion |
| bool | $remove | Whether the record should be added or removed |
The documentation for this class was generated from the following file: