[svn r10973] Added rewrite of the course/cours_rep/index.php redirection file (was pointing to claroline)

skala
Yannick Warnier 19 years ago
parent 5be9fc03a8
commit f26cf77db6
  1. 20
      main/install/update-files-1.6.x-1.8.0.inc.php

@ -1,4 +1,4 @@
<?php //$Id: update-files-1.6.x-1.8.0.inc.php 10953 2007-01-29 02:39:31Z yannoo $
<?php //$Id: update-files-1.6.x-1.8.0.inc.php 10973 2007-01-29 17:50:42Z yannoo $
/*
==============================================================================
Dokeos - elearning and course management software
@ -131,6 +131,24 @@ if (defined('DOKEOS_INSTALL') || defined('DOKEOS_COURSE_UPDATE'))
mkdir($currentCourseRepositorySys."upload/test",0777);
}
//Updating index file in courses directories to change claroline/ into main/
$content = '<?php'."\n".
'$cidReq="'.$courses_directories['code'].'";'."\n" .
'$dbname="'.$courses_directories['db_name'].'";'."\n" .
'include("../../main/course_home/course_home.php");'."\n" .
'?>';
unlink($currentCourseRepositorySys.'index.php');
$fp = @ fopen($currentCourseRepositorySys.'index.php', 'w');
if ($fp)
{
error_log('Writing redirection file in '.$currentCourseRepositorySys.'index.php',0);
fwrite($fp, $content);
fclose($fp);
}else{
error_log('Could not open file '.$currentCourseRepositorySys.'index.php',0);
}
}
// Write the Dokeos config file
write_dokeos_config_file('../inc/conf/configuration.php');

Loading…
Cancel
Save