3 defined('MOODLE_INTERNAL') ||
die;
5 if ($ADMIN->fulltree
) {
6 require_once($CFG->dirroot
.'/mod/glossary/lib.php');
8 $settings->add(new admin_setting_heading('glossary_normal_header', get_string('glossaryleveldefaultsettings', 'glossary'), ''));
10 $settings->add(new admin_setting_configtext('glossary_entbypage', get_string('entbypage', 'glossary'),
11 get_string('entbypage', 'glossary'), 10, PARAM_INT
));
14 $settings->add(new admin_setting_configcheckbox('glossary_dupentries', get_string('allowduplicatedentries', 'glossary'),
15 get_string('cnfallowdupentries', 'glossary'), 0));
17 $settings->add(new admin_setting_configcheckbox('glossary_allowcomments', get_string('allowcomments', 'glossary'),
18 get_string('cnfallowcomments', 'glossary'), 0));
20 $settings->add(new admin_setting_configcheckbox('glossary_linkbydefault', get_string('usedynalink', 'glossary'),
21 get_string('cnflinkglossaries', 'glossary'), 1));
23 $settings->add(new admin_setting_configcheckbox('glossary_defaultapproval', get_string('defaultapproval', 'glossary'),
24 get_string('cnfapprovalstatus', 'glossary'), 1));
27 if (empty($CFG->enablerssfeeds
)) {
28 $options = array(0 => get_string('rssglobaldisabled', 'admin'));
29 $str = get_string('configenablerssfeeds', 'glossary').'<br />'.get_string('configenablerssfeedsdisabled2', 'admin');
32 $options = array(0=>get_string('no'), 1=>get_string('yes'));
33 $str = get_string('configenablerssfeeds', 'glossary');
35 $settings->add(new admin_setting_configselect('glossary_enablerssfeeds', get_string('enablerssfeeds', 'admin'),
39 $settings->add(new admin_setting_heading('glossary_levdev_header', get_string('entryleveldefaultsettings', 'glossary'), ''));
41 $settings->add(new admin_setting_configcheckbox('glossary_linkentries', get_string('usedynalink', 'glossary'),
42 get_string('cnflinkentry', 'glossary'), 0));
44 $settings->add(new admin_setting_configcheckbox('glossary_casesensitive', get_string('casesensitive', 'glossary'),
45 get_string('cnfcasesensitive', 'glossary'), 0));
47 $settings->add(new admin_setting_configcheckbox('glossary_fullmatch', get_string('fullmatch', 'glossary'),
48 get_string('cnffullmatch', 'glossary'), 0));
51 //Update and get available formats
52 $recformats = glossary_get_available_formats();
55 foreach ($recformats as $format) {
56 $formats[$format->id
] = get_string("displayformat$format->name", "glossary");
61 foreach ($formats as $formatid=>$formatname) {
62 $recformat = $DB->get_record('glossary_formats', array('id'=>$formatid));
64 $str .= '<td>' . $formatname . '</td>';
65 $eicon = "<a title=\"".get_string("edit")."\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=edit\">";
66 $eicon .= $OUTPUT->pix_icon('t/edit', get_string('edit')). "</a>";
67 if ( $recformat->visible
) {
68 $vtitle = get_string("hide");
71 $vtitle = get_string("show");
74 $url = "$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=visible&sesskey=".sesskey();
75 $viconlink = "<a title=\"$vtitle\" href=\"$url\">";
76 $viconlink .= $OUTPUT->pix_icon($vicon, $vtitle) . "</a>";
78 $str .= '<td align="center">' . $eicon . ' ' . $viconlink . '</td>';
83 $settings->add(new admin_setting_heading('glossary_formats_header', get_string('displayformatssetup', 'glossary'), $str));