]> git.mjollnir.org Git - moodle.git/commitdiff
Fixing display of pivots when they are author names
authorstronk7 <stronk7>
Mon, 30 Oct 2006 19:32:44 +0000 (19:32 +0000)
committerstronk7 <stronk7>
Mon, 30 Oct 2006 19:32:44 +0000 (19:32 +0000)
Merged from MOODLE_17_STABLE

mod/glossary/print.php
mod/glossary/sql.php
mod/glossary/view.php

index 3fb99a46ade7b373961f7feabf07db0483b77cdf..e3745d3a87f1b2652bfe67eaec4f52456ccf6681 100644 (file)
                     $currentpivot = $upperpivot;
 
                     $pivottoshow = $currentpivot;
-                    if ( isset($entry->userid) ) {
+                    if ( isset($entry->userispivot) ) {
                         // printing the user icon if defined (only when browsing authors)
                         $user = get_record("user","id",$entry->userid);
                         $pivottoshow = fullname($user);
index b24f6140529200cf8c817591dfc53b56585e33d6..c78ed29dc81c0b5d06ca87d3cd701b51c9efc4fe 100644 (file)
@@ -91,7 +91,7 @@
             $where = '';
         }
 
-        $sqlselect  = "SELECT ge.*, $usernamefield AS glossarypivot ";
+        $sqlselect  = "SELECT ge.*, $usernamefield AS glossarypivot, 1 AS userispivot ";
         $sqlfrom    = "FROM {$CFG->prefix}glossary_entries ge, {$CFG->prefix}user u";
         $sqlwhere   = "WHERE ge.userid = u.id  AND
                              (ge.approved != 0 $userid)
     if ( $offset >= 0 ) {
         $limitnum = $entriesbypage;
     }
+
     $allentries = get_records_sql("$sqlselect $sqlfrom $sqlwhere $sqlorderby", $limitfrom, $limitnum);
 ?>
index 1df6a5a70ac8531633694a90eb7472c00cf970db..cfd401e931f7dc3ac86d3a15dbc9b717b21a21f6 100644 (file)
 
                     echo '<tr>';
                     $pivottoshow = $currentpivot;
-                    if ( isset($entry->userid) ) {
+                    if ( isset($entry->userispivot) ) {
                     // printing the user icon if defined (only when browsing authors)
                         echo '<td align="left">';