mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 03:46:42 +02:00
MDL-78579 mod_glossary: show approval pending count in navigation.
This commit is contained in:
parent
a1d5d1b2f7
commit
24ce2bb86f
4 changed files with 3 additions and 3 deletions
|
@ -280,6 +280,7 @@ $string['page-mod-glossary-x'] = 'Any glossary module page';
|
|||
$string['page-mod-glossary-edit'] = 'Glossary add/edit entry page';
|
||||
$string['page-mod-glossary-view'] = 'View glossary edit page';
|
||||
$string['pendingapproval'] = 'Pending approval';
|
||||
$string['pendingapprovalcount'] = 'Pending approval ({$a})';
|
||||
$string['pluginadministration'] = 'Glossary administration';
|
||||
$string['pluginname'] = 'Glossary';
|
||||
$string['popupformat'] = 'Popup format';
|
||||
|
|
|
@ -3167,7 +3167,7 @@ function glossary_extend_settings_navigation(settings_navigation $settings, navi
|
|||
// Safe guard check - Ideally, there shouldn't be any hidden entries if the glossary has 'defaultapproval'.
|
||||
if (has_capability('mod/glossary:approve', $settings->get_page()->cm->context) &&
|
||||
(!$glossary->defaultapproval || $hiddenentries)) {
|
||||
$glossarynode->add(get_string('pendingapproval', 'glossary'),
|
||||
$glossarynode->add(get_string('pendingapprovalcount', 'glossary', $hiddenentries),
|
||||
new moodle_url('/mod/glossary/view.php', ['id' => $settings->get_page()->cm->id, 'mode' => 'approval']),
|
||||
navigation_node::TYPE_CUSTOM, null, 'pendingapproval');
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ Feature: A teacher can choose whether glossary entries require approval
|
|||
And I log out
|
||||
# Approve the entry.
|
||||
And I am on the "Test glossary name" "glossary activity" page logged in as teacher1
|
||||
And I follow "Pending approval"
|
||||
And I follow "Pending approval (1)"
|
||||
Then I should see "(this entry is currently hidden)"
|
||||
And I follow "Approve"
|
||||
And I am on the "Test glossary name" "glossary activity" page
|
||||
|
|
|
@ -295,7 +295,6 @@ if (!empty($CFG->enablerssfeeds) && !empty($CFG->glossary_enablerssfeeds)
|
|||
}
|
||||
if ($tab == GLOSSARY_APPROVAL_VIEW) {
|
||||
require_capability('mod/glossary:approve', $context);
|
||||
$PAGE->navbar->add($strwaitingapproval);
|
||||
}
|
||||
|
||||
$hassecondary = $PAGE->has_secondary_navigation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue