claroline/claroline/inc/lib/faculty.lib.inc.php File Reference

Go to the source code of this file.

Namespaces

namespace  CLTREE

Functions

 claro_disp_tree ($elem, $father, $space)
 displaySimpleBom ($elem, $father, $facultyEdit)
 delete_qty_child_father ($node_code, $childQty)
 addNbChildFather ($fatherChangeChild, $newNbChild)
 build_select_faculty ($elem, $father, $editFather, $space)
 get_cat_data ($cat_id)
 get_cat_id_from_code ($cat_code)
 get_extremesTreePos ()
 search_max_tree_pos ()
 get_node_children_count ($node)
 get_node_descendance_count ($node)
 get_node_children_count_course ($node)
 delete_node ($id_node)
 analyseCat ($catCode)
 countChild ($catCode)
 repairTree ()

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.

analyseCat ( catCode  ) 

make 6 test on the given category and and return the status

Parameters:
$cat_Code 
Returns:
boolean tree status
Author:
Christophe Gesché <moosh@claroline.net>

Definition at line 497 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.

countChild ( catCode  ) 

Definition at line 522 of file faculty.lib.inc.php.

delete_node ( id_node  ) 
Parameters:
$id_node 
Returns:
Author:
Christophe Gesché <moosh@claroline.net>

Definition at line 467 of file faculty.lib.inc.php.

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.

get_extremesTreePos (  ) 

THEORIC FUNCTION TO COMPUTE NB_CHILDS

Parameters:
$node_code 
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  ) 
Parameters:
$node 
Returns:
Author:
Christophe Gesché <moosh@claroline.net>

Definition at line 395 of file faculty.lib.inc.php.

get_node_children_count_course ( node  ) 
Parameters:
$node 
Returns:
Author:
Christophe Gesché <moosh@claroline.net>

Definition at line 448 of file faculty.lib.inc.php.

get_node_descendance_count ( node  ) 
Parameters:
$node 
Returns:
Author:
Christophe Gesché <moosh@claroline.net>

Definition at line 422 of file faculty.lib.inc.php.

repairTree (  ) 

Definition at line 535 of file faculty.lib.inc.php.

search_max_tree_pos (  ) 

Get the last treePos of the table faculty

Returns:
biggest treePos
Since:
1.5

Definition at line 382 of file faculty.lib.inc.php.

Generated on Tue Jun 8 12:28:37 2010 for Claroline API by  doxygen 1.6.3