Stud.IP  5.4
Seminar Class Reference

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=[])
 
 editCycle ($data=[])
 
 deleteCycle ($cycle_id)
 
 setTurnus ($turnus, $metadate_id=false)
 
 getTurnus ($metadate_id=false)
 
 getStatOfNotBookedRooms ($cycle_id)
 
 getStatus ()
 
 getBookedRoomsTooltip ($cycle_id)
 
 getCycleColorClass ($cycle_id)
 
getIssues ($force=false)
 
 deleteIssue ($issue_id)
 
getIssue ($issue_id)
 
 changeIssuePriority ($issue_id, $new_priority)
 
 renumberIssuePrioritys ()
 
 autoAssignIssues ($themen, $cycle_id)
 
 applyTimeFilter ($start, $end)
 
 setFilter ($timestamp)
 
 registerCommand ($command, $function)
 
 processCommands ()
 
 getFreeTextPredominantRoom ($cycle_id)
 
 getPredominantRoom ($cycle_id, $list=FALSE)
 
 hasDatesOutOfDuration ($force=false)
 
 getStartWeek ($metadate_id=false)
 
 setStartWeek ($week, $metadate_id=false)
 
 getNumberOfParticipants ()
 
 getNumberOfParticipantsBySeminarId ($sem_id)
 
 getStudyAreas ()
 
 setStudyAreas ($selected)
 
 isPublic ()
 
 isStudygroup ()
 
 getDefaultGroup ()
 
 delete ()
 
 getDatesHTML ($params=[])
 
 getDatesExport ($params=[])
 
 getDatesXML ($params=[])
 
 getDatesTemplate ($template, $params=[])
 
 getData ()
 
 getInstitutes ($sem_id=null)
 
 setInstitutes ($institutes=[])
 
 addMember ($user_id, $status='autor', $force=false)
 
 cancelAdmissionSubscription (array $users, string $status)
 
 cancelSubscription (array $users)
 
 deleteMember ($user_id)
 
 setMemberPriority ($members)
 
 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 = []
 
 $semester = null
 
 $filterStart = 0
 
 $filterEnd = 0
 
 $hasDatesOutOfDuration = -1
 
 $message_stack = []
 
 $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

Member Function Documentation

◆ __call()

__call (   $method,
  $params 
)

◆ __get()

__get (   $field)

◆ __isset()

__isset (   $field)

◆ __set()

__set (   $field,
  $value 
)

◆ addCycle()

addCycle (   $data = [])

◆ addIssue()

addIssue ( $issue)

◆ 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

◆ addPreliminaryMember()

addPreliminaryMember (   $user_id,
  $comment = '' 
)

adds user with given id as preliminary member to course

Parameters
string$user_id
Returns
integer 1 if successfull

◆ addSingleDate()

addSingleDate ( $singledate)

◆ 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

◆ appendMessages()

appendMessages (   $messages)

add an array of messages to the message-stack

Parameters
mixed$messagesarray of pre-marked message-strings
boolreturns true on success

◆ applyTimeFilter()

applyTimeFilter (   $start,
  $end 
)

◆ autoAssignIssues()

autoAssignIssues (   $themen,
  $cycle_id 
)

◆ cancelAdmissionSubscription()

cancelAdmissionSubscription ( array  $users,
string  $status 
)

Cancels a subscription to an admission.

Parameters
array$users
string$status
Returns
array
Exceptions
NotificationVetoException

◆ cancelSingleDate()

cancelSingleDate (   $date_id,
  $cycle_id = '' 
)

◆ cancelSubscription()

cancelSubscription ( array  $users)

Cancels a subscription to a course

Parameters
array$users
Returns
array
Exceptions
Exception

◆ changeIssuePriority()

changeIssuePriority (   $issue_id,
  $new_priority 
)

◆ createError()

createError (   $text)

stack an error-message

Parameters
string$textthe message to stack

◆ 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

◆ createMessage()

createMessage (   $text)

stack a success-message

Parameters
string$textthe message to stack

◆ delete()

delete ( )

Deletes the current seminar

Returns
void returns success-message if seminar could be deleted otherwise an error-message

◆ deleteCycle()

deleteCycle (   $cycle_id)

◆ 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
string$user_iduser_id of the user to delete
Returns
boolean

◆ deleteSingleDate()

deleteSingleDate (   $date_id,
  $cycle_id = '' 
)

◆ editCycle()

editCycle (   $data = [])

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

◆ 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

◆ getBookedRoomsTooltip()

getBookedRoomsTooltip (   $cycle_id)

◆ getCourseSet()

getCourseSet ( )

returns courseset object for this course

Returns
CourseSet courseset object or null

◆ getCycleColorClass()

getCycleColorClass (   $cycle_id)
Parameters
$cycle_id
Returns
string

◆ getCycles()

getCycles ( )

◆ 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 = [])

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

◆ getDatesHTML()

getDatesHTML (   $params = [])

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

◆ getDatesTemplate()

getDatesTemplate (   $template,
  $params = [] 
)

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

◆ getDatesXML()

getDatesXML (   $params = [])

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

◆ getDefaultGroup()

getDefaultGroup ( )
Returns
int returns default colour group for new members (shown in meine_seminare.php)

◆ getEndSemester()

getEndSemester ( )

◆ getEndSemesterVorlesEnde()

getEndSemesterVorlesEnde ( )

◆ 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

◆ getFirstDate()

getFirstDate (   $return_mode = 'string')

◆ getFormattedTurnus()

getFormattedTurnus (   $short = FALSE)

◆ getFormattedTurnusDates()

getFormattedTurnusDates (   $short = FALSE)

◆ getFreeAdmissionSeats()

getFreeAdmissionSeats ( )

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

Returns
integer

◆ getFreeTextPredominantRoom()

getFreeTextPredominantRoom (   $cycle_id)

◆ getId()

getId ( )

◆ GetInstance()

static GetInstance (   $id = false,
  $refresh_cache = false 
)
static

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

◆ getInstitutId()

getInstitutId ( )

◆ getIssue()

& getIssue (   $issue_id)

◆ getIssues()

& getIssues (   $force = false)

◆ getMembers()

getMembers (   $status = 'dozent')

◆ getMetaDateCount()

getMetaDateCount ( )

◆ getMetaDateValue()

getMetaDateValue (   $key,
  $value_name 
)

◆ getName()

getName ( )

◆ getNextDate()

getNextDate (   $return_mode = 'string')

◆ 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

◆ getPredominantRoom()

getPredominantRoom (   $cycle_id,
  $list = FALSE 
)

◆ getSemesterDurationTime()

getSemesterDurationTime ( )

◆ getSemesterStartTime()

getSemesterStartTime ( )

◆ GetSemIdByDateId()

static GetSemIdByDateId (   $date_id)
static

◆ getSettings()

getSettings ( )

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

Returns
array

◆ getSingleDate()

& getSingleDate (   $singleDateID,
  $cycle_id = '' 
)

◆ getSingleDates()

& getSingleDates (   $filter = false,
  $force = false,
  $include_deleted_dates = false 
)

◆ getSingleDatesForCycle()

& getSingleDatesForCycle (   $metadate_id)

◆ getSlotModule()

getSlotModule (   $slot)

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

Parameters
string$slot
Returns
StudipModule|null

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

◆ 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

◆ getStatus()

getStatus ( )

◆ getStudyAreas()

getStudyAreas ( )

Returns the IDs of this course's study areas.

Returns
array an array of IDs

◆ 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

◆ hasDatesOutOfDuration()

hasDatesOutOfDuration (   $force = false)

◆ isAdmissionEnabled()

isAdmissionEnabled ( )

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

Returns
boolean

◆ isAdmissionLocked()

isAdmissionLocked ( )

returns true if the course is locked

Returns
boolean

◆ isPasswordProtected()

isPasswordProtected ( )

returns true if the course is password protected

Returns
boolean

◆ isPublic()

isPublic ( )
Returns
boolean returns TRUE if this course is publicly visible, FALSE otherwise

◆ isStudygroup()

isStudygroup ( )
Returns
boolean returns TRUE if this course is a studygroup, FALSE otherwise

◆ isVisible()

isVisible ( )

◆ processCommands()

processCommands ( )

◆ readIssues()

readIssues (   $force = false)

◆ readSingleDates()

readSingleDates (   $force = FALSE,
  $filter = FALSE 
)

◆ 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

◆ registerCommand()

registerCommand (   $command,
  $function 
)

◆ removeAndUpdateSingleDates()

removeAndUpdateSingleDates ( )

◆ renumberIssuePrioritys()

renumberIssuePrioritys ( )

◆ 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

◆ setEndSemester()

setEndSemester (   $end)

◆ setFilter()

setFilter (   $timestamp)

◆ setInstance()

static setInstance ( Seminar  $seminar)
static

◆ setInstitutes()

setInstitutes (   $institutes = [])

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

◆ setMemberPriority()

setMemberPriority (   $members)

sets the almost never used column position in the table seminar_user

Parameters
array$membersmembers array: array of user_id's - wrong IDs will be ignored
Returns
Seminar

◆ setMetaDateValue()

setMetaDateValue (   $key,
  $value_name,
  $value 
)

◆ setStartSemester()

setStartSemester (   $start)

◆ setStartWeek()

setStartWeek (   $week,
  $metadate_id = false 
)

◆ setStudyAreas()

setStudyAreas (   $selected)

Sets the study areas of this course.

Parameters
arrayan array of IDs
Returns
void

◆ setTurnus()

setTurnus (   $turnus,
  $metadate_id = false 
)

◆ store()

store (   $trigger_chdate = true)

◆ unDeleteSingleDate()

unDeleteSingleDate (   $date_id,
  $cycle_id = '' 
)

Field Documentation

◆ $BookedRoomsStatTemp

$BookedRoomsStatTemp

◆ $commands

$commands

◆ $filterEnd

$filterEnd = 0

◆ $filterStart

$filterStart = 0

◆ $hasDatesOutOfDuration

◆ $irregularSingleDates

$irregularSingleDates = null

◆ $issues

$issues = null

◆ $message_stack

$message_stack = []

◆ $messages

$messages = []

◆ $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: