flagflag  If you want to see English page, please click "English" Button at Left.

Modlos 1.5.2: editing avatar ownership fails

  • このフォーラムに新しいトピックを立てることはできません
  • このフォーラムではゲスト投稿が禁止されています
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2011-1-28 17:55
roel  Just popping in   投稿数: 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
投票数:261 平均点:4.67
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2011-1-31 18:58
iseki  Home away from home   投稿数: 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.
.........
投票数:134 平均点:4.03
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2011-2-2 17:32
roel  Just popping in   投稿数: 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.
投票数:169 平均点:4.02
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2011-2-3 8:27
roel  Just popping in   投稿数: 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
投票数:112 平均点:5.71

  条件検索へ


サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 4月翌月
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
<今日>

オンライン状況

89 人のユーザが現在オンラインです。 (2 人のユーザが Forum を参照しています。)

登録ユーザ: 0
ゲスト: 89

もっと...

アクセスカウンタ

今日 : 1249512495124951249512495
昨日 : 9457945794579457
総計 : 2333945223339452233394522333945223339452233394522333945223339452
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com