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');
41 $navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
42 $navlinks[] = array('name' => format_string($glossary->name
), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
44 $navigation = build_navigation($navlinks);
46 print_header_simple(format_string($glossary->name
), "",$navigation,
47 "", "", true, update_module_button($cm->id
, $course->id
, $strglossary),
48 navmenu($course, $cm));
50 print_heading($strexportentries);
52 print_box_start('glossarydisplay generalbox');
54 <form action
="exportfile.php" method
="post">
55 <table border
="0" cellpadding
="6" cellspacing
="6" width
="100%">
56 <tr
><td align
="center">
57 <input type
="submit" value
="<?php p($strexportfile)?>" />
60 <input type
="hidden" name
="id" value
="<?php p($id)?>" />
61 <input type
="hidden" name
="cat" value
="<?php p($cat)?>" />
66 print_footer($course);