Merge branch '44158-27' of git://github.com/samhemelryk/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 17 Feb 2014 06:48:01 +0000 (14:48 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 17 Feb 2014 06:48:01 +0000 (14:48 +0800)
1  2 
mod/glossary/lib.php

diff --combined mod/glossary/lib.php
@@@ -19,7 -19,7 +19,7 @@@
   * Library of functions and constants for module glossary
   * (replace glossary with the name of your module and delete this line)
   *
-  * @package   mod-glossary
+  * @package   mod_glossary
   * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
   */
@@@ -364,7 -364,7 +364,7 @@@ function glossary_get_recent_mod_activi
      $params['timestart'] = $timestart;
      $params['glossaryid'] = $cm->instance;
  
 -    $ufields = user_picture::fields('u', array('lastaccess', 'firstname', 'lastname', 'email', 'picture', 'imagealt'));
 +    $ufields = user_picture::fields('u');
      $entries = $DB->get_records_sql("
                SELECT ge.id AS entryid, ge.*, $ufields
                  FROM {glossary_entries} ge
          }
  
          $tmpactivity                       = new stdClass();
 +        $tmpactivity->user = username_load_fields_from_object(new stdClass(), $entry, null,
 +                explode(',', user_picture::fields()));
 +        $tmpactivity->user->fullname       = fullname($tmpactivity->user, $viewfullnames);
          $tmpactivity->type                 = 'glossary';
          $tmpactivity->cmid                 = $cm->id;
          $tmpactivity->glossaryid           = $entry->glossaryid;
          $tmpactivity->content->entryid     = $entry->entryid;
          $tmpactivity->content->concept     = $entry->concept;
          $tmpactivity->content->definition  = $entry->definition;
 -        $tmpactivity->user                 = new stdClass();
 -        $tmpactivity->user->id             = $entry->userid;
 -        $tmpactivity->user->firstname      = $entry->firstname;
 -        $tmpactivity->user->lastname       = $entry->lastname;
 -        $tmpactivity->user->fullname       = fullname($entry, $viewfullnames);
 -        $tmpactivity->user->picture        = $entry->picture;
 -        $tmpactivity->user->imagealt       = $entry->imagealt;
 -        $tmpactivity->user->email          = $entry->email;
  
          $activities[$index++] = $tmpactivity;
      }