Pointing to the wrong folder

Pointing to the wrong folder

de Dallas G -
Número de respuestas: 11

Using Moodle 1.9.7


Hi. having some trouble with my install. Note:

- I originally installed it myself (6 years ago)

- Just used GoDaddy's rapid install to install 1.9.7

- Redirected the config.php to point at the old mysql database.

- Many things are working now, but not everything.

 

When I enter a course, the pictures that should be displaying in the blocks are not showing. When I look at the html info, the pictures are looking in the wrong folder. So it seems like there is an incorrect redirect. I cant find where to fix this. Any one have advice?

Promedio de valoraciones: -
En respuesta a Dallas G

Re: Pointing to the wrong folder

de Colin Fraser -
Foto de Documentation writers Foto de Testers

Update to v2.x. That is the first thing. There is no point in hanging on to v1.9.x any longer, support for it is declining and runs out at the end of the year I think - and then that long only due to the generosity of a Moodle Partner. What is worse, the skills base around the older Moodle releases is being lost in the shuffle to v2.x.
The v1.9.x documentation is still available, so may still be useful.

1. Dowload and install a v2.x to your local machine.

2. Download your users as a csv file with their enrollments.

3. Reset all your courses and then back them up without student data.

4. Restore the courses to the local machine and when ready, restore your users with their course enrollments. Check carefully, there is sufficient documentation on how to do this, you might want to do a few students first to make sure that it all works, then the rest of them. 

Test thoroughly, make sure all processes and restorations work as they should.

Once done, back everything up and restore to your production site. Check that everything is working there and it should be OK. Yu may also want to look at this discussion as well...

 

Having said all this, to get you out of immediate drama, you might want to try to find the common elements causing this problem and run the replace.php. Put in the wrong html line, then enter the correct one. The trouble is you may have to do it on all the courses, the replacement string may reflect only one value at a time. This should chang all the matching values throughout the whole Moodle. Otherwise, you may have to do it all manually. 

 

En respuesta a Colin Fraser

Re: Pointing to the wrong folder

de Howard Miller -
Foto de Core developers Foto de Documentation writers Foto de Particularly helpful Moodlers Foto de Peer reviewers Foto de Plugin developers

personally, I would not recommend upgrading a 1.9 install with any hints of problems until I understood what had gone wrong. The upgrade will just break horribly.

En respuesta a Colin Fraser

Re: Pointing to the wrong folder

de Visvanath Ratnaweera -
Foto de Particularly helpful Moodlers Foto de Translators
Colin,

> Update to v2.x. That is the first thing. There is no point in hanging on to v1.9.x any longer,

Got bitten by the v2.x bug? What happened?
sonrisa

> support for it is declining and runs out at the end of the year I think

"Bug fixes for serious security issues in 1.9.x by Catalyst IT will continue until Dec 2013 (6 years)." http://docs.moodle.org/dev/Releases#Moodle_1.9

On community support, there's still a bunch of die hards

About the general usefulness of v2 has been discussed over and over. If we keep to the OP, who has installed 6 years ago and never updated, may be not even put to production use, I question whether he came here to listen to the latest bells and whistles. Admittedly 1.9 is now over four years old. The shine is definitely gone. If nothing else happens, the gear box will fail at any time.
triste
En respuesta a Visvanath Ratnaweera

Re: Pointing to the wrong folder

de Colin Fraser -
Foto de Documentation writers Foto de Testers

Visvanath,

> Got bitten by the v2.x bug? What happened?

mm Not really, but began using 2.0 on my local machine and put up with a lot of the rubbish around that. There are a number of issues around v2.x that need some serious reworking, but that is just me, the aesthetics of v2.x are somewhat  - mixed - is a good word here. However, by the time of v2.2.1 there has been a lot of work and yes there are still issues some of which I have posted in Moodle Tracker, and been igno....err, overlooked..sonrisa  Others I have mentioned in posts, like IMNSHO Moodle wikis are really rubbish and need be replaced with something that works, looks good and is a lot more user friendly as well as being used at both site and course levels. 

On the benefits side, it is stable, it is easy to use in some ways, more annoying in others, navigation is not as good as v1.9.x, but themes and menu structures are easier to deal with uising the dock and so on. Lots of really good things in v2.x now, and as I am using a stable bog standard v2.2.1 for one of my Moodles, and updating to v2.4 maybe before the end of the year on the other, and then if it is as good as it promises to be, both will be the same version.   

En respuesta a Colin Fraser

Re: Pointing to the wrong folder

de Dallas G -

Hi Colin, thanks for your help. Here is the situation.


- I need moodle working by tomorrow, so I dont have time to try to get 2.0 installed.

- The host company only supports 1.9, so I am fine with that for the next 4 months.

- I am running it on a Linux system

- NOTE: I think I solved my first problem.

In the config.php file, The wwwroot field did not have a "www." in front of my site name. Now that I put that in, the courses are now finding the moodledata directory correctly.

So "Problem 1" seems to be solved.

PROBLEM 2:

When I check the "Participants" section of my courses, it shows "LAST ACCESS" as = "Never". (same for students)This is ironic, because I am accessing it to see what it shows. So at first I thought maybe this had something to with the cron job, but my cron job script runs every 5 minutes.

So now I do not know what is wrong. Any advice?


Oh, I just found the "show activity reports" in the settings of the course. I set it to YES, but it under Participants, it is still not showing my "last access"

En respuesta a Dallas G

Re: Pointing to the wrong folder

de Howard Miller -
Foto de Core developers Foto de Documentation writers Foto de Particularly helpful Moodlers Foto de Peer reviewers Foto de Plugin developers

I really don't understand what you have done. If you installed it 6 years ago what exactly have you done recently to break it. Six years ago it was probably 1.9.5 or thereabouts and today it's 1.9.19, so what's 1.9.7 got to do with it?


Confused, sorry!

En respuesta a Dallas G

Re: Pointing to the wrong folder

de Visvanath Ratnaweera -
Foto de Particularly helpful Moodlers Foto de Translators
Hi

An unorthodox migration I must say. Here http://docs.moodle.org/19/en/Moodle_migration is the prescribed method.

As you can see in that documentation, three things should move to the new server.

> - I originally installed it myself (6 years ago)
>
> - Just used GoDaddy's rapid install to install 1.9.7

Instead of the original Moodle source you take a fresh download. Since both are 1.9.7, shouldn't be a problem.

> - Redirected the config.php to point at the old mysql database.
You mean, these 6 lines in the new config.php are identical to those in the old config.php?
$CFG->dbtype
$CFG->dbhost
$CFG->dbname
$CFG->dbuser
$CFG->dbpass
$CFG->prefix

What about other basic parameters like
$CFG->wwwroot
$CFG->dirroot
$CFG->dataroot
?

> - Many things are working now, but not everything.
> When I enter a course, the pictures that should be displaying ...

First check up the basic parameters mentioned above. The replace.php operation Colin mentioned, i.e. search the old URL in the database and replace with the new one, is likely to be necessary.

I would get the present version, or even better 1.9.latest going but postpone the Moodle 2 shuffle for some other bright day. (personal openion)
;-(


En respuesta a Visvanath Ratnaweera

Re: Pointing to the wrong folder

de Colin Fraser -
Foto de Documentation writers Foto de Testers

Just looking at the historical release schedule, if it was installed in 2006, then the installation was a v1.5, a v1.6 or a v1.7 (released in November 2006) they being the active releases during that time period. If you updated a v1.7 to a v1.9.7 with even partial success, then you have done something a lot of people have never been able to do, so congratulations. And you should be experiencing a number of issues - in fact a huge number of issues. So please let us know what versions you are using and what you updated from and to.

Howard is right, to a point, it is better to know what has broken your Moodle to begin with, but there comes a point where you can be wasting too much time on trying to find the issue without result. Best then to do a data dump to a csv file and wipe everything out to start again with a fresh install.

You should always have a localhost copy of your Moodle, for emergencies and for testing. That is why I suggest you start with a fresh install to a localhost, fill it up, make sure it works then dump everything in your production site. Saves time and you have a duplicate that works. There are some things you need to take care of, the things Visnavath refers to, also run the replace.php to make sure your localhost addresses are replaced with your server addresses, but that should do it... In the end you have a test site, on your local machine, and your production site.      

En respuesta a Visvanath Ratnaweera

Re: Pointing to the wrong folder

de Visvanath Ratnaweera -
Foto de Particularly helpful Moodlers Foto de Translators
Forgot to mention in my previous post: So far we have been discussing the migration or replacement of two things: the code and the database. What about the third, $CFG->dataroot aka moodledata?
En respuesta a Visvanath Ratnaweera

Re: Pointing to the wrong folder

de Dallas G -

Hi Colin, thanks for your help. Here is the situation.


- I need moodle working by tomorrow, so I dont have time to try to get 2.0 installed.

- The host company only supports 1.9, so I am fine with that for the next 4 months.

- I am running it on a Linux system

- NOTE: I think I solved my first problem.

In the config.php file, The wwwroot field did not have a "www." in front of my site name. Now that I put that in, the courses are now finding the moodledata directory correctly.

So "Problem 1" seems to be solved.

PROBLEM 2:

When I check the "Participants" section of my courses, it shows "LAST ACCESS" as = "Never". (same for students)This is ironic, because I am accessing it to see what it shows. So at first I thought maybe this had something to with the cron job, but my cron job script runs every 5 minutes.

So now I do not know what is wrong. Any advice?


Oh, I just found the "show activity reports" in the settings of the course. I set it to YES, but it under Participants, it is still not showing my "last access"

En respuesta a Dallas G

Re: Pointing to the wrong folder

de Colin Fraser -
Foto de Documentation writers Foto de Testers

If you have updated, there is a possibility, one I have never checked, that the access dates are reset, but I cannot see any advantage in doing that. When I update next I will check it. 

If that is your only problem then is it possible to just continue? Is there a reason, like conditional activities or locked activities that would prevent or wreck someone's progress? 

For any Moodle, I seriously suggest that you keep two or three copies of it, one for your production server, and at least a test Moodle on your local machine. The OS does not make too much difference, usually, unless there is extensive interaction between the test and the production sites then there will be some things that might be an issue. this discussion now has me thinking that a complete backup of the last active day before an upgrade occurs (on your local machine) might also be an attractive possibility. All you need really is different folder names, and different cookie prefixes and you can run as many Moodles as you like. Right now I have four, but I am dropping the v1.9.17 soon, when I get around to upgrading my last v.9.17 production site. I am now thinking maybe not, keep it just in case for a few months, at least until February. So thanks for that.