Stud.IP  2.4 Revision 48548
 All Data Structures Namespaces Files Functions Variables Groups Pages
CalendarScheduleModel Class Reference
Collaboration diagram for CalendarScheduleModel:
Collaboration graph

Static Public Member Functions

static storeEntry ($data)
static storeSeminarEntry ($data)
static deleteEntry ($id)
static getScheduleEntries ($user_id, $start_hour, $end_hour, $id=false)
static getSeminarEntry ($seminar_id, $user_id, $cycle_id=false, $semester=false)
static deleteSeminarEntries ($user_id, $seminar_id)
static getSeminarEntries ($user_id, $semester, $start_hour, $end_hour, $show_hidden=false)
static getSeminarEntriesForInstitute ($user_id, $semester, $start_hour, $end_hour, $institute_id)
static getSeminarCycleId (Seminar $seminar, $start, $end)
static isSeminarVisible ($seminar_id, $cycle_id)
static getInstituteEntries ($user_id, $semester, $start_hour, $end_hour, $institute_id, $days, $show_hidden=false)
static getEntries ($user_id, $semester, $start_hour, $end_hour, $days, $show_hidden=false)
static addDayChooser ($entries, $days, $controller= 'schedule')
static adminBind ($seminar_id, $cycle_id, $visible=true)
static unbind ($seminar_id, $cycle_id=false)
static bind ($seminar_id, $cycle_id)

Detailed Description

Pseudo-namespace containing helper methods for the schedule.

Since
2.0

Member Function Documentation

static addDayChooser (   $entries,
  $days,
  $controller = 'schedule' 
)
static

adds title and link to CalendarColumn-objects and sorts the objects to be displayed correctly in the calendar-view

Parameters
array$entriesan array of CalendarColumn-objects
array$daysan array of int's, denoting the days to be displayed
Returns
array

Here is the call graph for this function:

Here is the caller graph for this function:

static adminBind (   $seminar_id,
  $cycle_id,
  $visible = true 
)
static

Toggle entries' visibility

Parameters
string$seminar_idthe course's ID
string$cycle_idthe cycle's ID
bool$visiblethe value to switch to
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

static bind (   $seminar_id,
  $cycle_id 
)
static

Switch a seminars' cycle to visible.

Parameters
string$seminar_idthe course's ID
string$cycle_idthe cycle's ID
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

static deleteEntry (   $id)
static

delete the entry with the submitted id, belonging to the current user

Parameters
string$id
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

static deleteSeminarEntries (   $user_id,
  $seminar_id 
)
static

Deletes the schedule entries of one user for one seminar.

Parameters
string$user_idthe user of the schedule
string$seminar_idthe seminar which entries should be deleted

Here is the call graph for this function:

Here is the caller graph for this function:

static getEntries (   $user_id,
  $semester,
  $start_hour,
  $end_hour,
  $days,
  $show_hidden = false 
)
static
Parameters
string$user_id
mixed$semesterthe data for the semester to be displayed Returns an array of CalendarColumn's, containing the seminar-entries for the passed user (in the passed semester) and the user-defined schedule-entries. The start- and end-hour are used to constrain the returned entries to the passed time-period. The passed days constrain the entries to these. Seminar-entries can be hidden, so you can opt-in to fetch the hidden ones as well.
string$user_idthe user's ID
string$semesterthe data for the semester to be displayed
int$start_hourthe start hour of the entries
int$end_hourthe end hour of the entries
array$daysdays to be displayed
bool$show_hiddenfilters hidden entries
Returns
array

Here is the call graph for this function:

Here is the caller graph for this function:

static getInstituteEntries (   $user_id,
  $semester,
  $start_hour,
  $end_hour,
  $institute_id,
  $days,
  $show_hidden = false 
)
static

Returns an array of CalendarColumn's, containing the seminar-entries for the passed user (in the passed semester belonging to the passed institute) and the user-defined schedule-entries. The start- and end-hour are used to constrain the returned entries to the passed time-period. The passed days constrain the entries to these. Seminar-entries can be hidden, so you can opt-in to fetch the hidden ones as well.

Parameters
string$user_idthe user's ID
string$semesterthe data for the semester to be displayed
int$start_hourthe start hour of the entries
int$end_hourthe end hour of the entries
string$institute_idthe institute's ID
array$daysdays to be displayed
bool$show_hiddenfilters hidden entries
Returns
array an array of entries

Here is the call graph for this function:

Here is the caller graph for this function:

static getScheduleEntries (   $user_id,
  $start_hour,
  $end_hour,
  $id = false 
)
static

Returns an array of CalendarColumn's containing the schedule entries (optionally of a given id only). The start- and end-hour are used to constrain the returned entries to the passed time-period. If you pass an id, there will be only the single entry with that id in the CalendarColumn

Parameters
string$user_idthe ID of the user
int$start_hourthe start hour
int$end_hourthe end hour
string$idoptional; the ID of the schedule-entry
Returns
array an array containing the entries

Here is the call graph for this function:

Here is the caller graph for this function:

static getSeminarCycleId ( Seminar  $seminar,
  $start,
  $end 
)
static

Returns the ID of the cycle of a course specified by start and end.

Parameters
Seminaran instance of a Seminar
stringthe start of the cycle
stringthe end of the cycle
Returns
string the ID of the cycle

Here is the call graph for this function:

static getSeminarEntries (   $user_id,
  $semester,
  $start_hour,
  $end_hour,
  $show_hidden = false 
)
static

Returns an array of CalendarColumn's, containing the seminar-entries for the passed user in the passed semester. The start- and end-hour are used to constrain the returned entries to the passed time-period. Seminar-entries can be hidden, so you can opt-in to fetch the hidden ones as well.

Parameters
string$user_idthe ID of the user
string$semesteran array containing the "beginn" of the semester
int$start_hourthe start hour
int$end_hourthe end hour
string$show_hiddenoptional; true to show hidden, false otherwise
Returns
array an array containing the properties of the entry

Here is the call graph for this function:

Here is the caller graph for this function:

static getSeminarEntriesForInstitute (   $user_id,
  $semester,
  $start_hour,
  $end_hour,
  $institute_id 
)
static

Returns an array of CalendarColumn's, containing the seminar-entries for the passed user in the passed semester belonging to the passed institute. The start- and end-hour are used to constrain the returned entries to the passed time-period.

Parameters
string$user_idthe ID of the user
array$semesteran array containing the "beginn" of the semester
int$start_hourthe start hour
int$end_hourthe end hour
string$institute_idthe ID of the institute
Returns
array an array containing the entries

Here is the call graph for this function:

Here is the caller graph for this function:

static getSeminarEntry (   $seminar_id,
  $user_id,
  $cycle_id = false,
  $semester = false 
)
static

Return an entry for the specified course.

Parameters
string$seminar_idthe ID of the course
string$user_idthe ID of the user
mixed$cycle_ideither false or the ID of the cycle
mixed$semesterfilter for this semester
Returns
array the course's entry

Here is the call graph for this function:

Here is the caller graph for this function:

static isSeminarVisible (   $seminar_id,
  $cycle_id 
)
static

check if the passed cycle of the passed id is visible for the currently logged in user int the schedule

Parameters
stringthe ID of the course
stringthe ID of the cycle
Returns
bool true if visible, false otherwise

Here is the call graph for this function:

static storeEntry (   $data)
static

update an existing entry or -if $data['id'] is not set- create a new entry

Parameters
mixed$data

Here is the call graph for this function:

Here is the caller graph for this function:

static storeSeminarEntry (   $data)
static

Update an existing entry of a course or create a new entry if $data['id'] is not set

Parameters
mixed$datathe data to store
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

static unbind (   $seminar_id,
  $cycle_id = false 
)
static

Switch a seminars' cycle to invisible.

Parameters
string$seminar_idthe course's ID
string$cycle_idthe cycle's ID
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:


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