Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
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)
 
 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 = []
 
 $semester = null
 
 $filterStart = 0
 
 $filterEnd = 0
 
 $hasDatesOutOfDuration = -1
 
 $message_stack = []
 
 $user_number = 0
 
 $commands
 
 $BookedRoomsStatTemp
 
 $request_id
 
 $requestData
 
 $room_request
 

Constructor & Destructor Documentation

__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 (   $method,
  $params 
)
__get (   $field)
__isset (   $field)
__set (   $field,
  $value 
)
addCycle (   $data = [])
addIssue ( $issue)
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 (   $user_id,
  $comment = '' 
)

adds user with given id as preliminary member to course

Parameters
string$user_id
Returns
integer 1 if successfull
addSingleDate ( $singledate)
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 (   $messages)

add an array of messages to the message-stack

Parameters
mixed$messagesarray of pre-marked message-strings
boolreturns true on success
applyTimeFilter (   $start,
  $end 
)
autoAssignIssues (   $themen,
  $cycle_id 
)
cancelSingleDate (   $date_id,
  $cycle_id = '' 
)
changeIssuePriority (   $issue_id,
  $new_priority 
)
createError (   $text)

stack an error-message

Parameters
string$textthe message to stack
createId ( )

creates an new id for this object private

Returns
string the unique id
createInfo (   $text)

stack an info-message

Parameters
string$textthe message to stack
createMessage (   $text)

stack a success-message

Parameters
string$textthe message to stack
delete ( )

Deletes the current seminar

Returns
void returns success-message if seminar could be deleted otherwise an error-message
deleteCycle (   $cycle_id)
deleteIssue (   $issue_id)
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
return,:false or $this for chaining
deleteSingleDate (   $date_id,
  $cycle_id = '' 
)
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 (   $status = 'awaiting')
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 (   $cycle_id)
getCourseSet ( )

returns courseset object for this course

Returns
CourseSet courseset object or null
getCycleColorClass (   $cycle_id)
Parameters
$cycle_id
Returns
string
getCycles ( )
getData ( )

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

Returns
array
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 (   $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 (   $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 (   $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 ( )
Returns
int returns default colour group for new members (shown in meine_seminare.php)
getEndSemester ( )
getEndSemesterVorlesEnde ( )
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 (   $return_mode = 'string')
getFormattedTurnus (   $short = FALSE)
getFormattedTurnusDates (   $short = FALSE)
getFreeAdmissionSeats ( )

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

Returns
integer
getFreeTextPredominantRoom (   $cycle_id)
getId ( )
static GetInstance (   $id = false,
  $refresh_cache = false 
)
static
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 ( )
& getIssue (   $issue_id)
& getIssues (   $force = false)
getMembers (   $status = 'dozent')
getMetaDateCount ( )
getMetaDateValue (   $key,
  $value_name 
)
getName ( )
getNextDate (   $return_mode = 'string')
getNextMessage ( )

return the next stacked messag-string

Returns
string a message-string
getNumber ( )

return the field VeranstaltungsNummer for the seminar

Returns
string the seminar-number for the current seminar
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 (   $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 (   $cycle_id,
  $list = FALSE 
)
getSemesterDurationTime ( )
getSemesterStartTime ( )
static GetSemIdByDateId (   $date_id)
static
getSettings ( )

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

Returns
array
& getSingleDate (   $singleDateID,
  $cycle_id = '' 
)
& getSingleDates (   $filter = false,
  $force = false,
  $include_deleted_dates = false 
)
& getSingleDatesForCycle (   $metadate_id)
getSlotModule (   $slot)

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

Parameters
string$slot
Returns
StudipModule|null
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 ( )
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 (   $metadate_id = false)
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 ( )
getStudyAreas ( )

Returns the IDs of this course's study areas.

Returns
array an array of IDs
getTurnus (   $metadate_id = false)
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 (   $force = false)
isAdmissionEnabled ( )

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

Returns
boolean
isAdmissionLocked ( )

returns true if the course is locked

Returns
boolean
isPasswordProtected ( )

returns true if the course is password protected

Returns
boolean
isPublic ( )
Returns
boolean returns TRUE if this course is publicly visible, FALSE otherwise
isStudygroup ( )
Returns
boolean returns TRUE if this course is a studygroup, FALSE otherwise
isVisible ( )
processCommands ( )
readIssues (   $force = false)
readSingleDates (   $force = FALSE,
  $filter = FALSE 
)
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 (   $command,
  $function 
)
removeAndUpdateSingleDates ( )
renumberIssuePrioritys ( )
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 (   $end)
setFilter (   $timestamp)
static setInstance ( Seminar  $seminar)
static
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
setLabel (   $user_id,
  $label 
)
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
setMetaDateValue (   $key,
  $value_name,
  $value 
)
setStartSemester (   $start)
setStartWeek (   $week,
  $metadate_id = false 
)
setStudyAreas (   $selected)

Sets the study areas of this course.

Parameters
arrayan array of IDs
Returns
void
setTurnus (   $turnus,
  $metadate_id = false 
)
store (   $trigger_chdate = true)
unDeleteSingleDate (   $date_id,
  $cycle_id = '' 
)

Field Documentation

$BookedRoomsStatTemp
$commands
$filterEnd = 0
$filterStart = 0
$irregularSingleDates = null
$issues = null
$message_stack = []
$messages = []
$request_id
$requestData
$room_request
$semester = null
$user_number = 0

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