Issue Details (XML | Word | Printable)

Key: MDL-8347
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Petr Skoda
Reporter: Ray Lawrence
Votes: 0
Watchers: 0
Operations

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

Cannot create new glossary category if category with same name exists in another course on site

Created: 30/Jan/07 01:08 AM   Updated: 24/Mar/07 04:01 AM
Return to search
Component/s: Glossary
Affects Version/s: 1.7.1
Fix Version/s: 1.7.2, 1.8

Environment: php 4.4.3, mYSQL 5.0.18

Database: MySQL
Participants: Gustavo Muneto, Petr Skoda and Ray Lawrence
Security Level: None
Resolved date: 23/Mar/07
Affected Branches: MOODLE_17_STABLE
Fixed Branches: MOODLE_17_STABLE, MOODLE_18_STABLE


 Description  « Hide
Cannot create new glossary category if category with same name exists in another course on site. If another name is chosen which does not already exist the category can be created without difficulty.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Gustavo Muneto added a comment - 31/Jan/07 10:01 PM
the problem can be solved modifying the file editcategories.php located in mod/glossary.
Line 134.

original:
$dupcategory = get_records_sql("SELECT * FROM {$CFG->prefix}glossary_categories WHERE name $ILIKE '$name'");

new:
$dupcategory = get_records_sql("SELECT * FROM {$CFG->prefix}glossary_categories WHERE name $ILIKE '$name' and glossaryid=".$glossary->id);


Petr Skoda added a comment - 23/Mar/07 06:46 AM
fixed in cvs, thanks for the report and patch!

Ray Lawrence added a comment - 24/Mar/07 04:01 AM
Excellent! Cheers, Petr.