Details
Description
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.
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.
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);