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 Jan 17, 2025
1 parent e6c92dc commit 0784519
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 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 @@ -2056,9 +2056,14 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
$bopen = '<b>';
$bclose = '</b>';

$neworder = '';
$currentorder = '';
$currentsort = '';
$neworder = '';
$currentorder = '';
$currentsort = '';

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

if ( $sortorder ) {
if ( $sortorder == 'asc' ) {
$currentorder = $asc;
Expand All @@ -2081,20 +2086,18 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
$icon = " " . $OUTPUT->pix_icon('asc', $newordertitle, 'glossary');
}
}
$ficon = '';
$fneworder = '';
$fbtag = '';
$fendbtag = '';

$sicon = '';
$sneworder = '';
$ficon = '';
$fneworder = '';

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

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

$sendbtag = '';
$sendbtag = '';

if ( $sortkey == 'CREATION' or $sortkey == 'FIRSTNAME' ) {
$ficon = $icon;
Expand Down

0 comments on commit 0784519

Please sign in to comment.