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

Public Member Functions

 MetaDate ($seminar_id= '')
 getArt ()
 getStartWoche ($metadate_id=null)
 setStartWoche ($start_woche, $metadate_id=null)
 getFirstMetadate ()
 getTurnus ($metadate_id=null)
 setTurnus ($turnus, $metadate_id=null)
 setSeminarStartTime ($start)
 setSeminarDurationTime ($duration)
 getSeminarID ()
 setCycleData ($data=array(), $cycle)
 addCycle ($data=array(), $create_single_dates=true)
 editCycle ($data=array())
 deleteCycle ($cycle_id)
 deleteSingleDate ($cycle_id, $date_id, $filterStart, $filterEnd)
 unDeleteSingleDate ($cycle_id, $date_id, $filterStart, $filterEnd)
 store ()
 restore ()
 delete ($removeSingleDates=TRUE)
 sortCycleData ()
 getCycleData ()
 getCycles ()
 getMetaDataAsArray ()
 getSingleDates ($metadate_id, $filterStart=0, $filterEnd=0)
 readSingleDates ($metadate_id, $start=0, $end=0)
 hasDates ($metadate_id, $filterStart=0, $filterEnd=0)
 createSingleDates ($data)
 getVirtualSingleDates ($data)
 createSingleDatesForSemester ($metadate_id, $sem_begin, $sem_end, $startAfterTimeStamp, $corr)
 getVirtualSingleDatesForSemester ($metadate_id, $sem_begin, $sem_end, $startAfterTimeStamp, $corr)
 getVirtualMetaAssignObjects ($metadate_id, $resource_id)

Data Fields

 $seminar_id = ''
 $seminarStartTime = 0
 $seminarDurationTime = 0
 $cycles = Array()

Member Function Documentation

addCycle (   $data = array(),
  $create_single_dates = true 
)

adds a new cycledate, single dates are created if second param is true

Parameters
arrayassoc, see CycleData, metadate_id must be in $data['cycle_id']
bool$create_single_dates
Returns
string|boolean metadate_id of created cycle

Here is the call graph for this function:

createSingleDates (   $data)

create single dates for one cycle and all semester and store them in database, deleting obsolete ones

Parameters
mixedcycle id (string) or array with 'metadate_id' => string cycle id, 'startAfterTimeStamp' => int timestamp to override semester start

Here is the call graph for this function:

Here is the caller graph for this function:

createSingleDatesForSemester (   $metadate_id,
  $sem_begin,
  $sem_end,
  $startAfterTimeStamp,
  $corr 
)

create single dates for one cycle and one semester and store them in database, deleting obsolete ones

Parameters
stringcycle id
inttimestamp of semester start
inttimestamp of semester end
intalternative timestamp to start from
intcorrection calculation, if the semester does not start on monday (number of days?)

Here is the call graph for this function:

delete (   $removeSingleDates = TRUE)
deleteCycle (   $cycle_id)

completey remove cycledate

See Also
CycleData::delete()
Parameters
string$cycle_id
Returns
boolean
deleteSingleDate (   $cycle_id,
  $date_id,
  $filterStart,
  $filterEnd 
)
editCycle (   $data = array())

change existing cycledate, changes also corresponding single dates

Parameters
arrayassoc, see CycleData, metadate_id must be in $data['cycle_id']
Returns
number|boolean

Here is the call graph for this function:

getArt ( )

art is no longer used and always 1

Deprecated:
Returns
number

Here is the caller graph for this function:

getCycleData ( )

returns cycledates as arrays

Returns
array assoc of cycledate data arrays

Here is the caller graph for this function:

getCycles ( )

returns the cycledate objects

Returns
array of CycleData objects
getFirstMetadate ( )

returns first cycledate

Returns
CycleData

Here is the caller graph for this function:

getMetaDataAsArray ( )

returns old style metadata_dates array (more or less)

Deprecated:
Returns
array

Here is the call graph for this function:

getSeminarID ( )

Here is the caller graph for this function:

getSingleDates (   $metadate_id,
  $filterStart = 0,
  $filterEnd = 0 
)

returns an array of SingleDate objects corresponding to the given cycle id use the optional params to specify a timerange

Parameters
stringa cycle id
intunix timestamp
intunix timestamp
Returns
array of SingleDate objects

Here is the call graph for this function:

getStartWoche (   $metadate_id = null)

returns start week (Semesterwoche) for a cycledate for compatibility the first cycledate is chosen if no one is specified

Deprecated:
Parameters
stringid of cycledate
Returns
int

Here is the call graph for this function:

Here is the caller graph for this function:

getTurnus (   $metadate_id = null)

returns the cycle for a cycledate for compatibility the first cycledate is chosen if no one is specified

Deprecated:
Parameters
string$metadate_id
Returns
int 0,1,2 for weekly, biweekly ...

Here is the call graph for this function:

Here is the caller graph for this function:

getVirtualMetaAssignObjects (   $metadate_id,
  $resource_id 
)

returns an array of AssignObjects for one cycle for given room assigns are not stored, used for collision checks before the cycle is stored (for now only in admin_seminare_assi.php)

Parameters
stringid of cycle
stringid of room
Returns
array array of AssignObject

Here is the call graph for this function:

getVirtualSingleDates (   $data)

generate single date objects for one cycle and all semester, existing dates are merged in

Parameters
mixedcycle id (string) or array with 'metadate_id' => string cycle id, 'startAfterTimeStamp' => int timestamp to override semester start
Returns
array array of arrays, for each semester id an array of two arrays of SingleDate objects: 'dates' => all new and surviving dates, 'dates_to_delete' => obsolete dates

Here is the call graph for this function:

Here is the caller graph for this function:

getVirtualSingleDatesForSemester (   $metadate_id,
  $sem_begin,
  $sem_end,
  $startAfterTimeStamp,
  $corr 
)

generate single date objects for one cycle and one semester, existing dates are merged in

Parameters
stringcycle id
inttimestamp of semester start
inttimestamp of semester end
intalternative timestamp to start from
intcorrection calculation, if the semester does not start on monday (number of days?)
Returns
array returns an array of two arrays of SingleDate objects: 'dates' => all new and surviving dates, 'dates_to_delete' => obsolete dates

Here is the call graph for this function:

Here is the caller graph for this function:

hasDates (   $metadate_id,
  $filterStart = 0,
  $filterEnd = 0 
)

returns true if a given cycle has at least one date at all or in the given time range

Parameters
stringcycle id
int$filterStart
int$filterEnd
Returns
bool

Here is the call graph for this function:

MetaDate (   $seminar_id = '')

Constructor

Parameters
string$seminar_id

Here is the call graph for this function:

readSingleDates (   $metadate_id,
  $start = 0,
  $end = 0 
)

reload SingleDate objects for a given cycle id

Parameters
string$metadate_id
int$start
int$end
Returns
bool

Here is the caller graph for this function:

restore ( )

load all cycledates from database

Here is the call graph for this function:

Here is the caller graph for this function:

setCycleData (   $data = array(),
  $cycle 
)

internal method to apply cycledate data from assoc array to a given CycleData object. checks the start and endtime and retruns false if wrong

Deprecated:
Parameters
arrayassoc, see CycleData, metadate_id must be in $data['cycle_id']
CycleData$cycle
Returns
boolean

Here is the caller graph for this function:

setSeminarDurationTime (   $duration)
setSeminarStartTime (   $start)
setStartWoche (   $start_woche,
  $metadate_id = null 
)

sets start week (Semesterwoche) for a cycledate for compatibility the first cycledate is chosen if no one is specified

Deprecated:
Parameters
int$start_woche
string$metadate_id
Returns
null|Ambigous <NULL, unknown>

Here is the call graph for this function:

setTurnus (   $turnus,
  $metadate_id = null 
)

set the cycle for a cycledate for compatibility the first cycledate is chosen if no one is specified

Deprecated:
Parameters
int0,1,2 for weekly, biweekly ...
string$metadate_id
Returns
int

Here is the call graph for this function:

sortCycleData ( )

sort cycledates by sorter column and date

Here is the caller graph for this function:

store ( )

store all changes to cycledates for the course, removed cycles are deleted from database

Returns
int > 0 if changes where made

Here is the call graph for this function:

Here is the caller graph for this function:

unDeleteSingleDate (   $cycle_id,
  $date_id,
  $filterStart,
  $filterEnd 
)

Field Documentation

$cycles = Array()
$seminar_id = ''
$seminarDurationTime = 0
$seminarStartTime = 0

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