3 require_once("../../config.php");
4 require_once("lib.php");
6 $id = required_param('id', PARAM_INT
); // Course Module ID
8 $mode= optional_param('mode', '', PARAM_ALPHA
); // term entry cat date letter search author approval
9 $hook= optional_param('hook', '', PARAM_CLEAN
); // the term, entry, cat, etc... to look for based on mode
10 $cat = optional_param('cat',0, PARAM_ALPHANUM
);
12 if (! $cm = get_coursemodule_from_id('glossary', $id)) {
13 error("Course Module ID was incorrect");
16 if (! $course = get_record("course", "id", $cm->course
)) {
17 error("Course is misconfigured");
20 if (! $glossary = get_record("glossary", "id", $cm->instance
)) {
21 error("Course module is incorrect");
24 require_login($course->id
, false, $cm);
26 $context = get_context_instance(CONTEXT_MODULE
, $cm->id
);
27 require_capability('mod/glossary:export', $context);
29 $strglossaries = get_string("modulenameplural", "glossary");
30 $strglossary = get_string("modulename", "glossary");
31 $strallcategories = get_string("allcategories", "glossary");
32 $straddentry = get_string("addentry", "glossary");
33 $strnoentries = get_string("noentries", "glossary");
34 $strsearchconcept = get_string("searchconcept", "glossary");
35 $strsearchindefinition = get_string("searchindefinition", "glossary");
36 $strsearch = get_string("search");
37 $strexportfile = get_string("exportfile", "glossary");
38 $strexportentries = get_string('exportentries', 'glossary');
40 $navigation = build_navigation('', $cm);
41 print_header_simple(format_string($glossary->name
), "",$navigation,
42 "", "", true, update_module_button($cm->id
, $course->id
, $strglossary),
43 navmenu($course, $cm));
45 print_heading($strexportentries);
47 print_box_start('glossarydisplay generalbox');
49 <form action
="exportfile.php" method
="post">
50 <table border
="0" cellpadding
="6" cellspacing
="6" width
="100%">
51 <tr
><td align
="center">
52 <input type
="submit" value
="<?php p($strexportfile)?>" />
55 <input type
="hidden" name
="id" value
="<?php p($id)?>" />
56 <input type
="hidden" name
="cat" value
="<?php p($cat)?>" />
61 print_footer($course);