Skip to content

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

@ywarnier

Description

@ywarnier

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions