Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to transform courses/*/index.php in 1.9.* #33

Open
ywarnier opened this issue Jun 20, 2014 · 0 comments
Open

Add command to transform courses/*/index.php in 1.9.* #33

ywarnier opened this issue Jun 20, 2014 · 0 comments

Comments

@ywarnier
Copy link
Member

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant