claroline/claroline/inc/lib/init.lib.php File Reference
Go to the source code of this file.
Function Documentation
Get the context from where the page is called e.g.: if a tool is called from another tool
- Returns:
- mixed tlabel or false if not called from a specific tool or whatever
Definition at line 666 of file init.lib.php.
| claro_get_course_user_data |
( |
$ |
cid, |
|
|
$ |
uid, |
|
|
$ |
ignoreCache = false | |
|
) |
| | |
6° read data in DB
Fetch datas of the given user in the given course
- Parameters:
-
| string | $cid course id |
| integer | $uid user id |
| bool | $ignoreCache true to for read in database instead of cache |
- Returns:
- array('role')
- Author:
- Christophe Gesché <moosh@claroline.net>
Definition at line 558 of file init.lib.php.
| claro_get_course_user_privilege |
( |
$ |
cid, |
|
|
$ |
uid, |
|
|
$ |
ignoreCache = false | |
|
) |
| | |
Fetch privileges of the given user in the given course
- Parameters:
-
| string | $cid course id |
| integer | $uid user id |
| bool | $ignoreCache true to for read in database instead of cache |
- Returns:
- array('_profileId','is_courseMember','is_courseTutor','is_courseAdmin')
- Author:
- Christophe Gesché <moosh@claroline.net>
Definition at line 574 of file init.lib.php.
| claro_get_course_user_properties |
( |
$ |
cid, |
|
|
$ |
uid, |
|
|
$ |
ignoreCache = false | |
|
) |
| | |
Fetch data and privileges of the given user in the given course
U don't have enough of this function use claro_get_course_user_data($cid,$uid,$ignoreCache=false) or claro_get_course_user_privilege($cid,$uid,$ignoreCache=false)
- Parameters:
-
| string | $cid course id |
| integer | $uid user id |
| bool | $ignoreCache true to for read in database instead of cache |
- Returns:
- array(data( array('role')), 'privilege'(array('_profileId','is_courseMember','is_courseTutor','is_courseAdmin')))
- See also:
- claro_get_course_user_data($cid,$uid,$ignoreCache=false)
-
claro_get_course_user_privilege($cid,$uid,$ignoreCache=false)
- Author:
- Christophe Gesché <moosh@claroline.net>
Definition at line 598 of file init.lib.php.
| claro_get_current_course_data |
( |
$ |
dataName = null |
) |
|
3° Get Values/properties
Return the value of a Claroline configuration parameter
- Parameters:
-
| string | $param config parameter |
| mixed | $default (optionnal) - set a defaut to return value if no paramater with such a name is found. |
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- string param value
- Todo:
- http://www.claroline.net/forum/viewtopic.php?t=4579
Return data of the current course
- Parameters:
-
| string | or null $dataName name of field, or null to keep an array of all fields |
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- string or array of string
Definition at line 191 of file init.lib.php.
| claro_get_current_course_id |
( |
|
) |
|
| claro_get_current_course_tool_data |
( |
$ |
dataName = null |
) |
|
Return properties for the current tool
- Parameters:
-
| string | or null $dataName property name, or null to keep an array of all properties |
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- array of all value or value of given property name
Definition at line 297 of file init.lib.php.
| claro_get_current_course_tool_list_data |
( |
$ |
dataName = null |
) |
|
Return tool listbfor the current course
- Parameters:
-
| string | or null $dataName property name, or null to keep an array of all properties |
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- array of all value or value of given property name
Definition at line 317 of file init.lib.php.
| claro_get_current_course_user_data |
( |
$ |
dataName = null |
) |
|
Return properties for the current user in the current course
- Parameters:
-
| string | or null $dataName property name, or null to keep an array of all properties |
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- array of all value or value of given property name
Definition at line 273 of file init.lib.php.
| claro_get_current_group_data |
( |
$ |
dataName = null |
) |
|
Return properties for the current group
- Parameters:
-
| string | or null $dataName property name, or null to keep an array of all properties |
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- array of all value or value of given property name
Definition at line 252 of file init.lib.php.
| claro_get_current_group_id |
( |
|
) |
|
| claro_get_current_group_properties_data |
( |
$ |
dataName = null |
) |
|
Return group properties for the current course
- Parameters:
-
| string | or null $dataName property name, or null to keep an array of all properties |
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- array of all value or value of given property name
Definition at line 210 of file init.lib.php.
| claro_get_current_tool_id |
( |
|
) |
|
| claro_get_current_user_data |
( |
$ |
dataName = null |
) |
|
Return data of the current user
- Parameters:
-
| string | or null $dataName name of field, or null to keep an array of all fields |
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- string or array of string
Definition at line 233 of file init.lib.php.
| claro_get_current_user_id |
( |
|
) |
|
| claro_get_current_user_profile_id_in_course |
( |
$ |
courseId = null |
) |
|
Get the profile id of the current user in a given course
- Parameters:
-
| string | $courseId id (sysCode) of the course |
- Returns:
- int id of the current user's profile in the course
Definition at line 650 of file init.lib.php.
| claro_is_allowed_to_create_course |
( |
|
) |
|
| claro_is_course_admin |
( |
|
) |
|
| claro_is_course_allowed |
( |
|
) |
|
| claro_is_course_enable |
( |
|
) |
|
Return if course status is enable
Definition at line 674 of file init.lib.php.
| claro_is_course_manager |
( |
|
) |
|
| claro_is_course_member |
( |
|
) |
|
| claro_is_course_tutor |
( |
|
) |
|
| claro_is_group_allowed |
( |
|
) |
|
| claro_is_group_member |
( |
|
) |
|
| claro_is_module_allowed |
( |
|
) |
|
| claro_is_platform_admin |
( |
|
) |
|
| claro_is_tool_allowed |
( |
|
) |
|
| claro_is_user_authenticated |
( |
|
) |
|
1° Is in the context
GET VALUES FROM INIT 5 types of values/Function 1° Is in the context 2° Get ID 3° Get Values/properties 4° Get right 5° get_init : generic function to prepare 4st previous during developpement 6° read data in DB Return the init status
- Author:
- Christophe Gesché <moosh@claroline.net>
- Returns:
- boolean
Definition at line 40 of file init.lib.php.
| clear_current_module_label |
( |
|
) |
|
Unset the current module label at run time (Warning : does not alter tlabelReq or _courseTool)
- Parameters:
-
| string | label module label |
- Returns:
- string old label or false if no old label defined
Definition at line 167 of file init.lib.php.
| get_current_module_label |
( |
|
) |
|
Returns the label of the current tool module FIXME: non-course module hack FIXME: applet module hack FIXME: switch tlbelReq and _courseTool lookup ?
- Returns:
- string module label boolean false if no module currently in use or not in a tool module
Definition at line 140 of file init.lib.php.
| set_current_module_label |
( |
$ |
label |
) |
|
Set the current module label at run time
- Parameters:
-
| string | label module label |
- Returns:
- string old label boolean false if no old label defined FIXME : use it in docks and kernel
Definition at line 152 of file init.lib.php.