Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
-
Component/s: Block: Email_list
-
Labels:None
-
Database:PostgreSQL, Oracle
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
When Testing in MySQL, everything runs fine. Database like protgres do not work very well. Some of the changes needed to get Postgres working:
1. file: email.class.php
function get_users_send
line - 656
Please change ' AND type='".$type.'"' to ' AND type=\''.$type.'\''
Postgres database does not like SQL statement with double quote like name="james" or name="%james%". They have to be single quotes like name='james' or name='%james%'
2. file lib.php
function email_get_mails
Please remove all the $groupby variable. Postgre SQL requires all element in the select statement should appear in the GROUP BY .
3. file: get_users.php
line = 220
$pic = print_user_picture($user->firstname, 1, false, 30, true,false);
Please change the
a). first argument to just $user and not $user->firstname
b) the second argument to the courseid == $course->id
More later if any
Hi Mawuli,
Last update include all patches to solve this bugs, but I'm testing all code to searching more SQL bugs on PostgreSQL and Oracle.
Regrards,
Toni