Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
AutoInsert Class Reference

Public Member Functions

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

Static Public Member Functions

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

Static Protected Member Functions

static getSeminarCache ()
 

Static Protected Attributes

static $seminar_cache = null
 

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

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
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
static deleteSeminar (   $seminar_id)
static

Removes a seminar from the autoinsertion process.

Parameters
string$seminar_idId of the seminar
deleteUserSeminare (   $user_id)
Parameters
type$user_id
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)
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
static getSeminarCache ( )
staticprotected

Returns the cache for seminars.

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

Field Documentation

$seminar_cache = null
staticprotected

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