Stud.IP  trunk Revision
AutoInsert Class Reference
Collaboration diagram for AutoInsert:
Collaboration graph

Public Member Functions

 instance ()
 
 __construct ()
 
 saveUser ($user_id, $status=false)
 
 deleteUserSeminare ($user_id)
 

Static Public Member Functions

static checkSeminar ($seminar_id, $domain_id=false)
 
static saveSeminar ($seminar_id, $status, $domain_id)
 
static updateSeminar ($seminar_id, $domain='', $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)
 

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

Constructor & Destructor Documentation

◆ __construct()

__construct ( )
Here is the call graph for this function:

Member Function Documentation

◆ checkAutoInsertUser()

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:

◆ checkSeminar()

static checkSeminar (   $seminar_id,
  $domain_id = false 
)
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:

◆ deleteSeminar()

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:

◆ deleteUserSeminare()

deleteUserSeminare (   $user_id)
Parameters
type$user_id
Here is the call graph for this function:

◆ getAllSeminars()

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:

◆ getSeminar()

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:

◆ instance()

instance ( )
Here is the caller graph for this function:

◆ saveAutoInsertUser()

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:

◆ saveSeminar()

static saveSeminar (   $seminar_id,
  $status,
  $domain_id 
)
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:

◆ saveUser()

saveUser (   $user_id,
  $status = false 
)

Trägt den Benutzer in den Eingestellten veranstaltungen automatisch ein.

Parameters
type$user_id
type$statusWenn Status nicht angegeben wird, wird der Status des Users aus user_id genommen
Returns
array 'added' Namen der Seminare in die der User eingetragen wurde array 'removed' Namen der Seminare aus denen der User ausgetragen wurde
Here is the call graph for this function:

◆ updateSeminar()

static updateSeminar (   $seminar_id,
  $domain = '',
  $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: