| 
    Stud.IP
    trunk Revision
    
   | 
  

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 | |
| __construct | ( | $course_or_id = FALSE | ) | 
Constructor
Pass nothing to create a seminar, or the seminar_id from an existing seminar to change or delete @access public
| string | $seminar_id | the seminar to be retrieved | 

| __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
| user_id | string: ID of the user | 
| status | string: status of the user for the seminar "user", "autor", "tutor", "dozent" | 
| force | bool: 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
| string | $user_id | 

| addSingleDate | ( | & | $singledate | ) | 

| addToWaitlist | ( | $user_id, | |
$which_end = 'last'  | 
        |||
| ) | 
adds user with given id on waitinglist
| string | $user_id | |
| string | $which_end | 'last' or 'first' | 

| appendMessages | ( | $messages | ) | 
add an array of messages to the message-stack
| mixed | $messages | array of pre-marked message-strings | 
| bool | returns true on success | 

| applyTimeFilter | ( | $start, | |
| $end | |||
| ) | 

| autoAssignIssues | ( | $themen, | |
| $cycle_id | |||
| ) | 
| bookRoomForSingleDate | ( | $singleDateID, | |
| $roomID, | |||
$cycle_id = '',  | 
        |||
$append_messages = true  | 
        |||
| ) | 

| cancelSingleDate | ( | $date_id, | |
$cycle_id = ''  | 
        |||
| ) | 

| changeIssuePriority | ( | $issue_id, | |
| $new_priority | |||
| ) | 

| createError | ( | $text | ) | 
stack an error-message
| string | $text | the message to stack | 

| createId | ( | ) | 
creates an new id for this object @access private
| createInfo | ( | $text | ) | 
stack an info-message
| string | $text | the message to stack | 

| createMessage | ( | $text | ) | 
stack a success-message
| string | $text | the message to stack | 

| delete | ( | ) | 
Deletes the current seminar

| 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
| user_id | string: 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
| array | $data | the cycle-data | 

| getAdmissionMembers | ( | $status = 'awaiting' | ) | 
| getAdmissionTimeFrame | ( | ) | 
returns array with start and endtime of course enrolment timeframe return null if there is no timeframe

| getBookedRoomsTooltip | ( | $cycle_id | ) | 

| getCourseSet | ( | ) | 
returns courseset object for this course


| getCycleColorClass | ( | $cycle_id | ) | 
| $cycle_id | 

| getCycles | ( | ) | 

| getData | ( | ) | 
returns an asscociative array with the attributes of the seminar depending on the field-names in the database
| getDatesExport | ( | $params = [] | ) | 
returns a representation without html of the seminar-dates
| array | optional variables which are passed to the template | 


| getDatesHTML | ( | $params = [] | ) | 
returns a html representation of the seminar-dates
| array | optional variables which are passed to the template | 

| getDatesTemplate | ( | $template, | |
$params = []  | 
        |||
| ) | 
returns a representation of the seminar-dates with a specifiable template
| mixed | this can be a template-object or a string pointing to a template in path_to_studip/templates | 
| array | optional parameters which are passed to the template | 


| getDatesXML | ( | $params = [] | ) | 
returns a xml-representation of the seminar-dates
| array | optional variables which are passed to the template | 

| getDefaultGroup | ( | ) | 

| 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
| string | $user_id | 

| getFirstDate | ( | $return_mode = 'string' | ) | 

| getFormattedPredominantRooms | ( | $cycle_id, | |
$link = true,  | 
        |||
$show = 3  | 
        |||
| ) | 

| getFormattedTurnus | ( | $short = FALSE | ) | 

| getFormattedTurnusDates | ( | $short = FALSE | ) | 

| getFreeAdmissionSeats | ( | ) | 
returns the number of free seats in the course or true if not limited

| getFreeTextPredominantRoom | ( | $cycle_id | ) | 
| getGroupedDates | ( | $singledate = null,  | 
        |
$metadate = null  | 
        |||
| ) | 

| getId | ( | ) | 



| getInstitutes | ( | $sem_id = null | ) | 
returns an array with all IDs of Institutes this seminar is related to
| sem_id | string: optional ID of a seminar, when null, this ID will be used | 


| 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
| getNumber | ( | ) | 
return the field VeranstaltungsNummer for the seminar
| getNumberOfParticipants | ( | ) | 
instance method
returns number of participants for each usergroup in seminar, total, lecturers, tutors, authors, users
| string | (optional) return count only for given usergroup | 
| getNumberOfParticipantsBySeminarId | ( | $sem_id | ) | 
class method
returns number of participants for each usergroup in given seminar, total, lecturers, tutors, authors, users
| string | seminar_id | 
| string | (optional) return count only for given usergroup | 

| getPredominantRoom | ( | $cycle_id, | |
$list = FALSE  | 
        |||
| ) | 
| getRequestsInfo | ( | $cycle_id | ) | 

| getRoomRequestInfo | ( | ) | 
creates a textual, status-dependent representation of a room-request for a seminar.

| 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

| getSemesterDurationTime | ( | ) | 
| getSemesterStartTime | ( | ) | 

      
  | 
  static | 


| getSettings | ( | ) | 
returns an array of variables from the seminar-object, excluding variables containing objects or arrays
| & getSingleDate | ( | $singleDateID, | |
$cycle_id = ''  | 
        |||
| ) | 



| & getSingleDatesForCycle | ( | $metadate_id | ) | 

| getSlotModule | ( | $slot | ) | 
returns StudipModule object for given slot, null when deactivated or not available
| string | $slot | 

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

| getStartSemesterName | ( | ) | 
return the name of the seminars 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
| String | $cycle_id | Id of cycle | 


| getStatus | ( | ) | 
| getStudyAreas | ( | ) | 
Returns the IDs of this course's study areas.


| getTurnus | ( | $metadate_id = false | ) | 
| getUndecoratedData | ( | $filter = false | ) | 
This function returns an associative array of the dates owned by this seminar


| hasDatesOutOfDuration | ( | $force = false | ) | 


| hasRoomRequest | ( | ) | 

| isAdmissionEnabled | ( | ) | 
returns true if the number of participants of this course is limited


| isAdmissionLocked | ( | ) | 
returns true if the course is locked

| isPasswordProtected | ( | ) | 
returns true if the course is password protected

| isPublic | ( | ) | 

| isStudygroup | ( | ) | 

| 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
| string | $metadate_id | the id identifying the cycle | 

| registerCommand | ( | $command, | |
| $function | |||
| ) | 
| removeAndUpdateSingleDates | ( | ) | 

| 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.
| string | $singledate_id | the id of the date | 
| string | $cycle_id | the metadate_id of the regular entry (optional) | 

| removeSeminarRequest | ( | ) | 

| renumberIssuePrioritys | ( | ) | 

| restore | ( | ) | 
restore the data
the complete data of the object will be loaded from the db @access public
| Exception | if there is no such course | 

| setEndSemester | ( | $end | ) | 

| setFilter | ( | $timestamp | ) | 

      
  | 
  static | 

| setInstitutes | ( | $institutes = [] | ) | 
set the entries for seminar_inst table in database seminare.institut_id will always be added
| institutes | array: array of Institut_id's | 

| setLabel | ( | $user_id, | |
| $label | |||
| ) | 

| setMemberPriority | ( | $members | ) | 
sets the almost never used column position in the table seminar_user
| members | array: array of user_id's - wrong IDs will be ignored | 

| setMetaDateValue | ( | $key, | |
| $value_name, | |||
| $value | |||
| ) | 
| setStartSemester | ( | $start | ) | 

| setStartWeek | ( | $week, | |
$metadate_id = false  | 
        |||
| ) | 


| setStudyAreas | ( | $selected | ) | 
Sets the study areas of this course.
| array | an array of IDs | 

| setTurnus | ( | $turnus, | |
$metadate_id = false  | 
        |||
| ) | 


| store | ( | $trigger_chdate = true | ) | 
| unDeleteSingleDate | ( | $date_id, | |
$cycle_id = ''  | 
        |||
| ) | 

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