MDL-49231 mod_glossary: Invalid pivot when printing entries
authorFrederic Massart <fred@moodle.com>
Wed, 6 Jan 2016 03:15:56 +0000 (11:15 +0800)
committerFrederic Massart <fred@moodle.com>
Wed, 6 Jan 2016 03:15:56 +0000 (11:15 +0800)
mod/glossary/print.php

index 145cabc..de51683 100644 (file)
@@ -190,11 +190,7 @@ if ( $allentries ) {
         // Setting the pivot for the current entry.
         if ($printpivot) {
 
-           if ($userispivot) {
-                $pivot = $entry->userid;
-            } else {
-                $pivot = $pivotfn($entry);
-            }
+            $pivot = $entry->{$pivotkey};
             $upperpivot = core_text::strtoupper($pivot);
             $pivottoshow = core_text::strtoupper(format_string($pivot, true, $fmtoptions));