Non-core contributed modules

Postgres SQL problems

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
  • Fix Version/s: 1.8.9, 1.9.5
  • 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

Activity

Hide
Toni Mas added a comment -

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

Show
Toni Mas added a comment - 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
Hide
Mawuli Kuivi added a comment -

Thanks. I will test this next week Monday. Will let you know if l find anything else.

Show
Mawuli Kuivi added a comment - Thanks. I will test this next week Monday. Will let you know if l find anything else.
Hide
Mawuli Kuivi added a comment -

Hi Toni,
Are you still working on this module?

Show
Mawuli Kuivi added a comment - Hi Toni, Are you still working on this module?
Hide
Toni Mas added a comment -

Yes, I'm working on this futures. Sorry for delay to solve it.

Show
Toni Mas added a comment - Yes, I'm working on this futures. Sorry for delay to solve it.
Hide
Mawuli Kuivi added a comment -

Thanks.

Do you know who updates this site http://moodle.org/mod/data/view.php?d=13&rid=701&filter=1

It should change the last updated time to when the last new file was created.

Mawuli

Show
Mawuli Kuivi added a comment - Thanks. Do you know who updates this site http://moodle.org/mod/data/view.php?d=13&rid=701&filter=1 It should change the last updated time to when the last new file was created. Mawuli

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: