diff --git a/mod/glossary/deleteentry.php b/mod/glossary/deleteentry.php index ef773ecb7cc..08eac807277 100644 --- a/mod/glossary/deleteentry.php +++ b/mod/glossary/deleteentry.php @@ -1,7 +1,7 @@ "; - if ( isteacher($cm->id) or $glossary->studentcanpost ) { - if ($go) { // the operation was confirmed. - if ( $mode == "delete") { - // if it is an imported entry, just delete the relation - $entry = get_record("glossary_entries","id", $entry); - if ( $entry->sourceglossaryid ) { - $entry->glossaryid = $entry->sourceglossaryid; - $entry->sourceglossaryid = 0; + echo "
"; + if ( isteacher($cm->id) or $glossary->studentcanpost ) { + if ($go) { // the operation was confirmed. + if ( $mode == "delete") { + // if it is an imported entry, just delete the relation + $entry = get_record("glossary_entries","id", $entry); + if ( $entry->sourceglossaryid ) { + $entry->glossaryid = $entry->sourceglossaryid; + $entry->sourceglossaryid = 0; if (! update_record("glossary_entries", $entry)) { error("Could not update your glossary"); - } - } else { - glossary_delete_old_attachments($entry->id); - delete_records("glossary_entries","id", $entry->id); - } - + } + } else { + if ( $entry->attachment ) { + glossary_delete_old_attachments($entry->id); + } + delete_records("glossary_entries","id", $entry->id); + } + print_simple_box_start("center","40%", "#FFBBBB"); - echo "
| ";
+
+ echo " "; + $count = count_records("glossary_comments","entryid",$entry->id); if ($count) { echo "id&eid=$entry->id\">$count "; @@ -245,18 +245,15 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview } else { print_string("comments", "glossary"); } - echo ""; + echo " "; } - echo " | "; - echo " | ";
if ( $glossary->allowcomments ) {
echo "id&eid=$entry->id\"> |