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

Public Member Functions

 getEnd_Time ()
 
 setEnd_Time ($value)
 
 getFreeSeats ()
 
 isWaitlistAvailable ()
 
 getMembersWithStatus ($status, $as_collection=false)
 
 countMembersWithStatus ($status)
 
 getNumParticipants ()
 
 getNumPrelimParticipants ()
 
 getNumWaiting ()
 
 getParticipantStatus ($user_id)
 
 getSemType ()
 
 getSemClass ()
 
 getFullname ($format='default')
 
 getDatesWithExdates ()
 
 setStudyAreas ($ids)
 
 isVisibleForUser ($user_id=null)
 
 describeRange ()
 
 getRangeType ()
 
 getRangeId ()
 
 userMayAccessRange ($user_id=null)
 
 userMayEditRange ($user_id=null)
 
 userMayAdministerRange ($user_id=null)
 
 getCompletionIcon ()
 
- 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 findCurrent ()
 
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)
 

Protected Member Functions

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

Static Protected Member Functions

static configure ($config=[])
 
- Static Protected Member Functions inherited from SimpleORMap
static configure ($config=[])
 
static config ($key)
 

Additional Inherited Members

- Data Fields inherited from SimpleORMap
const ID_SEPARATOR = '_'
 
- Static Public Attributes inherited from SimpleORMap
static $schemes = null
 
- 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']
 

Member Function Documentation

◆ configure()

static configure (   $config = [])
staticprotected
Here is the call graph for this function:

◆ countMembersWithStatus()

countMembersWithStatus (   $status)

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.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ describeRange()

describeRange ( )

Returns a descriptive text for the range type.

Returns
string

◆ 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

◆ findCurrent()

static findCurrent ( )
static

Returns the currently active course or false if none is active.

Returns
Course object of currently active course, null otherwise
Since
3.0
Here is the caller graph for this function:

◆ getCompletionIcon()

getCompletionIcon ( )

Returns the appropriate icon for the completion status.

Mapping (completion -> icon role):

  • 0 => status-red
  • 1 => status-yellow
  • 2 => status-green
Returns
Icon class

◆ getDatesWithExdates()

getDatesWithExdates ( )

◆ getEnd_Time()

getEnd_Time ( )

◆ getFreeSeats()

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

◆ getFullname()

getFullname (   $format = 'default')

Returns the full name of a course. If the important course numbers (IMPORTANT_SEMNUMBER) is set in global configs it will also display the coursenumber

Parameters
stringformatting template name
Returns
string Fullname
Here is the call graph for this function:

◆ getMembersWithStatus()

getMembersWithStatus (   $status,
  $as_collection = false 
)

Retrieves all members of a status

Parameters
String | Array$statusthe status to filter with
bool$as_collectionreturn collection instead of array?
Returns
Array an array of all those members.
Here is the call graph for this function:

◆ getNumParticipants()

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

◆ getNumPrelimParticipants()

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

◆ getNumWaiting()

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

◆ getParticipantStatus()

getParticipantStatus (   $user_id)

◆ getRangeId()

getRangeId ( )

Returns the id of the current range

Returns
string

◆ getRangeType()

getRangeType ( )

Returns a unique identificator for the range type.

Returns
string

◆ getSemClass()

getSemClass ( )

Returns the SemClass object that is defined for the course

Returns
SemClass The SemClassObject for the course
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSemType()

getSemType ( )

Returns the semType object that is defined for the course

Returns
SemType The semTypeObject for the course
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isVisibleForUser()

isVisibleForUser (   $user_id = null)

Is the current course visible for the current user?

Parameters
string$user_id
Returns
bool Visible?
Here is the call graph for this function:

◆ isWaitlistAvailable()

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

◆ logStore()

logStore ( )
protected

Generates a general log entry if the course were changed.

Here is the call graph for this function:

◆ setEnd_Time()

setEnd_Time (   $value)

◆ setStudyAreas()

setStudyAreas (   $ids)

Sets this courses study areas to the given values.

Parameters
$idsthe new study areas
Returns
bool Changes successfully saved?
Here is the call graph for this function:

◆ userMayAccessRange()

userMayAccessRange (   $user_id = null)

Decides whether the user may access the range.

Parameters
string$user_idOptional id of a user, defaults to current user
Returns
bool
Todo:
Check permissions

◆ userMayAdministerRange()

userMayAdministerRange (   $user_id = null)

Decides whether the user may adminisiter the range.

Parameters
string$user_idOptional id of a user, defaults to current user
Returns
bool
Todo:
Check permissions

◆ userMayEditRange()

userMayEditRange (   $user_id = null)

Decides whether the user may edit/alter the range.

Parameters
string$user_idOptional id of a user, defaults to current user
Returns
bool
Todo:
Check permissions

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