diff --git a/main/inc/lib/database.constants.inc.php b/main/inc/lib/database.constants.inc.php index 4b30e1acb7..63e51a2ab5 100644 --- a/main/inc/lib/database.constants.inc.php +++ b/main/inc/lib/database.constants.inc.php @@ -143,7 +143,7 @@ define('TABLE_STATISTIC_TRACK_COURSE_RANKING', 'track_course_ranking'); define('TABLE_MAIN_USER_REL_COURSE_VOTE', 'user_rel_course_vote'); -// SCORM database tables +// SCORM database tables this is used only during the migration from 1.6 to 1.8 see update-db-scorm-1.6.x-1.8.0.inc define('TABLE_SCORM_MAIN', 'scorm_main'); define('TABLE_SCORM_SCO_DATA', 'scorm_sco_data'); diff --git a/main/inc/lib/database.lib.php b/main/inc/lib/database.lib.php index f2942eb063..566e25ea89 100644 --- a/main/inc/lib/database.lib.php +++ b/main/inc/lib/database.lib.php @@ -17,6 +17,7 @@ * Constants definition */ require_once 'database.constants.inc.php'; + /** * Database class definition * @package chamilo.database @@ -182,19 +183,7 @@ class Database { } /** - * This generic method returns the correct and complete name of any scorm - * table of which you pass the short name as a parameter. Please, define - * table names as constants in this library and use them instead of directly - * using magic words in your tool code. - * - * @param string $short_table_name, the name of the table - */ - public static function get_scorm_table($short_table_name) { - return self::format_table_name(self::get_scorm_database(), $short_table_name); - } - - /** - * This generic method returns the correct and complete name of any scorm + * This generic method returns the correct and complete name of any user * table of which you pass the short name as a parameter. Please, define * table names as constants in this library and use them instead of directly * using magic words in your tool code. diff --git a/main/inc/lib/database.mysqli.lib.php b/main/inc/lib/database.mysqli.lib.php index 0fce048713..4689b04699 100644 --- a/main/inc/lib/database.mysqli.lib.php +++ b/main/inc/lib/database.mysqli.lib.php @@ -180,18 +180,6 @@ class Database { return self::format_table_name(self::get_statistic_database(), $short_table_name); } - /** - * This generic method returns the correct and complete name of any scorm - * table of which you pass the short name as a parameter. Please, define - * table names as constants in this library and use them instead of directly - * using magic words in your tool code. - * - * @param string $short_table_name, the name of the table - */ - public static function get_scorm_table($short_table_name) { - return self::format_table_name(self::get_scorm_database(), $short_table_name); - } - /** * This generic method returns the correct and complete name of any scorm * table of which you pass the short name as a parameter. Please, define diff --git a/main/newscorm/scorm.lib.php b/main/newscorm/scorm.lib.php old mode 100755 new mode 100644 index 73fb6102db..54c117eedf --- a/main/newscorm/scorm.lib.php +++ b/main/newscorm/scorm.lib.php @@ -18,6 +18,7 @@ * @param string Dir path * @return boolean True on success, false otherwise */ +/* function removescormDir($dir) { global $_course; if(!@$opendir = opendir($dir)) { @@ -61,7 +62,7 @@ function removescormDir($dir) { return false; } return true; -} +}*/ /** * This function removes a directory if it exists diff --git a/tests/main/inc/lib/database.lib.test.php b/tests/main/inc/lib/database.lib.test.php index 4d8222f1d6..a7356d9389 100755 --- a/tests/main/inc/lib/database.lib.test.php +++ b/tests/main/inc/lib/database.lib.test.php @@ -209,14 +209,7 @@ class TestDatabase extends UnitTestCase { $res=$this->dbase->get_scorm_database(); $this->assertTrue(is_string($res)); } - - function testGetScorm_table() { - $short_table_name=''; - $res=$this->dbase->get_scorm_table($short_table_name); - $this->assertTrue(is_string($res)); - $this->assertTrue($res); - } - + function testGetStatisticDatabase() { global $_configuration; $res=$this->dbase->get_statistic_database($_configuration);