mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
MDL-83152 mod_glossary: fix chronological sorting of pending entries.
This commit is contained in:
parent
a2653cc924
commit
77ecfb747d
1 changed files with 18 additions and 15 deletions
|
@ -1835,7 +1835,7 @@ function glossary_print_approval_menu($cm, $glossary,$mode, $hook, $sortkey = ''
|
||||||
|
|
||||||
glossary_print_all_links($cm, $glossary, $mode, $hook);
|
glossary_print_all_links($cm, $glossary, $mode, $hook);
|
||||||
|
|
||||||
glossary_print_sorting_links($cm, $mode, 'CREATION', 'asc');
|
glossary_print_sorting_links($cm, $mode, $sortkey, $sortorder);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param object $cm
|
* @param object $cm
|
||||||
|
@ -2057,9 +2057,14 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
|
||||||
$bopen = '<b>';
|
$bopen = '<b>';
|
||||||
$bclose = '</b>';
|
$bclose = '</b>';
|
||||||
|
|
||||||
$neworder = '';
|
$neworder = '';
|
||||||
$currentorder = '';
|
$currentorder = '';
|
||||||
$currentsort = '';
|
$currentsort = '';
|
||||||
|
|
||||||
|
if ($sortkey === '') {
|
||||||
|
$sortkey = 'CREATION';
|
||||||
|
}
|
||||||
|
|
||||||
if ( $sortorder ) {
|
if ( $sortorder ) {
|
||||||
if ( $sortorder == 'asc' ) {
|
if ( $sortorder == 'asc' ) {
|
||||||
$currentorder = $asc;
|
$currentorder = $asc;
|
||||||
|
@ -2082,20 +2087,18 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
|
||||||
$icon = " " . $OUTPUT->pix_icon('asc', $newordertitle, 'glossary');
|
$icon = " " . $OUTPUT->pix_icon('asc', $newordertitle, 'glossary');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ficon = '';
|
|
||||||
$fneworder = '';
|
|
||||||
$fbtag = '';
|
|
||||||
$fendbtag = '';
|
|
||||||
|
|
||||||
$sicon = '';
|
$ficon = '';
|
||||||
$sneworder = '';
|
$fneworder = '';
|
||||||
|
|
||||||
$sbtag = '';
|
$sicon = '';
|
||||||
$fbtag = '';
|
$sneworder = '';
|
||||||
$fendbtag = '';
|
|
||||||
$sendbtag = '';
|
|
||||||
|
|
||||||
$sendbtag = '';
|
$sbtag = '';
|
||||||
|
$fbtag = '';
|
||||||
|
$fendbtag = '';
|
||||||
|
|
||||||
|
$sendbtag = '';
|
||||||
|
|
||||||
if ( $sortkey == 'CREATION' or $sortkey == 'FIRSTNAME' ) {
|
if ( $sortkey == 'CREATION' or $sortkey == 'FIRSTNAME' ) {
|
||||||
$ficon = $icon;
|
$ficon = $icon;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue