Course not showing after upgrade

Course not showing after upgrade

by Jean-Michel Védrine -
Number of replies: 3

Today 20:06 (GMT+1) I downloaded moodle-latest.zip and upgraded my site http://www.vedrine.org . The upgrade process apparently went fine (only success messages displayed) but now there is no course in any category for instance http://www.vedrine.org/course/category.php?id=1 show the "No courses in this category" message but there is 4 courses in this category. If I click on the "Turn Editing on" button they are showing as expected and they are not hidden. I am trying to understand what happened but for the moment I have no idea of the problem.

old version info :

$version = 2004083101;

$release = "1.4.1+";

$version = 2004083128;

$release = '1.4.2+';

But as once I am in a course everything appear fine, I would prefer to solve the problem and stay at 1.4.2+

I also tried to create a new course and it is not displayed if I am not in edit mode.

I see no special instruction that I may have missed in the releases notes.

I am not anxious because, yes of course I made a backup of the whole site and database just before upgrading so I can downgrade if necessary.new version info :
Average of ratings: -
In reply to Jean-Michel Védrine

Re: Course not showing after upgrade

by Martín Langhoff -
Jean-Michel,

very strange. Right now your Moodle install seems not to be running 100%, so I can't really see much. However...

If you've downloaded the "daily stable" there's a tricky improvement to course listings that may have problems. One way to try and fix it is to go to the category, click on 'turn editing on' and then use the 're-sort' button.

Let us know how it went.
In reply to Martín Langhoff

Re: Course not showing after upgrade

by Jean-Michel Védrine -

Yes I was doing some tests so the result was a bit strange on screen !!

I tracked down the problem to the sql query in the get_courses function in lib/datalib.php not having anything after the ORDERBY so you are probably right I should have used the re-sort button but I fixed it in an atrocious way adding a :

if (!$sort) {$sort="c.sortorder ASC";}

line before the query. because it was past midnight and I had to take the decision either to roll back to the version before upgrade or to solve the problem before my students wake up in a few hours.

In any case the site seems now to be OK. I go to sleep.