-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Milestone
Description
When copying a portal (to do a test site, for example), the paths in courses/*/index.php are wrong (they stay the same as before, although the path has changed).
Add a command files:update_course_index with 1 single param: the new path (up to the "main/" directory.
For example, if you want to change the path from /var/www/virtual2.biz.be/www/main/course_home.php to /var/www/virtual4.biz.be/www/main/course_home.php, we should just enter the parameter: /var/www/virtual4.biz.be/www because the rest is obvious.
A command line to do it:
find /var/www/virtual2.biz.be/www/courses/*/index.php -type f -exec sed -i 's/virtual2.biz.be/virtual4.biz.be/g' {} ;
A PHP script to do the same: