Issue Details (XML | Word | Printable)

Key: MDL-14797
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Tim Hunt
Reporter: Tim Hunt
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Error when moving a course to an empty category on Postgres

Created: 12/May/08 06:35 PM   Updated: 13/May/08 04:46 PM
Component/s: Course
Affects Version/s: 1.9
Fix Version/s: 1.6.7, 1.7.5, 1.8.6, 1.9.1

Database: PostgreSQL
Participants: Petr Škoda (skodak) and Tim Hunt
Security Level: None
QA Assignee: Petr Škoda (skodak)
Resolved date: 12/May/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
The code was

if ($sortorder === false) {

however, on Postgres (at lease)

get_field_sql('SELECT MIN(sortorder)-1 AS min
FROM ' . $CFG->prefix . 'course WHERE category=' . $categoryid);

returns NULL, not false, if the category you are moving to is empty.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Škoda (skodak) added a comment - 13/May/08 04:46 PM
thanks