Go to the source code of this file.
| claro_date | ( | $ | format, | |
| $ | timestamp = -1 | |||
| ) |
Compose currentdate with server time shift
| string | $format date() format | |
| integer | $timestamp timestamp or default -1 for "now()" |
Definition at line 1148 of file claro_main.lib.php.
| claro_debug_mode | ( | ) |
Definition at line 1659 of file claro_main.lib.php.
| claro_die | ( | $ | message | ) |
SECTION : security Terminate the script and display message
| string | message |
Definition at line 1340 of file claro_main.lib.php.
| claro_disp_debug_banner | ( | ) |
Get (and not display !) the debug banner html code
Definition at line 1589 of file claro_main.lib.php.
| claro_disp_tool_view_option | ( | $ | viewModeRequested = false |
) |
Display options to switch between student view and course manager view This function is mainly used by the claro_init_banner.inc.php file The display mode command will only be displayed if claro_set_tool_view_mode(true) has been previously called. This will affect the return value of claro_is_allowed_to_edit() function. It will ten return false as the user is a simple student.
| string | - $viewModeRequested. For now it can be 'STUDENT' or 'COURSE_ADMIN' |
Definition at line 940 of file claro_main.lib.php.
| claro_enable_tool_view_option | ( | ) |
SECTION : "view AS" Set if the access level switcher is aivailable
boolean claro_toolViewOptionEnabled
Definition at line 887 of file claro_main.lib.php.
| claro_form_relay_context | ( | $ | context = null |
) |
Generate some informations in HTML format over the execution context.
Informations are placed into hidden inputs.
Definition at line 1523 of file claro_main.lib.php.
| claro_get_conf_repository | ( | $ | context = array() |
) |
Return the config ropisitory for a given context
All platform config are stored in platform/conf/ But a course or a group can overide some config values
This function return the repository ignoring if it's existing or empty
| array | $context |
Definition at line 1277 of file claro_main.lib.php.
| claro_get_course_data | ( | $ | courseId = NULL, |
|
| $ | force = false | |||
| ) |
SECTION : Function to access the sql datas SECTION : Class & function to prepare a normalised html output. SECTION : Class & function to prepare a normalised html output. SECTION : File handling functions SECTION : PHP COMPAT For PHP backward compatibility SECTION : Class & function to prepare a normalised html output. SECTION : Class & function to get text zone contents. SECTION : Modules functions SECTION : Icon functions depends on module.lib.php SECTION : Get kernel SUBSECTION datas for courses Get unique keys of a course.
| string | $courseId (optionnal) If not set, it use the current course will be taken. |
Definition at line 89 of file claro_main.lib.php.
| claro_get_course_db_name | ( | $ | cid = NULL |
) |
Get the db name of a course.
| string | $course_id (optionnal) If not set, it use the current course will be taken. |
Definition at line 248 of file claro_main.lib.php.
| claro_get_course_db_name_glued | ( | $ | cid = NULL |
) |
Get the glued db name of a course. Ready to be use in claro_get_course_table_name.
| string | $course_id (optionnal) If not set, it use the current course will be taken. |
Definition at line 265 of file claro_main.lib.php.
| claro_get_course_external_link_list | ( | $ | courseIdReq = null, |
|
| $ | force = false | |||
| ) |
Return the tool list for a course according a certain access level
| boolean | $force (optionnal) - reset the result cache, default is false |
Definition at line 664 of file claro_main.lib.php.
| claro_get_course_group_path | ( | $ | context | ) |
Definition at line 366 of file claro_main.lib.php.
| claro_get_course_path | ( | $ | cid = NULL |
) |
Get the path of a course.
| string | $course_id (optionnal) If not set, it use the current course will be taken. |
Definition at line 281 of file claro_main.lib.php.
| claro_get_course_tool_list | ( | $ | courseIdReq, | |
| $ | profileIdReq, | |||
| $ | force = false, |
|||
| $ | active = true, |
|||
| $ | courseActive = true | |||
| ) |
Return the tool list for a course according a certain access level
| string | $courseIdReq - the requested course id | |
| boolean | $force (optionnal) - reset the result cache, default is false | |
| boolean | $active (optionnal) - get the list of active tool only if set to true (default behaviour) | |
| mixed | $courseActive (optional) - set to true (default behaviour) to get only activated course tools, set to false to get all course tools |
Definition at line 556 of file claro_main.lib.php.
| claro_get_current_context | ( | $ | contextKeys = null |
) |
| $contextKeys | array or null |
array can contain course, group, user and/or toolInstance
return array of context requested containing current id fors these context.
Definition at line 1429 of file claro_main.lib.php.
| claro_get_group_data | ( | $ | context, | |
| $ | force = false | |||
| ) |
SECTION : Get kernel SUBSECTION datas for groups Get unique keys of a course.
| string | $course_id (optionnal) If not set, it use the current course will be taken. |
Definition at line 303 of file claro_main.lib.php.
| claro_get_language_list | ( | ) |
get the list of aivailable languages on the platform
Definition at line 1233 of file claro_main.lib.php.
| claro_get_main_course_tool_list | ( | $ | force = false |
) |
SECTION : Get kernel SUBSECTION datas for rel tool courses Return the list of tool installed on the platform
| boolean | $force (optionnal) - reset the result cache, default is false |
Definition at line 473 of file claro_main.lib.php.
| claro_get_main_group_properties | ( | $ | courseId | ) |
This function return properties for groups in a given course context.
| string | $courseId sysCode of the course. |
The 4th first properties are course properties dedicated to groups as default value. The 'tool' array is like course.tool_list.
Definition at line 197 of file claro_main.lib.php.
| claro_get_module_name | ( | $ | identifier | ) |
Return the name of a given module
| mixed | $identifier interger for a module id string for a claro label |
Definition at line 732 of file claro_main.lib.php.
| claro_get_module_name_list | ( | $ | active = true |
) |
Get a list of tag names of some tools This is a bad named function because they return only tool type modules
Returned tagname is the "Developpers english name" this tag would be passed to get_lang
| boolean | $active true filter to keep only tools activated in platform |
Definition at line 403 of file claro_main.lib.php.
| claro_get_tool_id_from_course_tid | ( | $ | tid, | |
| $ | courseId = null, |
|||
| $ | profileId = null | |||
| ) |
Get the main tool_id for a given course tool from its tid in the course
| int | $tid id of the tool instance in the course | |
| string | $courseId id (sysCode) of the course (optional, current course used if missing) | |
| int | $profileId profile of the user to get the tool list from (optional, current user used if missing) |
Definition at line 1699 of file claro_main.lib.php.
| claro_get_tool_name | ( | $ | identifier | ) |
Get the name of a tool
| string | identifier is tool_id or tool_label |
Definition at line 719 of file claro_main.lib.php.
| claro_get_tool_name_list | ( | ) |
SECTION : Get kernel SUBSECTION datas for tools Get names of tools in an array where key are Claro_label
Definition at line 389 of file claro_main.lib.php.
| claro_get_tool_view_mode | ( | ) |
return the current mode in tool able to handle different view mode
Definition at line 1049 of file claro_main.lib.php.
| claro_get_user_tool_list | ( | $ | activeOnly = true |
) |
Return the list of tools for a user
in 1.8 only CLCAL are both course tool and user tool. ie : profile is'nt view as module, and other course tool can't work outside a course for a user.
| boolean | $activeOnly default true |
Definition at line 1481 of file claro_main.lib.php.
| claro_html_tool_view_option | ( | $ | viewModeRequested = false |
) |
Definition at line 951 of file claro_main.lib.php.
| claro_is_allowed_to_edit | ( | ) |
Function that removes the need to directly use is_courseAdmin global in tool scripts. It returns true or false depending on the user's rights in this particular course.
Definition at line 1081 of file claro_main.lib.php.
| claro_is_course_tool_activated | ( | $ | courseId, | |
| $ | toolId | |||
| ) |
Is the given tool activated in the given course
| string | $courseId course code | |
| string | $toolId tool id in the course, not the main tool id ! |
Definition at line 1671 of file claro_main.lib.php.
| claro_is_display_mode_available | ( | ) |
Definition at line 1116 of file claro_main.lib.php.
| claro_is_javascript_enabled | ( | ) |
checks if the javascript is enabled on the client browser Actually a cookies is set on the header by a javascript code. If this cookie isn't set, it means javascript isn't enabled.
Definition at line 1210 of file claro_main.lib.php.
| claro_mktime | ( | ) |
Equivalent to mktime but taking the mainTimeShift into account
Usage : claro_mktime ( [int hour [, int minute [, int second [, int month [ , int day [, int year [, int is_dst]]]]]]] )
Definition at line 1181 of file claro_main.lib.php.
| claro_redirect | ( | $ | location | ) |
Safe redirect Works around IIS Bug
Definition at line 1499 of file claro_main.lib.php.
| claro_set_display_mode_available | ( | $ | mode | ) |
| boolean | $mode state to set in mode |
Definition at line 1131 of file claro_main.lib.php.
| claro_set_tool_view_mode | ( | $ | viewMode | ) |
Set if the access level switcher is aivailable
| $viewMode | 'STUDENT' or 'COURSE_ADMIN' |
Definition at line 904 of file claro_main.lib.php.
| claro_time | ( | ) |
Compose currentdate with server time shift
Definition at line 1163 of file claro_main.lib.php.
| claro_unquote_gpc | ( | ) |
Strip the slashes coming from browser request
If the php.ini setting MAGIC_QUOTE_GPC is set to ON, all the variables content comming frome the browser are automatically quoted by adding slashes (default setting before PHP 4.3). claro_unquote_gpc() removes these slashes. It needs to be called just once at the biginning of the script.
Definition at line 1380 of file claro_main.lib.php.
| claro_url_relay_context | ( | $ | prepend = '', |
|
| $ | context = null | |||
| ) |
Get the string needed to relay the current context in urls
| string | $prepend string to prepend to the relayed context | |
| array | $context |
Definition at line 1560 of file claro_main.lib.php.
| get_conf | ( | $ | param, | |
| $ | default = null | |||
| ) |
Return the value of a Claroline configuration parameter
| string | $param config parameter | |
| mixed | $default (optionnal) - set a defaut to return value if no paramater with such a name is found. |
Definition at line 1307 of file claro_main.lib.php.
| getClaroMessageList | ( | $ | errorClass = null |
) |
get stack of devel message
Definition at line 1451 of file claro_main.lib.php.
| http_response_splitting_workaround | ( | $ | str | ) |
HTTP response splitting security flaw filter
Definition at line 1361 of file claro_main.lib.php.
| load_kernel_config | ( | $ | name | ) |
Load configuration file given its name
| string | $name |
Definition at line 1728 of file claro_main.lib.php.
| page_uri | ( | $ | html = true |
) |
Get the URI of the current page : PHP_SELF + QUERY_STRING, protected against HTTP Response Splitting and XSS
| boolean | $html if set to true (default) the returned URI is passed through htmlspecialchars before being returned |
Definition at line 1649 of file claro_main.lib.php.
| php_self | ( | ) |
Protect $_SERVER[PHP_SELF] against HTTP response splitting and XSS
Definition at line 1630 of file claro_main.lib.php.
| pushClaroMessage | ( | $ | message, | |
| $ | errorClass = 'error' | |||
| ) |
Definition at line 1441 of file claro_main.lib.php.
| $claro_failureList = array() |
SECTION : CLAROLINE FAILURE MANGEMENT
Definition at line 794 of file claro_main.lib.php.
1.6.3