* Get the constant which defines the tool of this resource. This is
* used in the item_properties table.
* @param bool $for_item_property_table (optional) Added by Ivan, 29-AUG-2009: A parameter for resolving differencies between defined TOOL_* constants and hardcoded strings that are stored in the database.
* Example: The constant TOOL_THREAD is defined in the main_api.lib.php with the value 'thread', but the "Forums" tool records in the field 'tool' in the item property table the hardcoded value 'forum_thread'.
* Example: The constant TOOL_THREAD is defined in the api.lib.php with the value 'thread', but the "Forums" tool records in the field 'tool' in the item property table the hardcoded value 'forum_thread'.
* @todo once the RESOURCE_* constants are replaced by the globally
* defined TOOL_* constants, this function will be replaced by get_type()
*/
@ -157,7 +157,7 @@ class Resource
case RESOURCE_ANNOUNCEMENT:
return TOOL_ANNOUNCEMENT;
case RESOURCE_FORUMCATEGORY:
return 'forum_category'; // Ivan, 29-AUG-2009: A constant like TOOL_FORUM_CATEGORY is missing in main_api.lib.php. Such a constant has been defined in the forum tool for local needs.
return 'forum_category'; // Ivan, 29-AUG-2009: A constant like TOOL_FORUM_CATEGORY is missing in api.lib.php. Such a constant has been defined in the forum tool for local needs.
* courses directories, configuration files and all other temp directories.
* It only works when launched from the command line and requires Chamilo to
* be installed (otherwise it will not find the references as to the paths and
* databases to delete). It only wipes out stuff and directories it knows are
* databases to delete). It only wipes out stuff and directories it knows are
* created by Chamilo though, so don't worry about your own files if you didn't
* store them in variable Chamilo directories.
* Requires Chamilo LMS 1.9 or greater
@ -32,7 +32,7 @@ if (!file_exists(dirname(__FILE__).'/../main/inc/global.inc.php')) {
}
if (!is_file(dirname(__FILE__).'/../main/inc/conf/configuration.php')) {
echo " This script will only work on an already installed version of Chamilo. The \n", "main/inc/conf/configuration.php file could not be found, which is understood\n", "as Chamilo not being installed.\n";
echo " This script will only work on an already installed version of Chamilo. The \n", "main/inc/conf/configuration.php file could not be found, which is understood\n", "as Chamilo not being installed.\n";