Please help: user's course listings disappeared after cvs update

Please help: user's course listings disappeared after cvs update

by Peter Birdsall -
Number of replies: 5

We have a problem: after a cvs upgrade on Friday, our site no longer shows users' courses, either in their profile or in mymoodle...

Please could someone help? Am getting numerous complaints from users.

With debugging on the following is shown. I have tried to delete the mentioned files and re-run cvs update, but this doesn't help.

Its moodle 8.3+

Thanks

Table 'wiuonline.mdl_log' doesn't exist
SELECT u.id, u.username, u.firstname, u.lastname, u.picture, ac.count FROM user u, (select userid,count(*)as count from mdl_log group by userid order by count desc limit 10) ac WHERE ac.userid = u.id

  • line 677 of lib/dmllib.php: call to debugging()
  • line 918 of lib/dmllib.php: call to get_recordset_sql()
  • line 43 of blocks/activeusers/block_activeusers.php: call to get_records_sql()
  • line 202 of blocks/moodleblock.class.php: call to block_activeusers->get_content()
  • line 226 of blocks/moodleblock.class.php: call to block_base->is_empty()
  • line 331 of lib/blocklib.php: call to block_base->_print_block()
  • line 53 of my/index.php: call to blocks_print_group()
Average of ratings: -
In reply to Peter Birdsall

Re: Please help: user's course listings disappeared after cvs update

by Peter Birdsall -

If it helps, I have now tested our test site (1.9) and after a cvs update we now only get this:

<>Fatal error>: Call to a member function FetchRow() on a non-object in /var/www/virtual/wiuonline-test/lib/dmllib.php on line 814

It seems that the dmllib.php file is giving a worse error here..

Until Friday (normal site) and just now (test site) both were working fine. Update via cvs and this happened. All help appreciated!

In reply to Peter Birdsall

Re: Please help: user's course listings disappeared after cvs update

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Peter,

that block... the "activeusers" one, can you try disabling (hiding) it from admin... seems to be the responsible of the error, from your debug trace.

That, or your mdl_log table isn't there (perhaps needs repair? ).

About the 1.9 site... can you enable debug too ? If the error is also in the block... can you try the same approach (disable block and/or repair mdl_log) ?

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Please help: user's course listings disappeared after cvs update

by Peter Birdsall -

Thanks for your reply Eloy

Not solved, I’m afraid, although I learned a lot about the database repair command etc.. J

I removed the addon and checked the database, both the whole thing with mysqlcheck and the log table through phpMyAdmin. All seems well.

Also, the logs are working as normal. Users also seem to be able to get into the areas they are allowed in, through “browse all courses”.

What is missing is: a list of all user’s courses in their profile, on mymoodle, and in the My Courses block (which still works for site admins, showing all courses).

Now, I see something that might possibly be a problem:

In the debug which I posted, it said wiuonline.mdl_log, but in our database we don’t have the mdl_ bit in front. This could be the problem…? J

Any ideas?

However - the debug info on a users profile page, where the courses should be is:

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation 'like'
SELECT c.id, c.category, c.sortorder, c.shortname, c.fullname, c.idnumber, c.newsitems, c.teacher, c.teachers, c.student, c.students, c.guest, c.startdate, c.visible, c.cost, c.enrol, c.summary, c.groupmode, c.groupmodeforce FROM course c, ( SELECT c.id FROM role_assignments ra INNER JOIN context x ON x.id = ra.contextid INNER JOIN course c ON x.instanceid = c.id WHERE ra.userid = 4 AND x.contextlevel = 50 UNION SELECT c.id FROM role_assignments ra INNER JOIN context x ON x.id = ra.contextid INNER JOIN course_categories a ON a.path LIKE CONCAT('%/',CAST(x.instanceid AS CHAR(10)),'/%') OR x.instanceid = a.id INNER JOIN course c ON c.category = a.id WHERE ra.userid = 4 AND x.contextlevel = 40 UNION SELECT c.id FROM role_capabilities ca INNER JOIN context x ON x.id = ca.contextid INNER JOIN course c ON c.id = x.instanceid WHERE ca.capability = 'moodle/course:view' AND ca.contextid != 1 AND x.contextlevel = 50 ) cids WHERE c.id = cids.id ORDER BY visible DESC,sortorder ASC

  • line 677 of lib/dmllib.php: call to debugging()
  • line 797 of lib/datalib.php: call to get_recordset_sql()
  • line 306 of user/view.php: call to get_my_courses()

Peter

In reply to Peter Birdsall

Re: Please help: user's course listings disappeared after cvs update

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Peter,

about having (or no) any prefix defined. Not problem at all. Moodle should work perfectly in both cases.

Now, about you debug added below.... I think it's caused by one recent change introduced some days ago, that's being discussed in the Moodle Tracker ( MDL-12427 ).

I think I'm going to revert such change because seems to be causing serious problems... can you update your site from CVS in, say, 2 hours to confirm if then it works ok?

TIA and ciao smile
In reply to Eloy Lafuente (stronk7)

Works again - Thanks

by Peter Birdsall -

Eloy

- Monday morning here and have just updated as you asked. It is all back to normal now - just in time for staff and students to arrive! Thanks.

I suppose I'm risking it a bit updating our main site like this - but I can't resist hoping that it all works better and faster and more wonderfully after every update! Also, if we can help in testing a little, that's always satisfying also!

See you!