mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
fix for printing of multiple group pictures bug #5548; merged from MOODLE_16_STABLE
This commit is contained in:
parent
e0ce2e1ca4
commit
fdcd0f0566
1 changed files with 14 additions and 1 deletions
|
@ -2857,7 +2857,7 @@ function print_user($user, $course, $messageselect=false) {
|
||||||
/**
|
/**
|
||||||
* Print a specified group's avatar.
|
* Print a specified group's avatar.
|
||||||
*
|
*
|
||||||
* @param group $group A {@link group} object representing a group
|
* @param group $group A {@link group} object representing a group or array of groups
|
||||||
* @param int $courseid ?
|
* @param int $courseid ?
|
||||||
* @param boolean $large ?
|
* @param boolean $large ?
|
||||||
* @param boolean $returnstring ?
|
* @param boolean $returnstring ?
|
||||||
|
@ -2868,6 +2868,19 @@ function print_user($user, $course, $messageselect=false) {
|
||||||
function print_group_picture($group, $courseid, $large=false, $returnstring=false, $link=true) {
|
function print_group_picture($group, $courseid, $large=false, $returnstring=false, $link=true) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
|
|
||||||
|
if (is_array($group)) {
|
||||||
|
$output = '';
|
||||||
|
foreach($group as $g) {
|
||||||
|
$output .= print_group_picture($g, $courseid, $large, true, $link);
|
||||||
|
}
|
||||||
|
if ($returnstring) {
|
||||||
|
return $output;
|
||||||
|
} else {
|
||||||
|
echo $output;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static $isteacheredit;
|
static $isteacheredit;
|
||||||
|
|
||||||
if (!isset($isteacheredit)) {
|
if (!isset($isteacheredit)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue