Stud.IP  trunk Revision
meine_seminare_func.inc.php File Reference

Functions

 get_group_names ($group_field, $groups)
 
 sort_groups ($group_field, &$groups)
 
 correct_group_sem_number (&$groups, &$my_obj)
 
 add_sem_name (&$my_obj)
 
 fill_groups (&$groups, $group_key, $group_entry)
 
 get_obj_clause ($table_name, $range_field, $count_field, $if_clause, $type=false, $add_fields=false, $add_on=false, $object_field=false, $user_id=NULL, $max_field='chdate')
 
 get_my_obj_values (&$my_obj, $user_id)
 
 getValidGroupingFields ()
 

Function Documentation

◆ add_sem_name()

add_sem_name ( $my_obj)
Parameters
unknown_type$my_obj
Here is the caller graph for this function:

◆ correct_group_sem_number()

correct_group_sem_number ( $groups,
$my_obj 
)
Parameters
unknown_type$groups
unknown_type$my_obj
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_groups()

fill_groups ( $groups,
  $group_key,
  $group_entry 
)
Parameters
unknown_type$groups
unknown_type$group_key
unknown_type$group_entry
Here is the caller graph for this function:

◆ get_group_names()

get_group_names (   $group_field,
  $groups 
)
Parameters
unknown_type$group_field
unknown_type$groups
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_my_obj_values()

get_my_obj_values ( $my_obj,
  $user_id 
)
Parameters
array$my_obj: array of seminare-objects with index of seminar_id
string$user_id
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_obj_clause()

get_obj_clause (   $table_name,
  $range_field,
  $count_field,
  $if_clause,
  $type = false,
  $add_fields = false,
  $add_on = false,
  $object_field = false,
  $user_id = NULL,
  $max_field = 'chdate' 
)

This function generates a query to fetch information like (at least) last modification date (last_modified) number of entries (count) number of new entries (neue) from object_user_visits for a specific module, denoted by $type. You pass a table-name ($table_name), where the entries for the module are stored, the name of the field working as foreign-key ($range_field), the field to count the number of (new) entries ($count_field). The if-clause ($if_clause) is used to check if there are any new entries at all. With $add_fields you can specify some further fields to be fetched in the query With $add_on you can add some conditions to hold when joining object_user_visits. $object_field is the name of field in object_user_visits to join with

Parameters
string$table_namethe name of the db-table where the entries for the module denoted by $type are stored in
string$range_fieldname of the field working as foreign-key, when joining object_user_visits
string$count_fieldfield to count the (new) entries on
string$if_clausean sql-if-clause, used to check if there are any new entries at all
string$type
string$add_fieldssome further fields to be fetched in the query
string$add_onsome further conditions to hold when joining object_user_visits
string$object_fielddefault: my.object_id.
string$user_iddefault: current user, user-id of user the query is built for
string$max_fielddefault: chdate, denotes the field used to find out the last_modified-timestamp
Returns
string the query to operate on objects_user_visits
Here is the caller graph for this function:

◆ getValidGroupingFields()

getValidGroupingFields ( )

This function returns all valid fields that may be used for course grouping in "My Courses".

Returns
array All fields that may be specified for course grouping
Here is the caller graph for this function:

◆ sort_groups()

sort_groups (   $group_field,
$groups 
)
Parameters
unknown_type$group_field
unknown_type$groups
Here is the call graph for this function:
Here is the caller graph for this function: