浏览代码

Removing scorm calls. Leaving just the table definition (needed when migrating from 1.6 to 1.8). Removing removescormDir() unused function see #4716

Julio Montoya 13 年之前
父节点
当前提交
905de2cfe6

+ 1 - 1
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');
 

+ 2 - 13
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.

+ 0 - 12
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

+ 2 - 1
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

+ 1 - 8
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);