Feature #347 - Installation script: Removing the constant MAX_COURSE_TRANSFER and all the archaic code related to it.

skala
Ivan Tcholakov 15 years ago
parent a508a21804
commit 152cb149e4
  1. 1
      main/install/index.php
  2. 5
      main/install/install.lib.php
  3. 16
      main/install/update-db-1.6.x-1.8.0.inc.php
  4. 14
      main/install/update-db-1.8.0-1.8.2.inc.php
  5. 14
      main/install/update-db-1.8.2-1.8.3.inc.php
  6. 14
      main/install/update-db-1.8.3-1.8.4.inc.php
  7. 14
      main/install/update-db-1.8.4-1.8.5.inc.php
  8. 15
      main/install/update-db-1.8.5-1.8.6.inc.php
  9. 14
      main/install/update-db-1.8.6-1.8.6.1.inc.php
  10. 15
      main/install/update-db-1.8.6.1-1.8.6.2.inc.php
  11. 15
      main/install/update-db-1.8.6.2-1.8.7.inc.php

@ -22,7 +22,6 @@
*/
define('SYSTEM_INSTALLATION', 1);
define('MAX_COURSE_TRANSFER', 100); // TODO: To be examined.
define('INSTALL_TYPE_UPDATE', 'update');
define('FORM_FIELD_DISPLAY_LENGTH', 40);
define('DATABASE_FORM_FIELD_DISPLAY_LENGTH', 25);

@ -1723,11 +1723,6 @@ function display_after_install_message($installType, $nbr_courses) {
<?php echo get_lang('FirstUseTip'); ?>
<?php if (false && $installType == 'update' && $nbr_courses > MAX_COURSE_TRANSFER): ?>
<br /><br />
<font color="red"><strong><?php echo get_lang('Warning'); ?> :</strong> <?php printf(get_lang('YouHaveMoreThanXCourses'), MAX_COURSE_TRANSFER, MAX_COURSE_TRANSFER,'<a href="update_courses.php"><font color="red">', '</font></a>'); ?></font>
<?php endif; ?>
<br /><br />
<?php
echo '<div class="warning-message">';

@ -164,19 +164,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore.
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = $_configuration['table_prefix'];
@ -198,7 +185,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while(($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while ($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;
@ -384,7 +370,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
}
// Load the old-scorm to new-scorm migration script
// TODO: Deal with the fact that this should only act on MAX_COURSE_TRANSFER courses
if (!$only_test){
include('update-db-scorm-1.6.x-1.8.0.inc.php');
}
@ -492,7 +477,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if ($res === false) { die('Error while querying the courses list in update_db-1.6.x-1.8.0.inc.php'); }
if (Database::num_rows($res) > 0) {
$i = 0;
//while( ($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while ($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

@ -161,19 +161,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = $_configuration['table_prefix'];
@ -193,7 +180,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while(($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

@ -162,19 +162,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = $_configuration['table_prefix'];
@ -194,7 +181,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while(($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while ($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

@ -162,19 +162,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = $_configuration['table_prefix'];
@ -194,7 +181,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while(($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while ($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

@ -165,19 +165,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = get_config_param ('table_prefix');
@ -201,7 +188,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while(($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

@ -1073,20 +1073,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = get_config_param ('table_prefix');
@ -1110,7 +1096,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while(($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while ($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

@ -166,19 +166,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = get_config_param ('table_prefix');
@ -202,7 +189,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while(($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while ($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

@ -270,20 +270,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = get_config_param ('table_prefix');
@ -307,7 +293,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while(($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while ($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

@ -215,20 +215,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
// The SCORM database doesn't need a change in the pre-migrate part - ignore
}
/*
-----------------------------------------------------------
Update the Dokeos course databases
this part can be accessed in two ways:
- from the normal upgrade process
- from the script update_courses.php,
which is used to upgrade more than MAX_COURSE_TRANSFER courses
Every time this script is accessed, only
MAX_COURSE_TRANSFER courses are upgraded.
-----------------------------------------------------------
*/
$prefix = '';
if ($singleDbForm) {
$prefix = get_config_param ('table_prefix');
@ -251,7 +237,6 @@ if (defined('SYSTEM_INSTALLATION') || defined('DOKEOS_COURSE_UPDATE')) {
if (Database::num_rows($res) > 0) {
$i = 0;
$list = array();
//while (($i < MAX_COURSE_TRANSFER) && ($row = Database::fetch_array($res)))
while ($row = Database::fetch_array($res)) {
$list[] = $row;
$i++;

Loading…
Cancel
Save