Improve active project in sidebar

This commit is contained in:
Eike Foken
2011-09-15 02:37:40 +02:00
parent 08e5048e20
commit b9ee743f9d
2 changed files with 47 additions and 23 deletions

View File

@@ -143,16 +143,13 @@ class Project extends CI_Model {
}
/**
* Get all available configurations from a specific project.
* Counts all experiments for the specified project.
*
* @param array $project_id The project to get the configuration from.
* @param string $projectId
* @return integer
*/
public function getConfigurations($project_id) {
$query = $this->db->get_where('configurations', array('project_id' => $project_id));
$configurations = $query->result_array();
return $configurations;
public function countExperiments($projectId) {
return $this->db->get_where('experiments', array('project_id' => $projectId))->num_rows();
}
/**