'group', 'owner_guid' => get_loggedin_userid(), 'offset' => 0, 'count' => true)); $my_groups = elgg_get_entities(array('type' => 'group', 'owner_guid' => get_loggedin_userid(), 'offset' => 0, 'limit' => $my_groups_count)); } else { $my_groups_count = get_entities('group', '', get_loggedin_userid(), '', 10, 0, true); $my_groups = get_entities('group', '', get_loggedin_userid(), '', $my_groups_count, 0); } if ($my_groups_count && $my_groups_count > 0) { foreach ($my_groups as $group) { $c .= '

' . $group->name . '

'; $group_members_count = get_group_members($group->getGUID(),10,0,0,true); $group_members = get_group_members($group->getGUID(),$group_members_count); $tasks_count = get_entities_from_relationship("hasTask", $group->getGUID(), false, "object", "task", 0, "", 10, 0, true, 0); $tasks = get_entities_from_relationship("hasTask", $group->getGUID(), false, "object", "task", 0, "", $tasks_count, 0, false, 0); $c .= ''; // Heading $c .= ''; $c .= ''; $c .= ''; $c .= ''; $c .= ''; $c .= ''; // Body $c .= ''; foreach ($group_members as $group_member) { $c .= ''; $c .= ''; $c .= ''; $c .= ''; } $c .= ''; $c .= '
'; $c .= ''; foreach ($tasks as $task) { $c .= 'assignment'; } $c .= '
'; $c .= $group_member->name; $c .= ''; // Check the answers foreach ($tasks as $task) { $answers = get_entities_from_relationship("hasAnswers", $task->getGUID(), false, "object", "blog", $group_member->getGUID(), "", 9999, 0, false, 0); if ($answers && is_array($answers) && sizeof($answers) > 0) { $c .= 'has_answer'; } else { $c .= 'has_no_answer'; } } $c .= '
'; } } // display areas in the page $body = elgg_view_layout("two_column_left_sidebar", '', $c); // display page page_draw($page_title, $body); ?>