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

Public Member Functions

 __construct ($id=null)
 
 toStringCategories ($as_array=false)
 
 getSeminarId ()
 
 getRecurrence ($index=null)
 
 getSemName ()
 
 getType ()
 
 getTitle ()
 
 getStart ()
 
 setStart ($timestamp)
 
 getEnd ()
 
 setEnd ($timestamp)
 
 getDuration ()
 
 getLocation ()
 
 getUid ()
 
 getDescription ()
 
 getStudipCategory ()
 
 getCategory ()
 
 getEditorId ()
 
 isDayEvent ()
 
 getAccessibility ()
 
 getChangeDate ()
 
 getImportDate ()
 
 getRelatedGroups ()
 
 getProperties ()
 
 getProperty ($name)
 
 setPermissionUser ($user_id)
 
 havePermission ($permission, $user_id=null)
 
 getPermission ($user_id=null)
 
 toStringPriority ()
 
 toStringAccessibility ()
 
 toStringRecurrence ($only_type=false)
 
 getAuthor ()
 
 getEditor ()
 
- Public Member Functions inherited from CourseDate
 __construct ($id=null)
 
 addTopic ($topic)
 
 removeTopic ($topic)
 
 getRoomName ()
 
 getRoom ()
 
 getTypeName ()
 
 getFullname ($format='default')
 
 toString ()
 
 cancelDate ()
 
 store ()
 
 delete ()
 
 getDeletionWarnings ()
 
 getAccessibleFolderFiles ($user_or_id)
 
- 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)
 
 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 getEventsByInterval ($user_id, DateTime $start, dateTime $end)
 
- Static Public Member Functions inherited from CourseDate
static getConsecutiveNumber ($date, $semester=null)
 
static findByIssue_id ($issue_id)
 
static findBySeminar_id ($seminar_id)
 
static findByRange_id ($seminar_id, $order_by='ORDER BY date')
 
static findByStatusgruppe_id ($group_id)
 
static exportUserData (StoredUserData $storage)
 
- Static Public Member Functions inherited from SimpleORMap
static tableScheme ($db_table)
 
static expireTableScheme ()
 
static find ($id)
 
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 ($name, $arguments)
 

Static Protected Member Functions

static configure ($config=[])
 
static checkRelated (CourseEvent $event, $user_id)
 
- Static Protected Member Functions inherited from CourseDate
static configure ($config=[])
 
- Static Protected Member Functions inherited from SimpleORMap
static configure ($config=[])
 
static config ($key)
 

Additional Inherited Members

- Data Fields inherited from CourseDate
const FORMAT_DEFAULT = 'default'
 
const FORMAT_VERBOSE = 'verbose'
 
- Data Fields inherited from SimpleORMap
const ID_SEPARATOR = '_'
 
- Static Public Attributes inherited from SimpleORMap
static $schemes = null
 
- Protected Member Functions inherited from CourseDate
 cbStudipLog ($type)
 
- 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)
 
 registerCallback ($types, $cb)
 
 unregisterCallback ($types, $cb)
 
 cbAutoIncrementColumn ($type)
 
 cbAutoKeyCreation ()
 
 cbNotificationMapper ($cb_type)
 
 cbAfterInitialize ($cb_type)
 
 setSerializedValue ($field, $value)
 
 setI18nValue ($field, $value)
 
 cbI18N ($type)
 
- Protected Attributes inherited from SimpleORMap
 $content = []
 
 $content_db = []
 
 $is_new = true
 
 $is_deleted = false
 
 $db_table = ''
 
 $db_fields = null
 
 $pk = null
 
 $default_values = []
 
 $serialized_fields = []
 
 $alias_fields = []
 
 $i18n_fields = []
 
 $additional_fields = []
 
 $relations = []
 
 $has_many = []
 
 $has_one = []
 
 $belongs_to = []
 
 $has_and_belongs_to_many = []
 
 $registered_callbacks = []
 
 $known_slots = []
 
 $notification_map = []
 
 $additional_data = []
 
 $getter_setter_map = []
 
- Static Protected Attributes inherited from SimpleORMap
static $config = []
 
static $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id']
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $id = null)

Member Function Documentation

◆ checkRelated()

static checkRelated ( CourseEvent  $event,
  $user_id 
)
staticprotected

Checks if given user is the responsible lecturer or is member of a related group

object $perm The globa perm object.

Parameters
CourseEvent$eventThe course event to check against.
string$user_idThe id of the user.
Returns
boolean
Here is the call graph for this function:

◆ configure()

static configure (   $config = [])
staticprotected

◆ getAccessibility()

getAccessibility ( )

Returns the accessibility of this event. The value is not influenced by the permission of the actual user.

According to RFC5545 the accessibility (property CLASS) is represented by the 3 state PUBLIC, PRIVATE and CONFIDENTIAL

TODO check this statement: An course event is always CONFIDENTIAL

Returns
string The accessibility as string.

◆ getAuthor()

getAuthor ( )

Returns the author of this event as user object.

Returns
User|null User object.

◆ getCategory()

getCategory ( )

Returns the index of the category. If the user has no permission, 255 is returned.

TODO remove? use getStudipCategory instead?

See also
config/config.inc.php $TERMIN_TYP
Returns
int The index of the category
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChangeDate()

getChangeDate ( )

Returns the unix timestamp of the last change.

public

◆ getDescription()

getDescription ( )

Returns the description of the topic. If the user has no permission or the event has no topic or the topics have no descritopn an empty string is returned.

Returns
String the description
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDuration()

getDuration ( )

Returns the duration of this event in seconds.

Returns
int the duration of this event in seconds

◆ getEditor()

getEditor ( )

Course events have no editor so always null is returned.

Returns
null

◆ getEditorId()

getEditorId ( )

Returns the user id of the last editor. Since course events have no editor null is returned.

Returns
null|int Returns always null.

◆ getEnd()

getEnd ( )

Returns the endtime of this event.

Returns
int The endtime of this event as a unix timestamp.
Here is the caller graph for this function:

◆ getEventsByInterval()

static getEventsByInterval (   $user_id,
DateTime  $start,
dateTime  $end 
)
static

Returns all CourseEvents in the given time range for the given range_id.

Parameters
string$user_idId of Stud.IP object from type user, course, inst
DateTime$startThe start date time.
DateTime$endThe end date time.
Returns
SimpleORMapCollection Collection of found CourseEvents.
Here is the call graph for this function:

◆ getImportDate()

getImportDate ( )

Returns the date time the event was imported. Since course events are not imported normaly, returns the date time of creation.

Returns
int Date time of import as unix timestamp:

◆ getLocation()

getLocation ( )

Returns the location. Without permission or the location is not set an empty string is returned.

See also
ClendarDate::getRoomName()
Returns
string The location
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPermission()

getPermission (   $user_id = null)
Here is the caller graph for this function:

◆ getProperties()

getProperties ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProperty()

getProperty (   $name)

Returns the value of property with given name.

Parameters
type$nameSee CalendarEvent::getProperties() for accepted values.
Returns
mixed The value of the property.
Exceptions
InvalidArgumentException
Here is the call graph for this function:

◆ getRecurrence()

getRecurrence (   $index = null)

Returns an array that represents the recurrence rule for this event. If an index is given, returns only this field of the rule.

Returns
array|string The array with th recurrence rule or only one field.
Here is the caller graph for this function:

◆ getRelatedGroups()

getRelatedGroups ( )

Returns all related groups.

TODO remove, use direct access to field CourseDate::statusgruppen.

Returns
SimpleORMapCollection The collection of statusgruppen.

◆ getSeminarId()

getSeminarId ( )

Returns the id of the related course

Returns
string The id of the related course.
Here is the call graph for this function:

◆ getSemName()

getSemName ( )

Returns the name of the related course.

Returns
string The name of the related course.
Here is the call graph for this function:

◆ getStart()

getStart ( )

Returns the starttime as unix timestamp of this event.

Returns
int The starttime of this event as a unix timestamp.
Here is the caller graph for this function:

◆ getStudipCategory()

getStudipCategory ( )

Returns the Stud.IP build in category as integer value. If the user has no permission, 255 is returned.

config.inc.php $PERS_TERMIN

Returns
int the categories
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTitle()

getTitle ( )

Returns the title of this event. The title of a course event is the name of the course or if a topic is assigned, the title of this topic. If the user has not the permission Event::PERMISSION_READABLE, the title is "Keine Berechtigung.".

Returns
string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getType()

getType ( )

TODO Wird das noch benötigt?

◆ getUid()

getUid ( )

Returns the global unique id of this event.

Returns
string The global unique id.
Here is the caller graph for this function:

◆ havePermission()

havePermission (   $permission,
  $user_id = null 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isDayEvent()

isDayEvent ( )

Returns whether the event is a all day event.

Returns

◆ setEnd()

setEnd (   $timestamp)

Sets the end date time by given unix timestamp.

Parameters
string$timestampUnix timestamp.

◆ setPermissionUser()

setPermissionUser (   $user_id)

◆ setStart()

setStart (   $timestamp)

Sets the start date time with given unix timestamp.

Parameters
string$timestampUnix timestamp.

◆ toStringAccessibility()

toStringAccessibility ( )

Course events have no accessibility settings so returns always the an empty string.

Returns
string The accessibility as string.

◆ toStringCategories()

toStringCategories (   $as_array = false)

Returns the name of the category.

Returns
string the name of the category
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toStringPriority()

toStringPriority ( )

Course events have no priority so returns always an empty string.

Returns
string The priority as a string.

◆ toStringRecurrence()

toStringRecurrence (   $only_type = false)

Returns a string representation of the recurrence rule. Since course events have no recurence defined it returns an empty string.

Parameters
bool$only_typeIf true returns only the type of recurrence.
Returns
string The recurrence rule - human readable

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