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

Go to the source code of this file.

Functions

 class_get_properties ($classId)
 class_create ($className, $parentId)
 class_set_properties ($classId, $className, $parentId=0)
 delete_class ($class_id)
 move_class ($class_id, $class_id_towards)
 register_class_to_course ($class_id, $course_code)
 unregister_class_to_course ($class_id, $course_code)
 user_add_to_class ($user_id, $class_id)
 user_remove_to_class ($user_id, $class_id)
 class_remove_all_users ($classId)
 display_tree_class_in_admin ($class_list, $parent_class=null, $deep=0)
 get_class_user_number ($class_id)
 get_class_cours_number ($class_id)
 display_tree_class_in_user ($class_list, $course_code, $parent_class=null, $deep=0)
 displaySelectBox ($selected=null, $space="   ")
 buildSelectClass ($classes, $selected, $father=null, $space="   ")
 getSubClasses ($class_id)
 get_class_list_by_course ($courseId)
 get_class_list_of_course ($courseId)
 get_class_list_user_id_list ($classId)

Function Documentation

buildSelectClass ( classes,
selected,
father = null,
space = "   " 
)

This function create the list for the select box to choose the parent class

Author:
Guillaume Lederer
Parameters:
tab containing at least all the classes with their id, parent_id and name
parent_id of the class we want to display the children of
the pre-selected class'id in the select box
space to display for children to show deepness
Returns:
string to output

Definition at line 1051 of file class.lib.php.

class_create ( className,
parentId 
)

Add a new class

Parameters:
$className 
$parentId 

Definition at line 51 of file class.lib.php.

class_get_properties ( classId  ) 

CLAROLINE

Library for class

Version:
1.9
Revision
12261

2001-2008 Universite catholique de Louvain (UCL)c http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE

Author:
Claro Team <cvs@claroline.net>
Guillaume Lederer <guillaume@claroline.net>
Since:
1.6 Get class data on the platform
Parameters:
integer $classId
Returns:
array( `id`, `name`, `class_parent_id`, `class_level`)

Definition at line 26 of file class.lib.php.

class_remove_all_users ( classId  ) 

unsubscribe all users of the class

Author:
damien Garros <dgarros@univ-catholyon.fr>
Parameters:
int $class_id course code from the class table
Returns:
boolean TRUE if subscribtion succeed boolean FALSE otherwise.

Definition at line 683 of file class.lib.php.

class_set_properties ( classId,
className,
parentId = 0 
)

Update class data

Parameters:
$classId integer
$className string
$parentId integer

Definition at line 76 of file class.lib.php.

delete_class ( class_id  ) 

This function delete a class and all this trace

Author:
Damien Garros <dgarros@univ-catholyon.fr>
Parameters:
int class_id
Returns:
true if everything is good or an error string

Definition at line 106 of file class.lib.php.

display_tree_class_in_admin ( class_list,
parent_class = null,
deep = 0 
)

Display the tree of classes

Parameters:
unknown_type $class_list list of all the classes informations of the platform
unknown_type $parent_class
unknown_type $deep
Returns:
unknown

Definition at line 712 of file class.lib.php.

display_tree_class_in_user ( class_list,
course_code,
parent_class = null,
deep = 0 
)

Display the tree of classes

Author:
Guillaume Lederer
Parameters:
list of all the classes informations of the platform
list of the classes that must be visible
Returns:
See also:

Definition at line 905 of file class.lib.php.

displaySelectBox ( selected = null,
space = "&nbsp;&nbsp;&nbsp;" 
)

This function create the select box to choose the parent class

Parameters:
the pre-selected class'id in the select box
space to display for children to show deepness $tbl_class get_lang('TopLevel')
Returns:
void

Definition at line 1023 of file class.lib.php.

get_class_cours_number ( class_id  ) 

Get the number of cours link with class

Author:
Damien Garros <dgarros@univ-catholyon.fr>
Parameters:
id of the class from which we want to know the number of cours
Returns:
(int) number of cours in this class

Definition at line 875 of file class.lib.php.

get_class_list_by_course ( courseId  ) 

return list of class subscribed to a given course.

Parameters:
string $courseId
Since:
1.8.1
Returns:
array(`id`,`name`,`class_parent_id`,`course_id`)

Definition at line 1117 of file class.lib.php.

get_class_list_of_course ( courseId  ) 

return list of class subscribed to a given course. similar to get_class_list_by_course($courseId) except that this function return only the enrolled class to the course

Parameters:
string $courseId
Since:
1.9.1
Returns:
array(`id`,`name`,`class_parent_id`)

Definition at line 1143 of file class.lib.php.

get_class_list_user_id_list ( classId  ) 

return list of user_id of the users enrolled in a class.

Parameters:
string $classId
Since:
1.9.1

Definition at line 1166 of file class.lib.php.

get_class_user_number ( class_id  ) 

Get the number of users in a class, including sublclasses

Author:
Guillaume Lederer
Parameters:
id of the (parent) class ffrom which we want to know the number of users
Returns:
(int) number of users in this class and its subclasses

Definition at line 833 of file class.lib.php.

getSubClasses ( class_id  ) 

return subClass of a given class

Parameters:
unknown_type $class_id
Returns:
unknown
Since:
1.8.0

Definition at line 1083 of file class.lib.php.

move_class ( class_id,
class_id_towards 
)

This function move a class in the class tree

Author:
Damien Garros <dgarros@univ-catholyon.fr>
Parameters:
int class_id , id of the class what you want to move
int class_id_towards, id of the parent destination class
Returns:
true if everything is good or an error string

Definition at line 201 of file class.lib.php.

register_class_to_course ( class_id,
course_code 
)

Enter description here...

Parameters:
integer $class_id
string $course_code
Returns:
unknown

Definition at line 276 of file class.lib.php.

unregister_class_to_course ( class_id,
course_code 
)

unregister a class to course

Author:
Damien Garros <dgarros@univ-catholyon.fr>
Parameters:
int class_id
string course_code
Returns:
a string of log

Definition at line 398 of file class.lib.php.

user_add_to_class ( user_id,
class_id 
)

subscribe a specific user to a class

Author:
Guillaume Lederer < guillaume@claroline.net >
Parameters:
int $user_id user ID from the course_user table
int $class_id class id from the class table
Returns:
boolean TRUE if subscribtion succeed boolean FALSE otherwise.

Definition at line 485 of file class.lib.php.

user_remove_to_class ( user_id,
class_id 
)

unsubscribe a specific user to a class

Author:
damien Garros <dgarros@univ-catholyon.fr>
Parameters:
int $user_id user ID from the course_user table
int $class_id course code from the class table
Returns:
boolean TRUE if subscribtion succeed boolean FALSE otherwise.

Definition at line 575 of file class.lib.php.

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