claroline/claroline/inc/lib/faculty.lib.inc.php File Reference
Go to the source code of this file.
Function Documentation
| addNbChildFather |
( |
$ |
fatherChangeChild, |
|
|
$ |
newNbChild | |
|
) |
| | |
This function add a number of child of all father from a category
- Author:
- < Benoît Muret >
- Parameters:
-
| fatherChangeChild | string : the father |
| newNbChild | int : the number of child adding |
- Returns:
- void
Definition at line 245 of file faculty.lib.inc.php.
| build_select_faculty |
( |
$ |
elem, |
|
|
$ |
father, |
|
|
$ |
editFather, |
|
|
$ |
space | |
|
) |
| | |
This function create de select box categories
- Author:
- Benoît Muret
- Parameters:
-
| $elem | array the categories |
| $father | string the father of the category |
| $editFather | string the category editing |
| $space | string space to the bom of the category |
- Returns:
- void
Definition at line 276 of file faculty.lib.inc.php.
| claro_disp_tree |
( |
$ |
elem, |
|
|
$ |
father, |
|
|
$ |
space | |
|
) |
| | |
This function display the bom whith option to edit or delete the categories
- Author:
- - < Benoît Muret >
- Parameters:
-
| - | elem array : the array of each category |
| - | father string : the father of the category |
- Returns:
- - $out
display the bom whith option to edit or delete the categories
Definition at line 33 of file faculty.lib.inc.php.
| delete_node |
( |
$ |
id_node |
) |
|
| delete_qty_child_father |
( |
$ |
node_code, |
|
|
$ |
childQty | |
|
) |
| | |
Update nb_chils fields in node ascedant a deleted node.
- Parameters:
-
| $node_code | string : the father |
| $childQty | int : the number of child deleting |
- Returns:
- true on success
Definition at line 214 of file faculty.lib.inc.php.
| displaySimpleBom |
( |
$ |
elem, |
|
|
$ |
father, |
|
|
$ |
facultyEdit | |
|
) |
| | |
display the bom of category and display in red the category edit and his childeren in blue
- Author:
- < Benoît Muret >
- Parameters:
-
| elem | array : the categories |
| father | string : the father of a category |
| facultyEdit | key : the category edit |
- Returns:
- void
Definition at line 177 of file faculty.lib.inc.php.
| get_cat_data |
( |
$ |
cat_id |
) |
|
- Parameters:
-
| $cat_id | string code of cat to get data |
- Returns:
- array of data id, name, code, code_P, treePos, nb_childs, canHaveCatChild, canHaveCoursesChild
- Author:
- Christophe Gesché <moosh@claroline.net>
- Since:
- 1.7
Definition at line 308 of file faculty.lib.inc.php.
| get_cat_id_from_code |
( |
$ |
cat_code |
) |
|
- Parameters:
-
| $cat_id | string code of cat to get data |
- Returns:
- array of data id, name, code, code_P, canHaveCatChild, canHaveCoursesChild
- Author:
- Christophe Gesché <moosh@claroline.net>
- Since:
- 1.7
Definition at line 328 of file faculty.lib.inc.php.
THEORIC FUNCTION TO COMPUTE NB_CHILDS
- Parameters:
-
- Returns:
- Author:
- Christophe Gesché <moosh@claroline.net>
- Since:
- 1.7
function cat_count_descendance($node_code) { global $nodeList; foreach ($nodeList as $node) $child_count = $node['code_P'] == $node_code ? cat_count_descendance($node['code']) : 0;
return $child_count +1; } Return minimum and the maximum value for treePos
- Returns:
- minimum and the maximum value for treePos
- Author:
- Christophe Gesché <moosh@claroline.net>
- Since:
- 1.7
Definition at line 365 of file faculty.lib.inc.php.
| get_node_children_count |
( |
$ |
node |
) |
|
| get_node_children_count_course |
( |
$ |
node |
) |
|
| get_node_descendance_count |
( |
$ |
node |
) |
|
Get the last treePos of the table faculty
- Returns:
- biggest treePos
- Since:
- 1.5
Definition at line 382 of file faculty.lib.inc.php.