Moodle

PGSQL Grade Import Outcomes SQL Issues

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.2, 1.9.3, 1.9.4
  • Fix Version/s: 1.9.5
  • Component/s: Gradebook
  • Labels:
    None
  • Environment:
    Linux
  • Database:
    PostgreSQL
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

In the grade/edit/outcome/import.php line 181 & 183 the SQL fails on PGSQL because the double quotes around the shortname should be single quotes.

Since this is a check for if an outcome with the shortname and course id, it will fail and add all the outcomes again.

When you try and access Grade->Outcomes it will be fail because of this error as the new rows have the scaleid of 0.

[Fri Feb 06 11:32:33 2009] [error] [client 203.30.161.253] PHP Fatal
error: Call to a member function load_items() on a non-object in
/var/www/moodle/lib/grade/grade_outcome.php
on line 186, referer:
http://netspot.com.au/grade/edit/outcome/index.php

I know this is fixed in CVS in MDL-14967 but the patch could help others in the meantime.

Activity

Hide
Petr Škoda (skodak) added a comment -

fixed in cvs, thanks a lot!

Show
Petr Škoda (skodak) added a comment - fixed in cvs, thanks a lot!
Hide
Tim Hunt added a comment -

Good fix. Thanks Petr. And thanks Tim for finding and reporting this.

Show
Tim Hunt added a comment - Good fix. Thanks Petr. And thanks Tim for finding and reporting this.
Hide
Larry M Elchuck, Ph.D. added a comment -

Curious to know if this fix might have broken importing outcomes in mysql.

I'm running a latest build of 1.9.4+ (Mar 8) and I cannot get any outcome files to import ... including Helen Foster's from
http://moodle.org/mod/forum/discuss.php?d=104141&parent=459766

I keep getting "An error occurred, this script wasn't called with the right parameters."

larry

Show
Larry M Elchuck, Ph.D. added a comment - Curious to know if this fix might have broken importing outcomes in mysql. I'm running a latest build of 1.9.4+ (Mar 8) and I cannot get any outcome files to import ... including Helen Foster's from http://moodle.org/mod/forum/discuss.php?d=104141&parent=459766 I keep getting "An error occurred, this script wasn't called with the right parameters." larry
Hide
Petr Škoda (skodak) added a comment -

no, this should not be the problem

Show
Petr Škoda (skodak) added a comment - no, this should not be the problem
Hide
Helen Foster added a comment -

Larry, I've found the same problem as you describe, and so I've created a separate issue for it - MDL-18506.

Show
Helen Foster added a comment - Larry, I've found the same problem as you describe, and so I've created a separate issue for it - MDL-18506.
Hide
Richard Mansfield added a comment -

There seems to be another one in the same file.

Show
Richard Mansfield added a comment - There seems to be another one in the same file.
Hide
Petr Škoda (skodak) added a comment -

committed, thanks a lot

Show
Petr Škoda (skodak) added a comment - committed, thanks a lot

People

Dates

  • Created:
    Updated:
    Resolved: