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

Go to the source code of this file.

Namespaces

namespace  CLUSR

Functions

 claro_user_info_create_cat_def ($title='', $comment='', $nbline='5', $course_id=NULL)
 claro_user_info_edit_cat_def ($id, $title, $comment, $nbline, $course_id=NULL)
 claro_user_info_remove_cat_def ($id, $force=false, $course_id=NULL)
 claro_user_info_move_cat_rank ($id, $direction, $course_id=NULL)
 claro_user_info_move_cat_rank_by_rank ($rank, $direction, $course_id=NULL)
 claro_user_info_fill_new_cat_content ($def_id, $user_id, $content="", $user_ip="", $course_id=NULL)
 claro_user_info_edit_cat_content ($def_id, $user_id, $content="", $user_ip="", $course_id=NULL)
 claro_user_info_cleanout_cat_content ($user_id, $def_id, $course_id=NULL)
 claro_user_info_get_course_user_info ($user_id, $course_id=NULL)
 claro_user_info_get_cat_content ($userId, $catId, $course_id=NULL)
 claro_user_info_get_cat_def ($catId, $course_id=NULL)
 claro_user_info_claro_user_info_get_cat_def_list ($course_id=NULL)

Function Documentation

claro_user_info_claro_user_info_get_cat_def_list ( course_id = NULL  ) 

Get list of all user properties for this course

Parameters:
string $course_id coude code of course
Returns:
array containing a list of arrays. And each of these arrays contains 'catId', 'title', 'comment', and 'nbline',

Definition at line 477 of file user_info.lib.php.

claro_user_info_cleanout_cat_content ( user_id,
def_id,
course_id = NULL 
)

clean the content of a bloc for information category

Parameters:
integer $def_id
integer $user_id
Returns:
boolean true if succeed, else bolean false

Definition at line 360 of file user_info.lib.php.

claro_user_info_create_cat_def ( title = '',
comment = '',
nbline = '5',
course_id = NULL 
)

create a new category definition for the user information

Parameters:
string $title - category title
string $comment - title comment
int $nbline - lines number for the field the user will fill.
Returns:
boolean TRUE if succeed, else boolean FALSE

Definition at line 36 of file user_info.lib.php.

claro_user_info_edit_cat_content ( def_id,
user_id,
content = "",
user_ip = "",
course_id = NULL 
)

edit a bloc for information category

Parameters:
integer $def_id,
integer $user_id,
string $user_ip, DEFAULT $REMOTE_ADDR
string $content ; if empty call delete the bloc
Returns:
boolean true if succeed, else bolean false

Definition at line 317 of file user_info.lib.php.

claro_user_info_edit_cat_def ( id,
title,
comment,
nbline,
course_id = NULL 
)

modify the definition of a user information category

Parameters:
integer $id - id of the category
string $title - category title
string $comment - title comment
integer $nbline - lines number for the field the user will fill.
Returns:
boolean true if succeed, else otherwise

Definition at line 77 of file user_info.lib.php.

claro_user_info_fill_new_cat_content ( def_id,
user_id,
content = "",
user_ip = "",
course_id = NULL 
)

fill a bloc for information category

Parameters:
integer $def_id
integer $user_id,
sting $user_ip,
string $content
Returns:
boolean true if succeed, else bolean false

Definition at line 261 of file user_info.lib.php.

claro_user_info_get_cat_content ( userId,
catId,
course_id = NULL 
)

get the user content of a categories plus the categories definition

Parameters:
integer $userId id of the user
integer $catId id of the categories
Returns:
array containing 'catId', 'title', 'comment', 'nbline', 'contentId' and 'content'

Definition at line 424 of file user_info.lib.php.

claro_user_info_get_cat_def ( catId,
course_id = NULL 
)

get the definition of a category

Parameters:
int $catId - id of the categories
Returns:
array containing 'id', 'title', 'comment', and 'nbline',

Definition at line 453 of file user_info.lib.php.

claro_user_info_get_course_user_info ( user_id,
course_id = NULL 
)

get the user info from the user id

Parameters:
int $user_id user id as stored in the claroline main db
Returns:
array containg user info sort by categories rank each rank contains 'title', 'comment', 'content', 'cat_id'

Definition at line 394 of file user_info.lib.php.

claro_user_info_move_cat_rank ( id,
direction,
course_id = NULL 
)

Move a category in the category list

Parameters:
int $id - id of the category
direction "up" or "down" : "up" decrease the rank of gived $id by switching rank with the just lower "down" increase the rank of gived $id by switching rank with the just upper
Returns:
- boolean true if succeed, else bolean false

Definition at line 159 of file user_info.lib.php.

claro_user_info_move_cat_rank_by_rank ( rank,
direction,
course_id = NULL 
)

move a category in the category list

Parameters:
int $rank - actual rank of the category
direction "up" or "down" : "up" decrease the rank of gived $rank by switching rank with the just lower "down" increase the rank of gived $rank by switching rank with the just upper
Returns:
- boolean true if succeed, else bolean false

Definition at line 196 of file user_info.lib.php.

claro_user_info_remove_cat_def ( id,
force = false,
course_id = NULL 
)

remove a category from the category list

Parameters:
int $id - id of the category or "ALL" for all category
boolean $force - FALSE (default) : prevents removal if users have already fill this category TRUE : bypass user content existence check
int $nbline - lines number for the field the user will fill.
Returns:
bollean - TRUE if succeed, ELSE otherwise

Definition at line 114 of file user_info.lib.php.

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