|
@@ -107,11 +107,10 @@ class GlossaryManager {
|
|
|
'".Database::escape_string($session_id)."'
|
|
|
)";
|
|
|
$result = Database::query($sql);
|
|
|
+ if ($result === false) { return false; }
|
|
|
$id = Database::insert_id();
|
|
|
- if ($id>0) {
|
|
|
- //insert into item_property
|
|
|
- api_item_property_update(api_get_course_info(), TOOL_GLOSSARY, $id, 'GlossaryAdded', api_get_user_id());
|
|
|
- }
|
|
|
+ //insert into item_property
|
|
|
+ api_item_property_update(api_get_course_info(), TOOL_GLOSSARY, $id, 'GlossaryAdded', api_get_user_id());
|
|
|
$_SESSION['max_glossary_display'] = GlossaryManager::get_max_glossary_item();
|
|
|
// display the feedback message
|
|
|
Display::display_confirmation_message(get_lang('TermAdded'));
|