Fixing display of pivots when they are author names

Merged from MOODLE_17_STABLE
This commit is contained in:
stronk7
2006-10-30 19:32:44 +00:00
parent e24d96baf6
commit 8451166cfb
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -167,7 +167,7 @@
$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);
+2 -1
View 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)
@@ -268,5 +268,6 @@
if ( $offset >= 0 ) {
$limitnum = $entriesbypage;
}
$allentries = get_records_sql("$sqlselect $sqlfrom $sqlwhere $sqlorderby", $limitfrom, $limitnum);
?>
+1 -1
View File
@@ -354,7 +354,7 @@
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">';