Línea 67... |
Línea 67... |
67 |
}
|
67 |
}
|
68 |
$formats = get_list_of_plugins('mod/glossary/formats'); // Check format
|
68 |
$formats = get_list_of_plugins('mod/glossary/formats'); // Check format
|
69 |
if (!in_array($data->displayformat, $formats)) {
|
69 |
if (!in_array($data->displayformat, $formats)) {
|
70 |
$data->displayformat = 'dictionary';
|
70 |
$data->displayformat = 'dictionary';
|
71 |
}
|
71 |
}
|
- |
|
72 |
if (!empty($data->globalglossary) && !has_capability('mod/glossary:manageentries', context_system::instance())) {
|
- |
|
73 |
$data->globalglossary = 0;
|
- |
|
74 |
}
|
72 |
if (!empty($data->mainglossary) and $data->mainglossary == 1 and
|
75 |
if (!empty($data->mainglossary) and $data->mainglossary == 1 and
|
73 |
$DB->record_exists('glossary', array('mainglossary' => 1, 'course' => $this->get_courseid()))) {
|
76 |
$DB->record_exists('glossary', array('mainglossary' => 1, 'course' => $this->get_courseid()))) {
|
74 |
// Only allow one main glossary in the course
|
77 |
// Only allow one main glossary in the course
|
75 |
$data->mainglossary = 0;
|
78 |
$data->mainglossary = 0;
|
76 |
}
|
79 |
}
|