diff --git a/mod/glossary/print.php b/mod/glossary/print.php index c50038d9ed4af..3fb99a46ade7b 100644 --- a/mod/glossary/print.php +++ b/mod/glossary/print.php @@ -167,9 +167,9 @@ $currentpivot = $upperpivot; $pivottoshow = $currentpivot; - if ( isset($entry->uid) ) { + if ( isset($entry->userid) ) { // printing the user icon if defined (only when browsing authors) - $user = get_record("user","id",$entry->uid); + $user = get_record("user","id",$entry->userid); $pivottoshow = fullname($user); } diff --git a/mod/glossary/sql.php b/mod/glossary/sql.php index 2f7cb3781d056..b24f614052920 100644 --- a/mod/glossary/sql.php +++ b/mod/glossary/sql.php @@ -40,7 +40,7 @@ case GLOSSARY_CATEGORY_VIEW: if ($hook == GLOSSARY_SHOW_ALL_CATEGORIES ) { - $sqlselect = "SELECT gec.id, ge.*, gec.entryid, gc.name AS glossarypivot"; + $sqlselect = "SELECT gec.id AS cid, ge.*, gec.entryid, gc.name AS glossarypivot"; $sqlfrom = "FROM {$CFG->prefix}glossary_entries ge, {$CFG->prefix}glossary_entries_categories gec, {$CFG->prefix}glossary_categories gc"; @@ -91,7 +91,7 @@ $where = ''; } - $sqlselect = "SELECT ge.id, $usernamefield AS glossarypivot, u.id as uid, ge.*"; + $sqlselect = "SELECT ge.*, $usernamefield AS glossarypivot "; $sqlfrom = "FROM {$CFG->prefix}glossary_entries ge, {$CFG->prefix}user u"; $sqlwhere = "WHERE ge.userid = u.id AND (ge.approved != 0 $userid) diff --git a/mod/glossary/view.php b/mod/glossary/view.php index be84f4341b0c7..1df6a5a70ac85 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -354,11 +354,11 @@ echo ''; $pivottoshow = $currentpivot; - if ( isset($entry->uid) ) { + if ( isset($entry->userid) ) { // printing the user icon if defined (only when browsing authors) echo ''; - $user = get_record("user","id",$entry->uid); + $user = get_record("user","id",$entry->userid); print_user_picture($user->id, $course->id, $user->picture); $pivottoshow = fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id))); } else { @@ -433,4 +433,4 @@ print_footer($course); -?> \ No newline at end of file +?>