Skip to content

Commit

Permalink
MDL-83152 mod_glossary: fix chronological sorting of pending entries.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Dec 12, 2024
1 parent 0888a6d commit de58cd0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mod/glossary/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,7 @@ function glossary_print_approval_menu($cm, $glossary,$mode, $hook, $sortkey = ''

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
Expand Down Expand Up @@ -2059,6 +2059,11 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
$neworder = '';
$currentorder = '';
$currentsort = '';

if ($sortkey === '') {
$sortkey = 'CREATION';
}

if ( $sortorder ) {
if ( $sortorder == 'asc' ) {
$currentorder = $asc;
Expand All @@ -2083,16 +2088,13 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
}
$ficon = '';
$fneworder = '';
$fbtag = '';
$fendbtag = '';

$sicon = '';
$sneworder = '';

$sbtag = '';
$fbtag = '';
$fendbtag = '';
$sendbtag = '';

$sendbtag = '';

Expand Down

0 comments on commit de58cd0

Please sign in to comment.