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

Go to the source code of this file.

Namespaces

namespace  kernel::module

Functions

 get_package_path ()
 get_module_path ($toolLabel)
 get_module_url ($toolLabel)
 get_module_db_dependance ($toolId)
 claro_get_data_path ($contextData=array())
 get_module_entry ($claroLabel)
 get_module_entry_url ($claroLabel)
 get_module_data ($claroLabel, $dataName=null, $ignoreCache=false)
 check_module ($modLabel)
 load_module_language ($moduleLabel=null, $language=null)
 add_module_lang_array ($moduleLabel=null, $language=null)
 get_module_label_list ($activeModulesOnly=true)
 install_module_in_course ($moduleLabel, $courseId)
 install_module_database_in_course ($moduleLabel, $courseId)
 install_module_script_in_course ($moduleLabel, $courseId)
 delete_all_modules_from_course ($courseId)
 delete_module_in_course ($moduleLabel, $courseId)
 execute_sql_file_in_course ($file, $courseId)
 get_module_course_tbl ($arrTblName, $courseCode=null)
 get_module_main_tbl ($arrTblName)
 load_module_config ($moduleLabel=null)
 module_get_course_tool_list ($courseIdReq, $platformActive=true, $courseActive=true, $context=null)
 get_group_tool_label_list ($activatedOnly=true)
 get_activated_group_tool_label_list ($courseId)
 is_tool_activated_in_course ($toolId, $courseIdReq)
 is_module_installed_in_course ($toolLabel, $courseId)
 is_tool_activated_in_groups ($courseId, $toolLabel)
 get_tool_id_from_module_label ($moduleLabel)
 get_module_label_from_tool_id ($toolId)

Variables

 defined ('CLARO_CONTEXT_PLATFORM')||define('CLARO_CONTEXT_PLATFORM'

Function Documentation

add_module_lang_array ( moduleLabel = null,
language = null 
)

Merge module lang with lang file

Deprecated:
since Claroline 1.9, use language::load_module_translation
Parameters:
$moduleLabel module label (default null for current module)
$language language name (default null for current language)
Deprecated:
since 1.9

Definition at line 332 of file module.lib.php.

check_module ( modLabel  ) 

Check if a module is installed and actived.

Parameters:
string $modLabel module label
Returns:
array

Definition at line 283 of file module.lib.php.

claro_get_data_path ( contextData = array()  ) 

Return the syspath where a tool can store these file for a given context

Parameters:
mixed $contextData
Returns:
string

Definition at line 149 of file module.lib.php.

delete_all_modules_from_course ( courseId  ) 

Remove database for all modules in the given course

Parameters:
string courseId
Returns:
array( boolean success Backlog log )
Author:
Frederic Minne <zefredz@claroline.net>

Definition at line 452 of file module.lib.php.

delete_module_in_course ( moduleLabel,
courseId 
)

Remove database for the given module in the given course

Parameters:
string moduleLabel
string courseId
Returns:
boolean
Author:
Frederic Minne <zefredz@claroline.net>

Definition at line 491 of file module.lib.php.

execute_sql_file_in_course ( file,
courseId 
)

Execute course related SQL files by replacing __CL__COURSE__ place holder with given course code, then executing the file

Parameters:
string file path to the sql file
string courseId course sys code
Returns:
boolean
Author:
Frederic Minne <zefredz@claroline.net>
Exceptions:
SQL_FILE_NOT_FOUND,SQL_QUERY_FAILED 

Definition at line 521 of file module.lib.php.

get_activated_group_tool_label_list ( courseId  ) 

Get the list of modules activated for the groups in the given course

Parameters:
string $courseId course code
Returns:
array or false

Definition at line 740 of file module.lib.php.

get_group_tool_label_list ( activatedOnly = true  ) 

Get the list of labels for the modules available in groups

Parameters:
boolean $activatedOnly get only activated modules
Returns:
array or false

Definition at line 719 of file module.lib.php.

get_module_course_tbl ( arrTblName,
courseCode = null 
)

Get list of module table names 'localized' for the given course

Parameters:
array $arrTblName of tableName
string $courseCode course code
Returns:
array $tableName => $dbNameGlue . $tableName

Definition at line 556 of file module.lib.php.

get_module_data ( claroLabel,
dataName = null,
ignoreCache = false 
)

Get information about a module

Parameters:
string $claroLabel module label
string $dataName
boolean $ignoreCache
Returns:
mixed

Definition at line 236 of file module.lib.php.

get_module_db_dependance ( toolId  ) 

Return the list of context that the tool can use but not manage.

Parameters:
string $toolId
Returns:
array

Definition at line 108 of file module.lib.php.

get_module_entry ( claroLabel  ) 

Get module entry filename

Parameters:
string $claroLabel module label
Returns:
string

Definition at line 210 of file module.lib.php.

get_module_entry_url ( claroLabel  ) 

Get the complete path to the entry of an module.

Parameters:
string $claroLabel module label
Returns:
string

Definition at line 222 of file module.lib.php.

get_module_label_from_tool_id ( toolId  ) 

Get the module label corresponding to the given tool id

Parameters:
int $toolId
Returns:
string

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

get_module_label_list ( activeModulesOnly = true  ) 

Get the list of all modules on the platform

Parameters:
bool $activeModulesOnly selects only active module (default true)
Returns:
array module label list
Exceptions:
COULD_NOT_GET_MODULE_LABEL_LIST 
Author:
Frederic Minne <zefredz@claroline.net>

Definition at line 344 of file module.lib.php.

get_module_main_tbl ( arrTblName  ) 

Get list of module table names 'localized' for the main db

Parameters:
array $arrTblName of tableName
Returns:
array $tableName => mainTblPrefix . $tableName

Definition at line 579 of file module.lib.php.

get_module_path ( toolLabel  ) 

This function return the core repository of a module.

Parameters:
string $toolLabel
Returns:
string

Definition at line 47 of file module.lib.php.

get_module_url ( toolLabel  ) 

This function return the core repository of a module.

Parameters:
string $toolLabel
Returns:
string

Definition at line 78 of file module.lib.php.

get_package_path (  ) 

This function return the core repository of a package (zipped module).

Returns:
string
Since:
1.9

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

get_tool_id_from_module_label ( moduleLabel  ) 

Get the tool id corresponding to the given module label

Parameters:
string $moduleLabel
Returns:
int

Definition at line 817 of file module.lib.php.

install_module_database_in_course ( moduleLabel,
courseId 
)

Create and initialize the module database in the given course

Parameters:
string $moduleLabel
string $courseId
Todo:
what to return if the script file does not exists ?!?
Returns:
boolean

Definition at line 404 of file module.lib.php.

install_module_in_course ( moduleLabel,
courseId 
)

Install database for the given module in the given course

Parameters:
string moduleLabel
string courseId
Returns:
boolean
Author:
Frederic Minne <zefredz@claroline.net>

Definition at line 390 of file module.lib.php.

install_module_script_in_course ( moduleLabel,
courseId 
)

Execute module initialization script in the given course

Parameters:
string $moduleLabel
string $courseId

Definition at line 426 of file module.lib.php.

is_module_installed_in_course ( toolLabel,
courseId 
)

Is the given module installed in the given course ?

Parameters:
string $toolLabel module label
string $courseId course code
Returns:
boolean

Definition at line 775 of file module.lib.php.

is_tool_activated_in_course ( toolId,
courseIdReq 
)

Is the given tool activated in the given course ?

Parameters:
int $toolId tool id
string $courseIdReq course code
Returns:
boolean

Definition at line 754 of file module.lib.php.

is_tool_activated_in_groups ( courseId,
toolLabel 
)

Is the given module activated in the groups of the given course ?

Parameters:
string $courseId course code
string $toolLabel module label
Returns:
boolean

Definition at line 797 of file module.lib.php.

load_module_config ( moduleLabel = null  ) 

Load configuration file for a module

Parameters:
$module module label (default null for current module)

Definition at line 596 of file module.lib.php.

load_module_language ( moduleLabel = null,
language = null 
)

Load language file for a module

Deprecated:
since Claroline 1.9, use language::load_module_translation
Parameters:
$moduleLabel module label (default null for current module)
$language language name (default null for current language)
Deprecated:
since 1.9

Definition at line 320 of file module.lib.php.

module_get_course_tool_list ( courseIdReq,
platformActive = true,
courseActive = true,
context = null 
)

Definition at line 626 of file module.lib.php.


Variable Documentation

defined('CLARO_CONTEXT_TOOLLABEL')||define('CLARO_CONTEXT_TOOLLABEL'

Definition at line 23 of file module.lib.php.

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