Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
admission.inc.php File Reference

Namespaces

namespace  studip_core

Functions

 insert_seminar_user ($seminar_id, $user_id, $status, $copy_studycourse=false, $consider_contingent=false)
 removeScheduleEntriesMarkedAsVirtual ($user_id, $seminar_id)
 get_all_quota ($seminar_id)
 get_free_admission ($seminar_id)
 renumber_admission ($seminar_id, $send_message=TRUE)
 check_group ($user_id, $username, $grouped_sems, $cur_name, $cur_id)
 group_update_admission ($seminar_id, $send_message=TRUE)
 update_admission ($seminar_id, $send_message=TRUE)
 normal_update_admission ($seminar_id, $send_message=TRUE)
 check_admission ($send_message=TRUE)
 admission_seminar_user_insert ($user_id, $seminar_id, $status, $studiengang_id= '', $comment= '')
 admission_seminar_user_get_position ($user_id, $seminar_id)
 get_readable_admission_difference ($aado, $aad)
 get_admission_description ($type, $value)

Function Documentation

admission_seminar_user_get_position (   $user_id,
  $seminar_id 
)

returns the position for a user on a waiting list

if the user is not found false is returned, return true if the user is found but no position is available

Parameters
stringuser_id
stringseminar_id
Returns
integer position in waiting list or false if not found

Here is the call graph for this function:

Here is the caller graph for this function:

admission_seminar_user_insert (   $user_id,
  $seminar_id,
  $status,
  $studiengang_id = '',
  $comment = '' 
)

sets a user on a waiting list for a registration procedure

if applicable ($status == 'awaiting') returns the position

Parameters
stringuser_id
stringseminar_id
stringstatus 'claiming','awaiting','accepted'
stringstudiengang_id
stringcomment
Returns
integer position on waiting list

Here is the call graph for this function:

Here is the caller graph for this function:

check_admission (   $send_message = TRUE)

This function checks, if an admission procedure has to start

The function will start a fortune procedure and ends the allocations. It will check ALL seminars in the admission system, but it do not much if there are no seminars to handle.

Parameters
booleansend_message should a system-message be send?

Here is the call graph for this function:

check_group (   $user_id,
  $username,
  $grouped_sems,
  $cur_name,
  $cur_id 
)

Here is the call graph for this function:

Here is the caller graph for this function:

get_admission_description (   $type,
  $value 
)

this function returns a readable representation of the following admission_data:

  • admission_type
  • read_level
  • write_level
Parameters
string$typeone of the possible fields to get the string representation for
mixed$valuethe value for the value
Returns
string string representation of $value

Here is the caller graph for this function:

get_all_quota (   $seminar_id)

This function calculate the remaining places for the "alle"-allocation

The function calculate the remaining places for the "alle"-allocation. It considers the places in the other allocations to avoid rounding errors

Parameters
stringseminar_id the seminar_id of the seminar to calculate
Returns
integer

Here is the call graph for this function:

get_free_admission (   $seminar_id)

This function calculate the remaining places for the complete seminar

This function calculate the remaining places for the complete seminar. It considers all the allocations and it avoids rounding errors

Parameters
stringseminar_id the seminar_id of the seminar to calculate
Returns
integer

Here is the call graph for this function:

get_readable_admission_difference (   $aado,
  $aad 
)

this function returns a string representation of the differences between two admission_data-arrays

Parameters
mixed$aadothe array holding the original data
mixed$aadothe array holding the changed data
Returns
mixed an array holding each change in its string representation

Here is the call graph for this function:

group_update_admission (   $seminar_id,
  $send_message = TRUE 
)

Here is the call graph for this function:

Here is the caller graph for this function:

insert_seminar_user (   $seminar_id,
  $user_id,
  $status,
  $copy_studycourse = false,
  $consider_contingent = false 
)

This function inserts an user into the seminar_user and does consitency checks with admission_seminar_user

Please use this functions always to insert user to a seminar. Returns true, if user was on the admission_seminar_user

Parameters
stringseminar_id the seminar_id of the seminar to calculate
stringuser_id the user_id
stringstatus the perms the user should archive
booleancopy_studycourse should the entry for studycourse from admission_seminar_user into seminar user be copied?
Returns
boolean

Here is the call graph for this function:

Here is the caller graph for this function:

normal_update_admission (   $seminar_id,
  $send_message = TRUE 
)

This function updates an admission procedure

The function checks, if user could be insert to the seminar. The User gets a message, if he is inserted to the seminar

Parameters
stringseminar_id the seminar_id of the seminar to calculate
booleansend_message should a system-message be send?

Here is the call graph for this function:

Here is the caller graph for this function:

removeScheduleEntriesMarkedAsVirtual (   $user_id,
  $seminar_id 
)

Removes entries marked in the schedule as virtual. This function serves the following scenario: If a user first added the dates of one seminar to his or her schedule and later did participate in the seminar then the previously as 'virtual' added dates should be removed with this function.

Parameters
$user_idthe id of the user the schedule belongs to
$seminar_idthe id of the seminar the schedule belongs to

Here is the call graph for this function:

Here is the caller graph for this function:

renumber_admission (   $seminar_id,
  $send_message = TRUE 
)

This function numbers a waiting list

Use this functions, if a person was moved from the waiting list or there were other changes to the waiting list. The User gets a message, if the parameter is set and the position on the waiting list has changed.

Parameters
stringseminar_id the seminar_id of the seminar to calculate
booleansend_message should a system-message be send?

Here is the call graph for this function:

Here is the caller graph for this function:

update_admission (   $seminar_id,
  $send_message = TRUE 
)

Here is the call graph for this function:

Here is the caller graph for this function: