* @return string HTML code
*/
protected function participant(stdclass $allocation, array $userinfo) {
- $o = $this->output->user_picture($userinfo[$allocation->userid], $this->page->course->id);
+ $o = $this->output->user_picture($userinfo[$allocation->userid], array('courseid' => $this->page->course->id));
$o .= fullname($userinfo[$allocation->userid]);
$o .= $this->output->container_start(array('submission'));
if (is_null($allocation->submissionid)) {
$o .= $this->output->output_start_tag('ul', array());
foreach ($allocation->reviewedby as $reviewerid => $assessmentid) {
$o .= $this->output->output_start_tag('li', array());
- $allocationpic = new moodle_user_picture();
- $allocationpic->user = $userinfo[$reviewerid];
- $allocationpic->courseid = $this->page->course->id;
- $allocationpic->size = 16;
- $o .= $this->output->user_picture($allocationpic);
+ $o .= $this->output->user_picture($userinfo[$reviewerid], array('courseid' => $this->page->course->id, 'size' => 16));
$o .= fullname($userinfo[$reviewerid]);
// delete icon
$o .= $this->output->output_start_tag('ul', array());
foreach ($allocation->reviewerof as $authorid => $assessmentid) {
$o .= $this->output->output_start_tag('li', array());
- $allocationpic = new moodle_user_picture();
- $allocationpic->user = $userinfo[$authorid];
- $allocationpic->courseid = $this->page->course->id;
- $allocationpic->size = 16;
- $o .= $this->output->user_picture($allocationpic, $this->page->course->id);
+ $o .= $this->output->user_picture($userinfo[$authorid], array('courseid' => $this->page->course->id, 'size' => 16));
$o .= fullname($userinfo[$authorid]);
// delete icon
$author->lastname = $submission->authorlastname;
$author->picture = $submission->authorpicture;
$author->imagealt = $submission->authorimagealt;
- $userpic = new moodle_user_picture();
- $userpic->user = $author;
- $userpic->courseid = $this->page->course->id;
- $userpic->url = true;
- $userpic->size = 35;
- $userpic = $this->output->user_picture($userpic);
+ $userpic = $this->output->user_picture($author, array('courseid' => $this->page->course->id, 'size' => 35));
$userurl = new moodle_url($CFG->wwwroot . '/user/view.php',
array('id' => $author->id, 'course' => $this->page->course->id));
$a = new stdclass();
$author->lastname = $submission->authorlastname;
$author->picture = $submission->authorpicture;
$author->imagealt = $submission->authorimagealt;
- $userpic = new moodle_user_picture();
- $userpic->user = $author;
- $userpic->courseid = $this->page->course->id;
- $userpic->url = true;
- $userpic->size = 64;
- $userpic = $this->output->user_picture($userpic);
+ $userpic = $this->output->user_picture($author, array('courseid' => $this->page->course->id, 'size' => 64));
$userurl = new moodle_url($CFG->wwwroot . '/user/view.php',
array('id' => $author->id, 'course' => $this->page->course->id));
$a = new stdclass();
*/
protected function grading_report_participant(stdclass $participant, array $userinfo) {
$userid = $participant->userid;
- $pic = new moodle_user_picture();
- $pic->user = $userinfo[$userid];
- $pic->courseid = $this->page->course->id;
- $pic->url = true;
- $pic->size = 35;
-
- $out = $this->output->user_picture($pic);
- $out .= $this->output->output_tag('span', '', fullname($userinfo[$userid]));
+ $out = $this->output->user_picture($userinfo[$userid], array('courseid' => $this->page->course->id, 'size' => 35));
+ $out .= $this->output->output_tag('span', array(), fullname($userinfo[$userid]));
return $out;
}
if ($shownames) {
$userid = $assessment->userid;
- $pic = new moodle_user_picture();
- $pic->user = $userinfo[$userid];
- $pic->courseid = $this->page->course->id;
- $pic->url = true;
- $pic->size = 16;
-
- $name = $this->output->user_picture($pic);
- $name .= $this->output->output_tag('span', array('class' => 'fullname'), fullname($userinfo[$userid]));
- $name = $separator . $this->output->output_tag('span', array('class' => 'user'), $name);
+ $name = $this->output->user_picture($userinfo[$userid], array('courseid' => $this->page->course->id, 'size' => 16));
+ $name .= $this->output->output_tag('span', array('class' => 'fullname'), fullname($userinfo[$userid]));
+ $name = $separator . $this->output->output_tag('span', array('class' => 'user'), $name);
} else {
- $name = '';
+ $name = '';
}
return $this->output->container($grade . $name, 'assessmentdetails');