Skip to content

Commit

Permalink
Merge branch 'MDL-42613_master' of https://github.com/markn86/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Nov 5, 2013
2 parents 48bde0e + 1b377fa commit bd706fb
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions group/members.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,25 +99,40 @@
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('adduserstogroup', 'group').": $groupname", 3);

/// Print group info - TODO: remove tables for layout here
$groupinfotable = new html_table();
$groupinfotable->attributes['class'] = 'groupinfobox';
$picturecell = new html_table_cell();
$picturecell->attributes['class'] = 'left side picture';
$picturecell->text = print_group_picture($group, $course->id, true, true, false);

$contentcell = new html_table_cell();
$contentcell->attributes['class'] = 'content';
// Store the rows we want to display in the group info.
$groupinforow = array();

// Check if there is a picture to display.
if (!empty($group->picture)) {
$picturecell = new html_table_cell();
$picturecell->attributes['class'] = 'left side picture';
$picturecell->text = print_group_picture($group, $course->id, true, true, false);
$groupinforow[] = $picturecell;
}

// Check if there is a description to display.
$group->description = file_rewrite_pluginfile_urls($group->description, 'pluginfile.php', $context->id, 'group', 'description', $group->id);
if (!isset($group->descriptionformat)) {
$group->descriptionformat = FORMAT_MOODLE;
if (!empty($group->description)) {
if (!isset($group->descriptionformat)) {
$group->descriptionformat = FORMAT_MOODLE;
}

$options = new stdClass;
$options->overflowdiv = true;

$contentcell = new html_table_cell();
$contentcell->attributes['class'] = 'content';
$contentcell->text = format_text($group->description, $group->descriptionformat, $options);
$groupinforow[] = $contentcell;
}

// Check if we have something to show.
if (!empty($groupinforow)) {
$groupinfotable = new html_table();
$groupinfotable->attributes['class'] = 'groupinfobox';
$groupinfotable->data[] = new html_table_row($groupinforow);
echo html_writer::table($groupinfotable);
}
$options = new stdClass;
$options->overflowdiv = true;
$contentcell->text = format_text($group->description, $group->descriptionformat, $options);
$groupinfotable->data[] = new html_table_row(array($picturecell, $contentcell));
echo html_writer::table($groupinfotable);

/// Print the editing form
?>
Expand Down

0 comments on commit bd706fb

Please sign in to comment.