Hi,
The server information is stored in $CFG->wwwroot which is defined in your config.php file.
So if you clone a Moodle you just need to adjust this file.
I hope this makes sense, and helps.
Thanks
Dominic
--
MIS Analyst
________________________________________
From: List dedicated to technical discussions about Moodle [[log in to unmask]] On Behalf Of Mari-Cruz Garcia [[log in to unmask]]
Sent: 10 May 2012 12:17
To: [log in to unmask]
Subject: Script to update links does not change links in html text block
Hello,
I got an script that update all the links referring to a Moodle Site, so that I can automatically update them when I change my domain o clon my Moodle site in another server.
The script allows to configure the following parameters:
$host = "localhost";
$username = "root";
$password = "";
$database = "mydatabase";
$string_to_replace = ' https://learning.health.org.kw/';
$new_string =' http://testlz.health.org.kw:4949/';
The script is working already echoing on screen the tables in which the two $strings have been changed. However, to my surprise, it was altered the $strings in all the html blocks across my site, which are still pointing out to the old domain.
When I search manually in the whole database (I use Adminer.php which allows you to do so) if there are any data in any table containing the $string http://testlz.health.org.kw:4949/, nothing comes up.
The links in the html blocks are displayed in the html source text I attach below. I would like to ask you if those links are stored somewhere in the database or they should be change manually in any html block.
There must be a way of updating them automatically.
Thank you very much for your advice.
Regards
________________________________________________________________________________________________________
<h3 style="text-align: center;"><span style="font-family: arial, helvetica, sans-serif; font-size: small;"><a target="_blank" href="https://learning.health.org.kw/mod/page/view.php?id=6">The Open Knowledge Zone</a></span></h3>
<p style="text-align: center;"><a target="_blank" href="https://learning.health.org.kw/mod/page/view.php?id=6"><img src="http://testlz.health.org.kw:4949/draftfile.php/402/user/draft/540161133/demo.png" height="95" width="95" /></a></p>
____________________________________________________________________________________________________________________________________
Mari Cruz García
Educational technologist, The Learning Zone/ KSeHIN Education Programme
M.Sc Diabetes Care and Education
DUCU Representative for the Medical Research Institute
University of Dundee
Office: +44(0)1382 740701
The University of Dundee is a registered Scottish Charity, No: SC015096
|