Stud.IP  5.4
CourseMember Class Reference
Inheritance diagram for CourseMember:
SimpleORMap PrivacyObject

Public Member Functions

 getUserFullname ($format='full')
 
 cbRemoveNotifications ()
 
 getExportData ()
 
- Public Member Functions inherited from SimpleORMap
 __construct ($id=null)
 
 __clone ()
 
 getRelationOptions ($relation)
 
 getTableMetadata ()
 
 hasAutoIncrementColumn ()
 
 setId ($id)
 
 getId ()
 
 getNewId ()
 
 toArray ($only_these_fields=null)
 
 toRawArray ($only_these_fields=null)
 
 toArrayRecursive ($only_these_fields=null)
 
 getValue ($field)
 
 getRelationValue ($relation, $field)
 
 getDefaultValue ($field)
 
 setValue ($field, $value)
 
 __get ($field)
 
 __set ($field, $value)
 
 __isset ($field)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 getIterator ()
 
 count ()
 
 isField ($field)
 
 isRelation ($field)
 
 isAdditionalField ($field)
 
 isAliasField ($field)
 
 isI18nField ($field)
 
 setData ($data, $reset=false)
 
 isNew ()
 
 isDeleted ()
 
 setNew ($is_new)
 
 getWhereQuery ()
 
 restore ()
 
 store ()
 
 triggerChdate ()
 
 delete ()
 
 isDirty ()
 
 isFieldDirty ($field)
 
 revertValue ($field)
 
 getPristineValue ($field)
 
 initRelation ($relation)
 
 resetRelation ($relation)
 
 cleanup ()
 

Static Public Member Functions

static findByCourse ($course_id)
 
static findByCourseAndStatus ($course_id, $status)
 
static findByUser ($user_id)
 
static countByCourseAndStatus ($course_id, $status)
 
static getMembers (string $course_id, string $sort_status='autor', string $order_by='nachname asc')
 
static getMemberByIdentification (string $course_id, string $nachname, string $vorname=null)
 
static getMemberByUsername (string $course_id, string $username)
 
static getMemberByEmail ($course_id, $email)
 
static getMemberByDatafield (string $course_id, string $nachname, string $datafield_id)
 
static exportUserData (StoredUserData $storage)
 
static getNextPosition (string $status, string $seminar_id)
 
static resortMembership (string $course_id, int $position, string $status='tutor')
 
static insertCourseMember ($seminar_id, $user_id, $status, $copy_studycourse=false, $contingent=false, $log_message=false)
 
- Static Public Member Functions inherited from SimpleORMap
static tableScheme ($db_table)
 
static expireTableScheme ()
 
static exists ($id)
 
static countBySql ($sql='1', $params=[])
 
static create ($data)
 
static build ($data, $is_new=true)
 
static buildExisting ($data)
 
static import ($data)
 
static findBySQL ($sql, $params=[])
 
static findOneBySQL ($where, $params=[])
 
static findThru ($foreign_key_value, $options)
 
static findEachBySQL ($callable, $sql, $params=[])
 
static findMany ($pks=[], $order='', $order_params=[])
 
static findEachMany ($callable, $pks=[], $order='', $order_params=[])
 
static findAndMapBySQL ($callable, $where, $params=[])
 
static findAndMapMany ($callable, $pks=[], $order='', $order_params=[])
 
static deleteBySQL ($where, $params=[])
 
static toObject ($id_or_object)
 
static __callStatic (string $name, array $arguments)
 

Static Protected Member Functions

static configure ($config=[])
 
- Static Protected Member Functions inherited from SimpleORMap
static db_table ()
 
static db_fields ()
 
static pk ()
 
static default_values ()
 
static serialized_fields ()
 
static alias_fields ()
 
static i18n_fields ()
 
static additional_fields ()
 
static has_many ()
 
static has_one ()
 
static belongs_to ()
 
static has_and_belongs_to_many ()
 
static registered_callbacks ()
 
static known_slots ()
 
static notification_map ()
 
static getter_setter_map ()
 
static configure ($config=[])
 
static config ($key)
 
static registerCallback ($types, $cb)
 
static unregisterCallback ($types, $cb)
 

Additional Inherited Members

- Data Fields inherited from SimpleORMap
const ID_SEPARATOR = '_'
 
- Static Public Attributes inherited from SimpleORMap
static $schemes = null
 
- Protected Member Functions inherited from SimpleORMap
 _getId ($field)
 
 _setId ($field, $value)
 
 _getAdditionalValueFromRelation ($field)
 
 _setAdditionalValueFromRelation ($field, $value)
 
 _getAdditionalValue ($field)
 
 _setAdditionalValue ($field, $value)
 
 parseRelationOptions ($type, $name, $options)
 
 storeRelations ($only_these=null)
 
 deleteRelations ()
 
 initializeContent ()
 
 applyCallbacks ($type)
 
 cbNotificationMapper ($cb_type)
 
 cbAfterInitialize ($cb_type)
 
 setSerializedValue ($field, $value)
 
 setI18nValue ($field, $value)
 
- Protected Attributes inherited from SimpleORMap
 $content = []
 
 $content_db = []
 
 $is_new = true
 
 $is_deleted = false
 
 $relations = []
 
 $additional_data = []
 
- Static Protected Attributes inherited from SimpleORMap
static $config = []
 
static $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id']
 
static $performs_batch_operation = false
 

Member Function Documentation

◆ cbRemoveNotifications()

cbRemoveNotifications ( )

◆ configure()

static configure (   $config = [])
staticprotected

◆ countByCourseAndStatus()

static countByCourseAndStatus (   $course_id,
  $status 
)
static

Retrieves the number of all members of a status

Parameters
String | Array$statusthe status to filter with
Returns
int the number of all those members.

◆ exportUserData()

static exportUserData ( StoredUserData  $storage)
static

Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.

Parameters
StoredUserData$storageobject to store data into

Implements PrivacyObject.

◆ findByCourse()

static findByCourse (   $course_id)
static

◆ findByCourseAndStatus()

static findByCourseAndStatus (   $course_id,
  $status 
)
static

◆ findByUser()

static findByUser (   $user_id)
static

◆ getExportData()

getExportData ( )

◆ getMemberByDatafield()

static getMemberByDatafield ( string  $course_id,
string  $nachname,
string  $datafield_id 
)
static

Get user informations by generic datafields for csv-import

Parameters
string$course_id
string$nachname
string$datafield_id
Returns
Array

◆ getMemberByEmail()

static getMemberByEmail (   $course_id,
  $email 
)
static

Get user informations by email for csv-import

Parameters
String$course_id
String$email
Returns
Array

◆ getMemberByIdentification()

static getMemberByIdentification ( string  $course_id,
string  $nachname,
string  $vorname = null 
)
static

Get user informations by first and last name for csv-import

Parameters
string$course_id
string$nachname
string$vorname
Returns
array

◆ getMemberByUsername()

static getMemberByUsername ( string  $course_id,
string  $username 
)
static

Get user informations by username for csv-import

Parameters
string$course_id
string$username
Returns
Array

◆ getMembers()

static getMembers ( string  $course_id,
string  $sort_status = 'autor',
string  $order_by = 'nachname asc' 
)
static

Get members of a course

Parameters
string$course_id
string$sort_status
string$order_by
Returns
array

◆ getNextPosition()

static getNextPosition ( string  $status,
string  $seminar_id 
)
static

return the highest position-number increased by one for the passed user-group in the passed seminar

Parameters
string$statuscan be on of 'tutor', 'dozent', ...
string$seminar_idthe seminar to work on
Returns
int the next available position

◆ getUserFullname()

getUserFullname (   $format = 'full')

◆ insertCourseMember()

static insertCourseMember (   $seminar_id,
  $user_id,
  $status,
  $copy_studycourse = false,
  $contingent = false,
  $log_message = false 
)
static

Insert a user into a seminar with optional log-message and contingent

Parameters
string$seminar_id
string$user_id
string$statusstatus of user in the seminar (user, autor, tutor, dozent)
boolean$copy_studycourseif true, the studycourse is copied from admission_seminar_user to seminar_user. Overrides the $contingent-parameter
string$contingentoptional studiengang_id, if no id is given, no contingent is considered
string$log_messageoptional log-message. if no log-message is given a default one is used
Returns
bool

◆ resortMembership()

static resortMembership ( string  $course_id,
int  $position,
string  $status = 'tutor' 
)
static

reset the order-positions for the given status in the passed seminar, starting at the passed position

Parameters
string$course_idthe seminar to work on
int$positionthe position to start with
Returns
void

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