public function getDiagGroup($this_evidence_id, $active_project)
{
// Get the diagnosticity. Both variables are objects.
$total_diag = 0;
$all_users = implode(",", $active_project->users);
$all_hypotheses = implode(",", $active_project->hypotheses);
$results = mysql_fast("SELECT * FROM ratings WHERE evidence_id='{$this_evidence_id}' AND hypothesis_id IN ( {$all_hypotheses} ) AND user_id IN ( {$all_users} )");
for ($k = 0; $k < count($results); $k++) {
$total_diag += getHypoRatingScore($results[$k]['rating']);
}
return $total_diag * -1;
//multiple by -1 so that most diagnostic evidence appears at top upon sort
}