Patrick Cool пре 18 година
родитељ
комит
777328bcce

+ 1 - 1
main/newscorm/document.php

@@ -50,7 +50,7 @@ require_once('learnpathItem.class.php');
 
 // storing the tables names in variables.
 $tbl_document           = Database::get_course_table(TABLE_SCORMDOC);
-$tbl_learnpath_main     = Database::get_course_learnpath_main_table();
+$tbl_learnpath_main     = Database::get_course_table(TABLE_LEARNPATH_MAIN);
 $tbl_tool               = Database::get_course_table(TABLE_TOOL_LIST);
 
 $default_visibility="v";

+ 2 - 2
main/newscorm/scorm_migrate_db.php

@@ -74,7 +74,7 @@ foreach($courses_list as $db)
 {
 	$incoherences = 0;
 	echo "Now starting migration of learnpath tables from $db database...<br />\n";
-	$lp_main = Database::get_course_learnpath_main_table($db);
+	$lp_main = Database::get_course_table(TABLE_LEARNPATH_MAIN),$db);
 	$lp_ids = array();
 	$lp_user = Database::get_course_learnpath_user_table($db);
 	$lp_users = array();
@@ -528,7 +528,7 @@ fwrite($fh_res,"-- Recording resulting course homepages links changes for SCORM\
 echo "<br/><br/>Now starting migration of scorm tables from global SCORM database<br />\n";
 $scorm_main = Database::get_scorm_main_table($db);
 $scorm_item = Database::get_scorm_sco_data_table($db);
-$lp_main 	= Database::get_course_learnpath_main_table($db);
+$lp_main 	= Database::get_course_table(TABLE_LEARNPATH_MAIN,$db);
 $course_pref = Database::get_course_table_prefix();
 $lp_ids 	= array();
 $lp_item_ids 	= array();

+ 13 - 8
main/newscorm/scorm_migrate_db_one_course.php

@@ -23,6 +23,7 @@ function my_get_time($time){
 	else return 0;
 }
 
+//@todo shouldn't the dokeos header not be used here?
 echo "<html><body>";
 
 /**
@@ -65,7 +66,7 @@ foreach($courses_list as $db)
 {
 	$incoherences = 0;
 	echo "Now starting migration of learnpath tables from $db database...<br />\n";
-	$lp_main = Database::get_course_learnpath_main_table($db);
+	$lp_main = Database::get_course_table(TABLE_LEARNPATH_MAIN,$db);
 	$lp_ids = array();
 	$lp_user = Database::get_course_learnpath_user_table($db);
 	$lp_users = array();
@@ -459,15 +460,19 @@ unset($parent_lps);
  * The migration needs to take all data from the scorm.scorm_main and scorm.scorm_sco_data tables
  * and add them to the new lp, lp_view, lp_item and lp_item_view tables.
  */
-echo "<br/><br/>Now starting migration of scorm tables from global SCORM database<br />\n";
-$scorm_main = Database::get_scorm_main_table($db);
-$scorm_item = Database::get_scorm_sco_data_table($db);
-$lp_main 	= Database::get_course_learnpath_main_table($db);
-$course_pref = Database::get_course_table_prefix();
-$lp_ids 	= array();
+echo '<br/><br/>'.get_lang('NowStartingMigration')."<br />\n";
+
+// Database table definitions
+$scorm_main 	= Database::get_scorm_main_table($db);
+$scorm_item 	= Database::get_scorm_sco_data_table($db);
+$lp_main 		= Database::get_course_table(TABLE_LEARNPATH_MAIN,$db);
+$course_pref 	= Database::get_course_table_prefix();
+
+// initialisations
+$lp_ids 		= array();
 $lp_item_ids 	= array();
 $lp_item_refs 	= array();
-$lp_course = array();
+$lp_course 		= array();
 $lp_course_code = array();
 $scorm_lp_paths = array();