Replacing deprecated print_user_picture()

This commit is contained in:
David Mudrak
2010-01-04 17:50:13 +00:00
parent c1e883bb04
commit e05160733e
2 changed files with 3 additions and 5 deletions
@@ -200,8 +200,6 @@ class workshop_manual_allocator implements workshop_allocator {
$peer[$currentuserid]->lastname = $allocation->authorlastname;
$peer[$currentuserid]->picture = $allocation->authorpicture;
$peer[$currentuserid]->imagealt = $allocation->authorimagealt;
$peer[$currentuserid]->avatar = print_user_picture($peer[$currentuserid],
$this->workshop->course, null, 16, true);
$peer[$currentuserid]->submissionid = $allocation->submissionid;
$peer[$currentuserid]->submissiontitle = $allocation->submissiontitle;
$peer[$currentuserid]->submissiongrade = $allocation->submissiongrade;
+3 -3
View File
@@ -99,7 +99,7 @@ class moodle_mod_workshop_allocation_manual_renderer extends moodle_renderer_bas
* @return string HTML code
*/
protected function participant(stdClass $user) {
$o = print_user_picture($user, $this->page->course->id, null, 35, true);
$o = $this->output->user_picture($user, $this->page->course->id);
$o .= fullname($user);
$o .= $this->output->container_start(array('submission'));
if (is_null($user->submissionid)) {
@@ -144,7 +144,7 @@ class moodle_mod_workshop_allocation_manual_renderer extends moodle_renderer_bas
$o .= $this->output->output_start_tag('ul', array());
foreach ($user->reviewedby as $reviewerid => $assessmentid) {
$o .= $this->output->output_start_tag('li', array());
$o .= print_user_picture($peers[$reviewerid], $this->page->course->id, null, 16, true);
$o .= $this->output->user_picture($peers[$reviewerid], $this->page->course->id); // todo display smaller
$o .= fullname($peers[$reviewerid]);
$handler = $this->page->url->out_action(array('mode' => 'del', 'what' => $assessmentid));
@@ -182,7 +182,7 @@ class moodle_mod_workshop_allocation_manual_renderer extends moodle_renderer_bas
$o .= $this->output->output_start_tag('ul', array());
foreach ($user->reviewerof as $authorid => $assessmentid) {
$o .= $this->output->output_start_tag('li', array());
$o .= print_user_picture($peers[$authorid], $this->page->course->id, null, 16, true);
$o .= $this->output->user_picture($peers[$authorid], $this->page->course->id); // todo display smaller
$o .= fullname($peers[$authorid]);
// delete