Picture of Ivan Shtyrbulov
FN Site Groups and MSSQL
by Ivan Shtyrbulov - Thursday, 19 November 2009, 06:51 AM
 
Hello all!
I have:
Moodle 1.9.4+
Database is on MS SQL Server 2005 (but has MSSQL 2000 compatibility level).

The problem is:
Members of selected group are not displayed ("Manage Site Groups" page, "Groups" tab)and there is zero next to the Group name - see attached screenshot.
But I can see them when clicking "Info about selected group" button.

I think the problem can be tied to MSSQL because everything worked when I tried it on Moodle run on XAMPP(i.e. MySQL)..
Can somebody help me?
Thank you.

Picture of Fernando Oliveira
Re: FN Site Groups and MSSQL
by Fernando Oliveira - Friday, 20 November 2009, 10:43 AM
 
Hello Ivan,

Can you turn on debugging and see what messages come up on that page?

Fernando
Picture of Ivan Shtyrbulov
Re: FN Site Groups and MSSQL
by Ivan Shtyrbulov - Friday, 20 November 2009, 03:47 PM
 
Hi Fernando,
I get a follwing message when I load this page:


The text, ntext, or image data type cannot be selected as DISTINCT.
SELECT DISTINCT u.* ,u.lastaccess FROM mdl_user u, mdl_groups_members m WHERE m.groupid = '7' AND m.userid = u.id ORDER BY u.lastaccess DESC
line 686 of lib\dmllib.php: call to debugging()
line 966 of lib\dmllib.php: call to get_recordset_sql()
line 1252 of lib\deprecatedlib.php: call to get_records_sql()
line 491 of blocks\fn_site_groups\sitegroups.php: call to get_group_users
Picture of Fernando Oliveira
Re: FN Site Groups and MSSQL
by Fernando Oliveira - Monday, 23 November 2009, 10:06 AM
 
I sent this off to Mike Churchward (he's the coder behind all the FN series plugins). Here's what he said:

That's interesting... That's a core Moodle function that's causing that.

I think I can limit the problem though. Can you try dropping the
attached file into the '/block/fn_site_groups/' directory? If it fixes
it, I'll make the change permanent.

I've attached the file. Please let me know if it fixes your problem.

Thanks,
Fernando
Picture of Ivan Shtyrbulov
Re: FN Site Groups and MSSQL
by Ivan Shtyrbulov - Tuesday, 24 November 2009, 06:28 AM
 
Yes, it does! Now "Groups" tab functions correctly!!

But now I've found out one thing more..
The similar message appears on "Course Enrolment" tab and "Not Enrolled" list is not being populated:

The text, ntext, or image data type cannot be selected as DISTINCT.

SELECT DISTINCT u.* ,u.lastaccess FROM mdl_user u, mdl_groups_members m WHERE m.groupid = '16' AND m.userid = u.id ORDER BY u.lastaccess DESC
  • line 686 of lib\dmllib.php: call to debugging()
  • line 966 of lib\dmllib.php: call to get_recordset_sql()
  • line 1252 of lib\deprecatedlib.php: call to get_records_sql()
  • line 208 of blocks\fn_site_groups\sitegroups.php: call to get_group_users()
I guess the line 208 of sitegroups.php should be corrected too.

Thank you for your support!smile
Picture of Fernando Oliveira
Re: FN Site Groups and MSSQL
by Fernando Oliveira - Tuesday, 24 November 2009, 02:30 PM
 
Try the attached file.
Picture of Ivan Shtyrbulov
Re: FN Site Groups and MSSQL
by Ivan Shtyrbulov - Wednesday, 25 November 2009, 06:39 AM
 
It works!
Thanks a lot!smile
Moodle Theme by NewSchool Learning