Skip to content

Instantly share code, notes, and snippets.

@davidscotson
Created November 27, 2015 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidscotson/67d3ee184c87daad48c3 to your computer and use it in GitHub Desktop.
Save davidscotson/67d3ee184c87daad48c3 to your computer and use it in GitHub Desktop.
public function render_user_picture(user_picture $userpicture) {
$bill = new bill_murray_picture($userpicture->user);
return parent::render_user_picture($bill);
}
}
class bill_murray_picture extends user_picture {
private $numberofbills = 18;
public function get_url(moodle_page $page, renderer_base $renderer = null) {
global $OUTPUT;
$bill = rand(0, $this->numberofbills);
return $OUTPUT->pix_url('bill'.$bill, 'theme');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment