Stud.IP  4.2 Revision
Seminar Class Reference
Collaboration diagram for Seminar:
Collaboration graph

Public Member Functions

 __construct ($course_or_id=FALSE)
 
 __get ($field)
 
 __set ($field, $value)
 
 __isset ($field)
 
 __call ($method, $params)
 
 createId ()
 
 getMembers ($status='dozent')
 
 getAdmissionMembers ($status='awaiting')
 
 getId ()
 
 getName ()
 
 getNumber ()
 
 isVisible ()
 
 getInstitutId ()
 
 getSemesterStartTime ()
 
 getSemesterDurationTime ()
 
 getNextDate ($return_mode='string')
 
 getFirstDate ($return_mode='string')
 
 getUndecoratedData ($filter=false)
 
 getFormattedTurnus ($short=FALSE)
 
 getFormattedTurnusDates ($short=FALSE)
 
 getMetaDateCount ()
 
 getMetaDateValue ($key, $value_name)
 
 setMetaDateValue ($key, $value_name, $value)
 
 restore ()
 
 getSettings ()
 
 store ($trigger_chdate=true)
 
 setStartSemester ($start)
 
 removeAndUpdateSingleDates ()
 
 getStartSemester ()
 
 setEndSemester ($end)
 
 getEndSemester ()
 
 getEndSemesterVorlesEnde ()
 
 getStartSemesterName ()
 
 readSingleDatesForCycle ($metadate_id)
 
 readSingleDates ($force=FALSE, $filter=FALSE)
 
getSingleDate ($singleDateID, $cycle_id='')
 
getSingleDates ($filter=false, $force=false, $include_deleted_dates=false)
 
 getCycles ()
 
getSingleDatesForCycle ($metadate_id)
 
 readIssues ($force=false)
 
 addSingleDate (&$singledate)
 
 addIssue (&$issue)
 
 deleteSingleDate ($date_id, $cycle_id='')
 
 cancelSingleDate ($date_id, $cycle_id='')
 
 unDeleteSingleDate ($date_id, $cycle_id='')
 
 getStackedMessages ()
 
 getNextMessage ()
 
 createError ($text)
 
 createInfo ($text)
 
 createMessage ($text)
 
 appendMessages ( $messages)
 
 addCycle ($data=array())
 
 editCycle ($data=array())
 
 deleteCycle ($cycle_id)
 
 setTurnus ($turnus, $metadate_id=false)
 
 getTurnus ($metadate_id=false)
 
 bookRoomForSingleDate ($singleDateID, $roomID, $cycle_id='', $append_messages=true)
 
 getStatOfNotBookedRooms ($cycle_id)
 
 getStatus ()
 
 getBookedRoomsTooltip ($cycle_id)
 
 getRequestsInfo ($cycle_id)
 
 getCycleColorClass ($cycle_id)
 
getIssues ($force=false)
 
 deleteIssue ($issue_id)
 
getIssue ($issue_id)
 
 changeIssuePriority ($issue_id, $new_priority)
 
 renumberIssuePrioritys ()
 
 autoAssignIssues ($themen, $cycle_id)
 
 hasRoomRequest ()
 
 getRoomRequestStatus ()
 
 applyTimeFilter ($start, $end)
 
 setFilter ($timestamp)
 
 registerCommand ($command, $function)
 
 processCommands ()
 
 getFreeTextPredominantRoom ($cycle_id)
 
 getPredominantRoom ($cycle_id, $list=FALSE)
 
 getFormattedPredominantRooms ($cycle_id, $link=true, $show=3)
 
 removeRequest ($singledate_id, $cycle_id='')
 
 hasDatesOutOfDuration ($force=false)
 
 getStartWeek ($metadate_id=false)
 
 setStartWeek ($week, $metadate_id=false)
 
 getGroupedDates ($singledate=null, $metadate=null)
 
 getRoomRequestInfo ()
 
 removeSeminarRequest ()
 
 getNumberOfParticipants ()
 
 getNumberOfParticipantsBySeminarId ($sem_id)
 
 getStudyAreas ()
 
 setStudyAreas ($selected)
 
 isPublic ()
 
 isStudygroup ()
 
 getDefaultGroup ()
 
 delete ()
 
 getDatesHTML ($params=array())
 
 getDatesExport ($params=array())
 
 getDatesXML ($params=array())
 
 getDatesTemplate ($template, $params=array())
 
 getData ()
 
 getInstitutes ($sem_id=null)
 
 setInstitutes ($institutes=array())
 
 addMember ($user_id, $status='autor', $force=false)
 
 deleteMember ($user_id)
 
 setMemberPriority ($members)
 
 setLabel ($user_id, $label)
 
 getEnrolmentInfo ($user_id)
 
 addPreliminaryMember ($user_id, $comment='')
 
 getCourseSet ()
 
 isAdmissionEnabled ()
 
 getFreeAdmissionSeats ()
 
 isAdmissionLocked ()
 
 isPasswordProtected ()
 
 getAdmissionTimeFrame ()
 
 getSlotModule ($slot)
 
 addToWaitlist ($user_id, $which_end='last')
 

Static Public Member Functions

static GetInstance ($id=false, $refresh_cache=false)
 
static setInstance (Seminar $seminar)
 
static GetSemIdByDateId ($date_id)
 

Data Fields

 $issues = null
 
 $irregularSingleDates = null
 
 $messages = array()
 
 $semester = null
 
 $filterStart = 0
 
 $filterEnd = 0
 
 $hasDatesOutOfDuration = -1
 
 $message_stack = array()
 
 $user_number = 0
 
 $commands
 
 $BookedRoomsStatTemp
 
 $request_id
 
 $requestData
 
 $room_request
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $course_or_id = FALSE)

Constructor

Pass nothing to create a seminar, or the seminar_id from an existing seminar to change or delete public

Parameters
string$seminar_idthe seminar to be retrieved
Here is the call graph for this function:

Member Function Documentation

◆ __call()

__call (   $method,
  $params 
)

◆ __get()

__get (   $field)

◆ __isset()

__isset (   $field)

◆ __set()

__set (   $field,
  $value 
)

◆ addCycle()

addCycle (   $data = array())
Here is the call graph for this function:

◆ addIssue()

addIssue ( $issue)
Here is the call graph for this function:

◆ addMember()

addMember (   $user_id,
  $status = 'autor',
  $force = false 
)

adds a user to the seminar with the given status

Parameters
user_idstring: ID of the user
statusstring: status of the user for the seminar "user", "autor", "tutor", "dozent"
forcebool: if false (default) the user will only be upgraded and not degraded in his/her status
Here is the call graph for this function:

◆ addPreliminaryMember()

addPreliminaryMember (   $user_id,
  $comment = '' 
)

adds user with given id as preliminary member to course

Parameters
string$user_id
Returns
integer 1 if successfull
Here is the call graph for this function:

◆ addSingleDate()

addSingleDate ( $singledate)
Here is the call graph for this function:

◆ addToWaitlist()

addToWaitlist (   $user_id,
  $which_end = 'last' 
)

adds user with given id on waitinglist

Parameters
string$user_id
string$which_end'last' or 'first'
Returns
integer|bool number on waitlist or false if not successful
Here is the call graph for this function:

◆ appendMessages()

appendMessages (   $messages)

add an array of messages to the message-stack

Parameters
mixed$messagesarray of pre-marked message-strings
boolreturns true on success
Here is the caller graph for this function:

◆ applyTimeFilter()

applyTimeFilter (   $start,
  $end 
)
Here is the caller graph for this function:

◆ autoAssignIssues()

autoAssignIssues (   $themen,
  $cycle_id 
)

◆ bookRoomForSingleDate()

bookRoomForSingleDate (   $singleDateID,
  $roomID,
  $cycle_id = '',
  $append_messages = true 
)
Here is the call graph for this function:

◆ cancelSingleDate()

cancelSingleDate (   $date_id,
  $cycle_id = '' 
)
Here is the call graph for this function:

◆ changeIssuePriority()

changeIssuePriority (   $issue_id,
  $new_priority 
)
Here is the call graph for this function:

◆ createError()

createError (   $text)

stack an error-message

Parameters
string$textthe message to stack
Here is the caller graph for this function:

◆ createId()

createId ( )

creates an new id for this object private

Returns
string the unique id

◆ createInfo()

createInfo (   $text)

stack an info-message

Parameters
string$textthe message to stack
Here is the caller graph for this function:

◆ createMessage()

createMessage (   $text)

stack a success-message

Parameters
string$textthe message to stack
Here is the caller graph for this function:

◆ delete()

delete ( )

Deletes the current seminar

Returns
void returns success-message if seminar could be deleted otherwise an error-message
Here is the call graph for this function:

◆ deleteCycle()

deleteCycle (   $cycle_id)
Here is the call graph for this function:

◆ deleteIssue()

deleteIssue (   $issue_id)

◆ deleteMember()

deleteMember (   $user_id)

deletes a user from the seminar by respecting the rule that at least one user with status "dozent" must stay there

Parameters
user_idstring: user_id of the user to delete
returnfalse or $this for chaining
Here is the call graph for this function:

◆ deleteSingleDate()

deleteSingleDate (   $date_id,
  $cycle_id = '' 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editCycle()

editCycle (   $data = array())

Change a regular timeslot of the seminar. The data is passed as an array conatining the following fields: start_stunde, start_minute, end_stunde, end_minute description, turnus, startWeek, day, sws

Parameters
array$datathe cycle-data
Returns
void
Here is the call graph for this function:

◆ getAdmissionMembers()

getAdmissionMembers (   $status = 'awaiting')

◆ getAdmissionTimeFrame()

getAdmissionTimeFrame ( )

returns array with start and endtime of course enrolment timeframe return null if there is no timeframe

Returns
array assoc array with start_time end_time as keys timestamps as values
Here is the call graph for this function:

◆ getBookedRoomsTooltip()

getBookedRoomsTooltip (   $cycle_id)
Here is the call graph for this function:

◆ getCourseSet()

getCourseSet ( )

returns courseset object for this course

Returns
CourseSet courseset object or null
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCycleColorClass()

getCycleColorClass (   $cycle_id)
Parameters
$cycle_id
Returns
string
Here is the call graph for this function:

◆ getCycles()

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

◆ getData()

getData ( )

returns an asscociative array with the attributes of the seminar depending on the field-names in the database

Returns
array

◆ getDatesExport()

getDatesExport (   $params = array())

returns a representation without html of the seminar-dates

Parameters
arrayoptional variables which are passed to the template
Returns
string the representation of the dates without html
Author
Till Glöggler tgloe.nosp@m.ggl@.nosp@m.uos.d.nosp@m.e
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDatesHTML()

getDatesHTML (   $params = array())

returns a html representation of the seminar-dates

Parameters
arrayoptional variables which are passed to the template
Returns
string the html-representation of the dates
Author
Till Glöggler tgloe.nosp@m.ggl@.nosp@m.uos.d.nosp@m.e
Here is the call graph for this function:

◆ getDatesTemplate()

getDatesTemplate (   $template,
  $params = array() 
)

returns a representation of the seminar-dates with a specifiable template

Parameters
mixedthis can be a template-object or a string pointing to a template in path_to_studip/templates
arrayoptional parameters which are passed to the template
Returns
string the template output of the dates
Author
Till Glöggler tgloe.nosp@m.ggl@.nosp@m.uos.d.nosp@m.e
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDatesXML()

getDatesXML (   $params = array())

returns a xml-representation of the seminar-dates

Parameters
arrayoptional variables which are passed to the template
Returns
string the xml-representation of the dates
Author
Till Glöggler tgloe.nosp@m.ggl@.nosp@m.uos.d.nosp@m.e
Here is the call graph for this function:

◆ getDefaultGroup()

getDefaultGroup ( )
Returns
int returns default colour group for new members (shown in meine_seminare.php)
Here is the call graph for this function:

◆ getEndSemester()

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

◆ getEndSemesterVorlesEnde()

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

◆ getEnrolmentInfo()

getEnrolmentInfo (   $user_id)

returns array with information about enrolment to this course for given user_id ['enrolment_allowed'] : true or false ['cause']: keyword to describe the cause ['description'] : readable description of the cause

Parameters
string$user_id
Returns
array
Here is the call graph for this function:

◆ getFirstDate()

getFirstDate (   $return_mode = 'string')
Here is the call graph for this function:

◆ getFormattedPredominantRooms()

getFormattedPredominantRooms (   $cycle_id,
  $link = true,
  $show = 3 
)
Here is the call graph for this function:

◆ getFormattedTurnus()

getFormattedTurnus (   $short = FALSE)
Here is the call graph for this function:

◆ getFormattedTurnusDates()

getFormattedTurnusDates (   $short = FALSE)
Here is the call graph for this function:

◆ getFreeAdmissionSeats()

getFreeAdmissionSeats ( )

returns the number of free seats in the course or true if not limited

Returns
integer
Here is the call graph for this function:

◆ getFreeTextPredominantRoom()

getFreeTextPredominantRoom (   $cycle_id)

◆ getGroupedDates()

getGroupedDates (   $singledate = null,
  $metadate = null 
)
Here is the call graph for this function:

◆ getId()

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

◆ GetInstance()

static GetInstance (   $id = false,
  $refresh_cache = false 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInstitutes()

getInstitutes (   $sem_id = null)

returns an array with all IDs of Institutes this seminar is related to

Parameters
sem_idstring: optional ID of a seminar, when null, this ID will be used
Returns
: array of IDs (not associative)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInstitutId()

getInstitutId ( )

◆ getIssue()

& getIssue (   $issue_id)
Here is the call graph for this function:

◆ getIssues()

& getIssues (   $force = false)
Here is the call graph for this function:

◆ getMembers()

getMembers (   $status = 'dozent')
Here is the caller graph for this function:

◆ getMetaDateCount()

getMetaDateCount ( )

◆ getMetaDateValue()

getMetaDateValue (   $key,
  $value_name 
)

◆ getName()

getName ( )

◆ getNextDate()

getNextDate (   $return_mode = 'string')
Here is the call graph for this function:

◆ getNextMessage()

getNextMessage ( )

return the next stacked messag-string

Returns
string a message-string

◆ getNumber()

getNumber ( )

return the field VeranstaltungsNummer for the seminar

Returns
string the seminar-number for the current seminar

◆ getNumberOfParticipants()

getNumberOfParticipants ( )

instance method

returns number of participants for each usergroup in seminar, total, lecturers, tutors, authors, users

Parameters
string(optional) return count only for given usergroup
Returns
array

◆ getNumberOfParticipantsBySeminarId()

getNumberOfParticipantsBySeminarId (   $sem_id)

class method

returns number of participants for each usergroup in given seminar, total, lecturers, tutors, authors, users

Parameters
stringseminar_id
string(optional) return count only for given usergroup
Returns
array
Here is the call graph for this function:

◆ getPredominantRoom()

getPredominantRoom (   $cycle_id,
  $list = FALSE 
)

◆ getRequestsInfo()

getRequestsInfo (   $cycle_id)
Here is the call graph for this function:

◆ getRoomRequestInfo()

getRoomRequestInfo ( )

creates a textual, status-dependent representation of a room-request for a seminar.

Returns
string conatining room, responsible person, properties, current status and message / decline-message
Here is the call graph for this function:

◆ getRoomRequestStatus()

getRoomRequestStatus ( )

this function returns a human-readable status of a room-request, if any, false otherwise

the int-values of the states are: 0 - room-request is open 1 - room-request has been edited, but no confirmation has been sent 2 - room-request has been edited and a confirmation has been sent 3 - room-request has been declined

they are mapped with: 0 - open 1 - pending 2 - closed 3 - declined

Returns
string the mapped text
Here is the caller graph for this function:

◆ getSemesterDurationTime()

getSemesterDurationTime ( )

◆ getSemesterStartTime()

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

◆ GetSemIdByDateId()

static GetSemIdByDateId (   $date_id)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSettings()

getSettings ( )

returns an array of variables from the seminar-object, excluding variables containing objects or arrays

Returns
array

◆ getSingleDate()

& getSingleDate (   $singleDateID,
  $cycle_id = '' 
)
Here is the call graph for this function:

◆ getSingleDates()

& getSingleDates (   $filter = false,
  $force = false,
  $include_deleted_dates = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSingleDatesForCycle()

& getSingleDatesForCycle (   $metadate_id)
Here is the call graph for this function:

◆ getSlotModule()

getSlotModule (   $slot)

returns StudipModule object for given slot, null when deactivated or not available

Parameters
string$slot
Returns
StudipModule
Here is the call graph for this function:

◆ getStackedMessages()

getStackedMessages ( )

return all stacked messages as a multidimensional array

The array has the following structure: array( 'type' => ..., 'message' ... ) where type is one of error, info and success

Returns
mixed the array of stacked messages

◆ getStartSemester()

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

◆ getStartSemesterName()

getStartSemesterName ( )

return the name of the seminars start-semester

Returns
string the name of the start-semester or false if there is no start-semester

◆ getStartWeek()

getStartWeek (   $metadate_id = false)

◆ getStatOfNotBookedRooms()

getStatOfNotBookedRooms (   $cycle_id)

get StatOfNotBookedRooms returns an array: open: number of rooms with no booking all: number of singleDates, which can have a booking open_rooms: array of singleDates which have no booking

Parameters
String$cycle_idId of cycle
Returns
array as described above
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStatus()

getStatus ( )

◆ getStudyAreas()

getStudyAreas ( )

Returns the IDs of this course's study areas.

Returns
array an array of IDs
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTurnus()

getTurnus (   $metadate_id = false)

◆ getUndecoratedData()

getUndecoratedData (   $filter = false)

This function returns an associative array of the dates owned by this seminar

Returns
mixed a multidimensional array of seminar-dates
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasDatesOutOfDuration()

hasDatesOutOfDuration (   $force = false)
Here is the call graph for this function:

◆ hasRoomRequest()

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

◆ isAdmissionEnabled()

isAdmissionEnabled ( )

returns true if the number of participants of this course is limited

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

◆ isAdmissionLocked()

isAdmissionLocked ( )

returns true if the course is locked

Returns
boolean
Here is the call graph for this function:

◆ isPasswordProtected()

isPasswordProtected ( )

returns true if the course is password protected

Returns
boolean
Here is the call graph for this function:

◆ isPublic()

isPublic ( )
Returns
boolean returns TRUE if this course is publicly visible, FALSE otherwise
Here is the call graph for this function:

◆ isStudygroup()

isStudygroup ( )
Returns
boolean returns TRUE if this course is a studygroup, FALSE otherwise
Here is the caller graph for this function:

◆ isVisible()

isVisible ( )

◆ processCommands()

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

◆ readIssues()

readIssues (   $force = false)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readSingleDates()

readSingleDates (   $force = FALSE,
  $filter = FALSE 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readSingleDatesForCycle()

readSingleDatesForCycle (   $metadate_id)

return an array of singledate-objects for the submitted cycle identified by metadate_id

Parameters
string$metadate_idthe id identifying the cycle
Returns
mixed an array of singledate-objects
Here is the caller graph for this function:

◆ registerCommand()

registerCommand (   $command,
  $function 
)

◆ removeAndUpdateSingleDates()

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

◆ removeRequest()

removeRequest (   $singledate_id,
  $cycle_id = '' 
)

removes a room-request for a single date. If no cycle_id is given, the single date is an irregular date of the seminar, otherwise it is a single date of a regular entry.

Parameters
string$singledate_idthe id of the date
string$cycle_idthe metadate_id of the regular entry (optional)
Returns
boolean true on success
Here is the call graph for this function:

◆ removeSeminarRequest()

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

◆ renumberIssuePrioritys()

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

◆ restore()

restore ( )

restore the data

the complete data of the object will be loaded from the db public

Exceptions
Exceptionif there is no such course
Returns
boolean always true
Here is the caller graph for this function:

◆ setEndSemester()

setEndSemester (   $end)
Here is the call graph for this function:

◆ setFilter()

setFilter (   $timestamp)
Here is the call graph for this function:

◆ setInstance()

static setInstance ( Seminar  $seminar)
static
Here is the caller graph for this function:

◆ setInstitutes()

setInstitutes (   $institutes = array())

set the entries for seminar_inst table in database seminare.institut_id will always be added

Parameters
institutesarray: array of Institut_id's
Returns
bool: if something changed
Here is the call graph for this function:

◆ setLabel()

setLabel (   $user_id,
  $label 
)
Here is the call graph for this function:

◆ setMemberPriority()

setMemberPriority (   $members)

sets the almost never used column position in the table seminar_user

Parameters
membersarray: array of user_id's - wrong IDs will be ignored
Returns
$this
Here is the call graph for this function:

◆ setMetaDateValue()

setMetaDateValue (   $key,
  $value_name,
  $value 
)

◆ setStartSemester()

setStartSemester (   $start)
Here is the call graph for this function:

◆ setStartWeek()

setStartWeek (   $week,
  $metadate_id = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStudyAreas()

setStudyAreas (   $selected)

Sets the study areas of this course.

Parameters
arrayan array of IDs
Returns
void
Here is the call graph for this function:

◆ setTurnus()

setTurnus (   $turnus,
  $metadate_id = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ store()

store (   $trigger_chdate = true)

◆ unDeleteSingleDate()

unDeleteSingleDate (   $date_id,
  $cycle_id = '' 
)
Here is the call graph for this function:

Field Documentation

◆ $BookedRoomsStatTemp

$BookedRoomsStatTemp

◆ $commands

$commands

◆ $filterEnd

$filterEnd = 0

◆ $filterStart

$filterStart = 0

◆ $hasDatesOutOfDuration

◆ $irregularSingleDates

$irregularSingleDates = null

◆ $issues

$issues = null

◆ $message_stack

$message_stack = array()

◆ $messages

$messages = array()

◆ $request_id

$request_id

◆ $requestData

$requestData

◆ $room_request

$room_request

◆ $semester

$semester = null

◆ $user_number

$user_number = 0

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