libdir.'/adminlib.php'); require_once("lib.php"); $id = required_param('id', PARAM_INT); $mode = optional_param('mode'); admin_externalpage_setup('managemodules'); // this is hacky, tehre should be a special hidden page for it if ( !$displayformat = get_record("glossary_formats","id",$id) ) { error ("Invalid Glossary Format"); } $form = data_submitted(); if ( $mode == 'visible' and confirm_sesskey()) { if ( $displayformat ) { if ( $displayformat->visible ) { $displayformat->visible = 0; } else { $displayformat->visible = 1; } update_record("glossary_formats",$displayformat); } redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=modsettingglossary#glossary_formats_header"); die; } elseif ( $mode == 'edit' and $form and confirm_sesskey()) { $displayformat->popupformatname = $form->popupformatname; $displayformat->showgroup = $form->showgroup; $displayformat->defaultmode = $form->defaultmode; $displayformat->defaulthook = $form->defaulthook; $displayformat->sortkey = $form->sortkey; $displayformat->sortorder = $form->sortorder; update_record("glossary_formats",$displayformat); redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=modsettingglossary#glossary_formats_header"); die; } $strmodulename = get_string("modulename", "glossary"); $strdisplayformats = get_string("displayformats","glossary"); admin_externalpage_print_header(); print_heading($strmodulename . ': ' . get_string("displayformats","glossary")); print_simple_box("
".get_string("configwarning", 'admin')."
", "center", "60%"); echo "
"; $yes = get_string("yes"); $no = get_string("no"); echo '
'; echo ''; ?> '; print_footer(); ?>
name,'glossary'); ?>
name] = get_string("displayformat$format->name", "glossary"); } //Sort it asort($formats); choose_from_menu($formats,'popupformatname',$displayformat->popupformatname); ?>









:

" />