Fixing display of pivots when they are author names
Merged from MOODLE_17_STABLE
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
?>
|
||||
|
||||
@@ -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">';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user