course)) { error("Course is misconfigured"); } require_login($course->id); if (isguest()) { error("Guests are not allowed to edit ir delete entries", $_SERVER["HTTP_REFERER"]); } if (! $glossary = get_record("glossary", "id", $cm->instance)) { error("Glossary is incorrect"); } $entryfields = get_record("glossary_entries", "id", $entry); $strareyousuredelete = get_string("areyousuredelete","glossary"); if ($course->category) { $navigation = "id\">$course->shortname ->"; } print_header("$course->shortname: $glossary->name", "$course->fullname", "$navigation id>$strglossaries -> $glossary->name", "", "", true, update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm)); /// If data submitted, then process and store. if ($mode == "edit" or $mode == "delete" ) { echo "

"; if ( isteacher($cm->id) or $glossary->studentcanpost ) { if ($go) { // the operation was confirmed. if ( $mode == "delete") { glossary_delete_old_attachments($entry); delete_records("glossary_entries","id", $entry); print_simple_box_start("center","40%", "#FFBBBB"); echo "

$entrydeleted"; //CAMBIAR echo "
"; print_simple_box_end(); } print_footer($course); add_to_log($course->id, "glossary", "delete entry", "view.php?id=$cm->id¤tview=$currentview&cat=$cat", $entry); redirect("view.php?id=$cm->id¤tview=$currentview&cat=$cat"); } else { // the operation has not been confirmed yet so ask the user to do so if ( $mode == "delete") { print_simple_box_start("center","40%", "#FFBBBB"); echo "
$entryfields->concept
$strareyousuredelete"; ?>
> > "> " onclick="javascript:history.go(-1);">