$vars['entity']->guid, 'count' => true, )); $closed = tasks_get_entities(array( 'list_guid' => $vars['entity']->guid, 'status' => 'closed', 'count' => true, )); $total_link = $entity->getURL()."#all"; // Closed tasks aren't contabilized in graph. $total -= $closed; $done = tasks_get_entities(array( 'list_guid' => $vars['entity']->guid, 'status' => 'done', 'count' => true, )); $remaining = $total - $done; $remaining_link = $entity->getURL()."#remaining"; $assigned = tasks_get_entities(array( 'list_guid' => $vars['entity']->guid, 'status' => array('assigned', 'active'), 'count' => true, )); $assigned_link = $entity->getURL()."#assigned"; $active = tasks_get_entities(array( 'list_guid' => $vars['entity']->guid, 'status' => 'active', 'count' => true, )); $active_link = $entity->getURL()."#active"; if ($total == 0) { $percent = 0; } else { $percent = $done / $total * 100; } ?>
 
' . elgg_echo('tasks:lists:graph:total', array($total)) . ', '; echo '' . elgg_echo('tasks:lists:graph:remaining', array($remaining)) . ', '; echo '' . elgg_echo('tasks:lists:graph:assigned', array($assigned)) . ', '; echo '' . elgg_echo('tasks:lists:graph:active', array($active)) . ''; ?>