Created
November 27, 2015 12:02
-
-
Save davidscotson/67d3ee184c87daad48c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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