flagflag  

Modlos 1.5.2: editing avatar ownership fails

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2011/1/28 17:55
roel  Just popping in   Posts: 7
Environment: Ubuntu Lucid, amd64
modlos 1.52
moodle 1.9.10+ (Build: 20110112)


When I try to edit an avatar listed in Avatar List so that I can assign an owner to it, it displays

* Owner Name (Roel Cantada)
* User not Found in Moodle (Roel Cantada)

In addition when an avatar logs in OpenSim in-world, the Avatars List becomes blank.

PHP error logs below appears to reveal that some modlos php code are trying to search a wrong database.

My opensim database is named osim and my moodle database is mdlquest. The error states the ff:

Table 'osim.mdlq_user' doesn't exist
Table 'osim.mdlq_modlos_users' doesn't exist

Shouldn't the above be mdlquest.mdlq_user and mdlquest.mdlq_modlos_users. Whichever modlos code is searching, it should be searching the moodle database instead of the opensim database.


I have included the relevant phperrors log snippets below so that the modlos php files may be traced.





php error log files

/var/www/quest/moodle/blocks/modlos/actions/php_errors.log
/var/www/quest/moodle/blocks/modlos/admin/actions/php_errors.log

php error log snippet

a search of osim.mdlq_user instead of mdlquest.mdlq_user


[28-Jan-2011 08:12:24] PHP Notice: Table 'osim.mdlq_user' doesn't exist<br /><br />SELECT * FROM mdlq_user WHERE firstname = 'Roel' AND lastname = 'Cantada' AND deleted = '0'<ul style="text-align: left"><li>line 686 of lib/dmllib.php: call to debugging()</li><li>line 481 of lib/dmllib.php: call to get_recordset_sql()</li><li>line 421 of lib/dmllib.php: call to get_record_sql()</li><li>line 95 of blocks/modlos/include/moodle.func.php: call to get_record()</li><li>line 155 of blocks/modlos/class/edit_avatar.class.php: call to get_userinfo_by_name()</li><li>line 18 of blocks/modlos/actions/edit_avatar.php: call to EditAvatar->execute()</li></ul> in /var/www/quest/moodle/lib/weblib.php on line 7036
[28-Jan-2011 08:12:24] PHP Stack trace:
[28-Jan-2011 08:12:24] PHP 1. {main}() /var/www/quest/moodle/blocks/modlos/actions/edit_avatar.php:0
[28-Jan-2011 08:12:24] PHP 2. EditAvatar->execute() /var/www/quest/moodle/blocks/modlos/actions/edit_avatar.php:18
[28-Jan-2011 08:12:24] PHP 3. get_userinfo_by_name() /var/www/quest/moodle/blocks/modlos/class/edit_avatar.class.php:155

also a searchl to osim.mdlq_modlos_users instead of mdlquest.mdlq_modlos_users


[28-Jan-2011 08:12:11] PHP Notice: Table 'osim.mdlq_modlos_users' doesn't exist<br /><br />SELECT * FROM mdlq_modlos_users WHERE uuid = '3269d4ea-0db2-4905-b759-26d89f8e8ee2'<ul style="text-align: left"><li>line 686 of lib/dmllib.php: call to debugging()</li><li>line 481 of lib/dmllib.php: call to get_recordset_sql()</li><li>line 421 of lib/dmllib.php: call to get_record_sql()</li><li>line 259 of blocks/modlos/include/modlos.func.php: call to get_record()</li><li>line 260 of blocks/modlos/class/avatars_list.class.php: call to modlos_get_avatar_info()</li><li>line 19 of blocks/modlos/actions/avatars_list.php: call to AvatarsList->execute()</li></ul> in /var/www/quest/moodle/lib/weblib.php on line 7036
Votes:261 Average:4.67
Previous post - Next post | Parent - Children.1 | Posted on 2011/1/31 18:58
iseki  Home away from home   Posts: 1581
Hi.

Sorry, I have no idea. :(

As get_record() is moodle function, I don't know that it search user at OpenSim DB.

My few ideas are
Please check moodle/config.php.
Please re-install modlos or Moodle.
.........
Votes:134 Average:4.03
Previous post - Next post | Parent - Children.1 | Posted on 2011/2/2 17:32
roel  Just popping in   Posts: 7
i tried re-installing moodle and modlos many times but it produced the same error. I'll try to find out why get_record() is being passed the "OpenSim SQL DB Name" from the Modlos preferences rather than the config.php Moodle db value.
Votes:169 Average:4.02
Previous post - Next post | Parent - No child | Posted on 2011/2/3 8:27
roel  Just popping in   Posts: 7
I still don't know why OPENSIM_DB_NAME is being searched by get_record() instead of CMS_DB_NAME. All I know is that get_record() calls get_record_sql() which in turn calls get_recordset_sql(). get_recordset_sql() uses the global variable $db. Perhaps this function in /include/opensim.mysql.php has something to do with it.

function opensim_new_db($timeout=60)
{
$db = new DB(OPENSIM_DB_HOST, OPENSIM_DB_NAME, OPENSIM_DB_USER, OPENSIM_DB_PASS, $timeout);

return $db;
}


I hope someone has a solution to this problem.



But I found some things that appear to be bugs. Although they may be unrelated.

1. There seems to be typo in blocks/modlos/settings.php line 5

include(CMS_MODILE_PATH.'/modlos/include/modlos.func.php');

should be CMS_MODULE_PATH

2. Undefined variable: SITE in /var/www/quest/moodle/blocks/modlos/include/modlos.func.php on line 1110. So I inserted $SITE line 1094.

function print_modlos_header($currenttab, $course)
{
global $CFG, $SITE;


Please confirm and tell me if these correct solutions?. Thanks
Votes:112 Average:5.71

  Advanced search


Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Today

Who's Online

82 user(s) are online (12 user(s) are browsing Forum)

Members: 0
Guests: 82

more...

Access Counter

Today : 1402614026140261402614026
Yesterday : 1753317533175331753317533
Total : 2347716923477169234771692347716923477169234771692347716923477169
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com