Stud.IP  2.4 Revision 48548
 All Data Structures Namespaces Files Functions Variables Groups Pages
AutoInsert Class Reference
Collaboration diagram for AutoInsert:
Collaboration graph

Static Public Member Functions

static existSeminars ()
static checkSeminar ($seminar_id)
static saveSeminar ($seminar_id, $status)
static updateSeminar ($seminar_id, $status, $remove=false)
static deleteSeminar ($seminar_id)
static getAllSeminars ($only_sem_id=false)
static getSeminar ($seminar_id)
static saveAutoInsertUser ($seminar_id, $user_id)
static checkAutoInsertUser ($seminar_id, $user_id)
static checkNewUser ($status, $user_id)
static checkOldUser ($old_status, $new_status, $user_id)

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_idId of the seminar
string$user_idIf of the user
Returns
bool Indicates whether the user was already registered

Here is the call graph for this function:

Here is the caller graph for this function:

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$statusCurrent user status
string$user_idId of the user
Returns
array List of all seminar names the user was registered in

Here is the call graph for this function:

Here is the caller graph for this function:

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_statusOld user status
string$new_statusCurrent user status
string$user_idId of the user
Returns
array List of all seminar names the user was registered in

Here is the call graph for this function:

Here is the caller graph for this function:

static checkSeminar (   $seminar_id)
static

Tests if a seminar already has an autoinsert record

Parameters
string$seminar_idId of the seminar
Returns
bool Indicating whether the seminar already has an autoinsert record

Here is the call graph for this function:

Here is the caller graph for this function:

static deleteSeminar (   $seminar_id)
static

Removes a seminar from the autoinsertion process.

Parameters
string$seminar_idId of the seminar

Here is the call graph for this function:

Here is the caller graph for this function:

static existSeminars ( )
static

Check if at least one seminar is used by the autoinsert functions

Returns
bool Indicating whether at least one seminar is used

Here is the call graph for this function:

static getAllSeminars (   $only_sem_id = false)
static

Returns a list of all seminars enabled for autoinsertion

Parameters
boolIndicates 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)

Here is the call graph for this function:

Here is the caller graph for this function:

static getSeminar (   $seminar_id)
static

Returns a seminar's info for autoinsertion

Parameters
string$seminar_idId of the seminar
Returns
array The seminar's data as an associative array

Here is the call graph for this function:

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_idId of the user
string$seminar_idId of the seminar

Here is the call graph for this function:

Here is the caller graph for this function:

static saveSeminar (   $seminar_id,
  $status 
)
static

Enables a seminar for autoinsertion of users with the given status(ses)

Parameters
string$seminar_idId of the seminar
mixed$statusEither a single string or an array of strings containing the status(ses) to enable for autoinsertion

Here is the call graph for this function:

Here is the caller graph for this function:

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_idId of the seminar
string$statusStatus for autoinsertion
bool$removeWhether the record should be added or removed

Here is the call graph for this function:

Here is the caller graph for this function:


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