diff --git a/application/config/auth.php b/application/config/auth.php index 541f96b..99eb08b 100644 --- a/application/config/auth.php +++ b/application/config/auth.php @@ -1,62 +1,72 @@ 'name', - 'label' => _('Trial name'), + 'label' => _('Name'), 'rules' => 'required|min_length[3]|max_length[60]|trim', ), array( diff --git a/application/controllers/dashboard.php b/application/controllers/dashboard.php index cbeeb22..e1ef901 100644 --- a/application/controllers/dashboard.php +++ b/application/controllers/dashboard.php @@ -1,5 +1,4 @@ * @@ -33,12 +32,12 @@ class Dashboard extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('job'); - $this->load->model('project'); - $this->load->model('user'); } public function index() { - $this->session->unset_userdata('active_project'); $this->load->view('dashboard'); } -} \ No newline at end of file +} + +/* End of file dashboard.php */ +/* Location: ./application/controllers/dashboard.php */ diff --git a/application/controllers/trials.php b/application/controllers/experiments.php similarity index 75% rename from application/controllers/trials.php rename to application/controllers/experiments.php index 399c062..7288194 100644 --- a/application/controllers/trials.php +++ b/application/controllers/experiments.php @@ -22,12 +22,12 @@ */ /** - * Trials are used to store different variations of the same project. + * Experiments are used to store different variations of the same project. * * @author Karsten Heiken * @author Eike Foken */ -class Trials extends CI_Controller { +class Experiments extends CI_Controller { /** * Constructor. @@ -37,17 +37,16 @@ class Trials extends CI_Controller { $this->load->library('form_validation'); $this->load->model('parameter'); $this->load->model('program'); - $this->load->model('project'); - $this->load->model('trial'); + $this->load->model('experiment'); } /** - * Allows users to create new trials. + * Allows users to create new experiments. * * @param string $projectId */ public function create($projectId = '', $copyId = '') { - // TODO: Handle copying of trials + // TODO: Handle copying of experiments $project = $this->project->getByID($projectId); @@ -64,15 +63,15 @@ class Trials extends CI_Controller { if (is_null($project['default_model'])) { $this->load->config('form_validation'); - foreach ($this->config->item('trials/create') as $rule) { // restore old rules + foreach ($this->config->item('experiments/create') as $rule) { // restore old rules $this->form_validation->set_rules($rule['field'], $rule['label'], $rule['rules']); } - $this->form_validation->set_rules('3dmodel', _('3d model'), 'file_required|file_allowed_type[obj]'); + $this->form_validation->set_rules('3dmodel', _('3D model'), 'file_required|file_allowed_type[obj]'); } // run form validation - if ($this->form_validation->run('trials/create') === true) { + if ($this->form_validation->run('experiments/create') === true) { $data = array( 'name' => $this->input->post('name'), 'description' => $this->input->post('description'), @@ -81,15 +80,15 @@ class Trials extends CI_Controller { 'creator_id' => $this->session->userdata('user_id'), ); - $data['trial_id'] = $this->trial->create($data); + $data['experiment_id'] = $this->experiment->create($data); - if (isset($data['trial_id'])) { + if (isset($data['experiment_id'])) { $this->load->helper('directory'); - $trialPath = FCPATH . 'uploads/' . $projectId . '/' . $data['trial_id'] . '/'; - mkdirs($trialPath); + $experimentPath = FCPATH . 'uploads/' . $projectId . '/' . $data['experiment_id'] . '/'; + mkdirs($experimentPath); $config = array( - 'upload_path' => $trialPath, + 'upload_path' => $experimentPath, 'allowed_types' => '*', 'overwrite' => true, 'file_name' => 'default', @@ -109,18 +108,19 @@ class Trials extends CI_Controller { if (preg_match('/^param-[0-9a-z]+/', $key) && !empty($value)) { $param['parameter_id'] = substr($key, 6, 16); $param['value'] = $this->input->post($key); - $this->trial->addParameter($param, $data['trial_id']); + $this->experiment->addParameter($param, $data['experiment_id']); } } // TODO: Don't start jobs automatically $program = $this->program->getById($data['program_id']); $this->load->library('program_runner', array('program_driver' => $program['driver'])); - $this->program_runner->createJob($data['trial_id']); + $this->program_runner->createJob($data['experiment_id']); + //redirect('/experiments/detail/' . $data['experiment_id'], 303); redirect('/projects/detail/' . $projectId, 303); } else { - $this->messages->add(_('The trial could not be created.'), 'error'); + $this->messages->add(_('The experiment could not be created.'), 'error'); } } @@ -129,9 +129,9 @@ class Trials extends CI_Controller { $data['programs'] = $programs; $data['project'] = $project; - $this->load->view('trial/new', $data); + $this->load->view('experiments/new', $data); } } -/* End of file trials.php */ -/* Location: ./application/controllers/trials.php */ +/* End of file experiments.php */ +/* Location: ./application/controllers/experiments.php */ diff --git a/application/controllers/projects.php b/application/controllers/projects.php index e8280b1..5413ec6 100644 --- a/application/controllers/projects.php +++ b/application/controllers/projects.php @@ -34,8 +34,7 @@ class Projects extends CI_Controller { public function __construct() { parent::__construct(); $this->load->library('form_validation'); - $this->load->model('project'); - $this->load->model('trial'); + $this->load->model('experiment'); } /** @@ -123,7 +122,7 @@ class Projects extends CI_Controller { } $data['project'] = $project; - $data['trials'] = $this->trial->getByProjectId($id); + $data['experiments'] = $this->experiment->getByProjectId($id); $data['jobs'] = $this->job->getRecent($id); $this->load->view('projects/detail', $data); diff --git a/application/controllers/results.php b/application/controllers/results.php index b3611c4..96ca61d 100644 --- a/application/controllers/results.php +++ b/application/controllers/results.php @@ -1,5 +1,4 @@ * @@ -40,7 +39,6 @@ class Results extends CI_Controller { } public function index() { - } /** @@ -48,17 +46,15 @@ class Results extends CI_Controller { * * @param string $prj_id the project for which to get the results */ - public function project($prj_id) { - + public function project($projectId) { } /** - * Get the results of a given trial. + * Get the results of a given experiment. * - * @param string $trial_id the trial for which to get the results + * @param string $experimentId The experiment for which to get the results */ - public function trial($trial_id) { - + public function experiment($experimentId) { } /** @@ -66,7 +62,9 @@ class Results extends CI_Controller { * * @param string $job_id the job for which to get the results */ - public function job($job_id) { - + public function job($jobId) { } -} \ No newline at end of file +} + +/* End of file results.php */ +/* Location: ./application/controllers/results.php */ diff --git a/application/controllers/xmlrpc.php b/application/controllers/xmlrpc.php index 0671b7c..402550a 100644 --- a/application/controllers/xmlrpc.php +++ b/application/controllers/xmlrpc.php @@ -1,5 +1,4 @@ * @@ -79,7 +78,7 @@ class Xmlrpc extends CI_Controller { 'success' => array('true', 'string'), 'new_job' => array('true', 'string'), 'job_id' => array($job->id, 'string'), - 'trial_id' => array($job->trial_id, 'string'), + 'experiment_id' => array($job->experiment_id, 'string'), ), 'struct'); } else { $response = array(array( diff --git a/application/libraries/Job.php b/application/libraries/Job.php index 9971a36..35f9be6 100644 --- a/application/libraries/Job.php +++ b/application/libraries/Job.php @@ -16,25 +16,25 @@ class Job { // load models $this->CI->load->model('program'); - $this->CI->load->model('trial'); + $this->CI->load->model('experiment'); - log_message('debug', "Trial Class Initialized"); + log_message('debug', "Job Class Initialized"); } /** * - * @param string $trialId + * @param string $experimentId * @return boolean Returns TRUE on success. */ - public function createConfigs($trialId) { - $trial = $this->CI->trial->getById($trialId); - $path = FCPATH . 'uploads/' . $trial['project_id'] . '/' . $trial['id'] . '/'; + public function createConfigs($experimentId) { + $experiment = $this->CI->experiment->getById($experimentId); + $path = FCPATH . 'uploads/' . $experiment['project_id'] . '/' . $experiment['id'] . '/'; - $program = $this->CI->program->getById($trial['program_id']); + $program = $this->CI->program->getById($experiment['program_id']); - $handler = fopen($path . 'trial.conf', "w"); + $handler = fopen($path . 'default.calc', "w"); - $parameters = $this->CI->trial->getParameters($trialId); + $parameters = $this->CI->experiment->getParameters($experimentId); foreach ($parameters as $param) { $line = str_replace("{type}", $param['type'], $program['input_line']); $line = str_replace("{param}", $param['name'], $line); diff --git a/application/libraries/Program_runner.php b/application/libraries/Program_runner.php index 3b9184e..d534971 100644 --- a/application/libraries/Program_runner.php +++ b/application/libraries/Program_runner.php @@ -31,14 +31,14 @@ class Program_runner { } /** - * Creates a job from the specified trial. + * Creates a job from the specified experiment. * - * @param string $trialId + * @param string $experimentId */ - public function createJob($trialId) { - if ($this->driver->_createJob($trialId)) { + public function createJob($experimentId) { + if ($this->driver->_createJob($experimentId)) { $this->CI->load->model('job'); - $this->CI->job->create(array('trial_id' => $trialId, 'started_by' => $this->CI->session->userdata('user_id'))); + $this->CI->job->create(array('experiment_id' => $experimentId, 'started_by' => $this->CI->session->userdata('user_id'))); } return true; } diff --git a/application/libraries/programs/Scatt.php b/application/libraries/programs/Scatt.php index deee038..2741bef 100644 --- a/application/libraries/programs/Scatt.php +++ b/application/libraries/programs/Scatt.php @@ -22,17 +22,17 @@ class Scatt extends Program_runner { /** * - * @param unknown_type $trialId + * @param unknown_type $experimentId */ - public function _createJob($trialId) { + public function _createJob($experimentId) { $this->CI->load->library('parser'); - $trial = $this->CI->trial->getById($trialId); + $experiment = $this->CI->experiment->getById($experimentId); - $path = FCPATH . 'uploads/' . $trial['project_id'] . '/' . $trial['id'] . '/'; + $path = FCPATH . 'uploads/' . $experiment['project_id'] . '/' . $experiment['id'] . '/'; $handler = fopen($path . 'default.calc', "w"); - $data['parameters'] = $this->CI->trial->getParameters($trialId); + $data['parameters'] = $this->CI->experiment->getParameters($experimentId); @fwrite($handler, $this->CI->parser->parse_string($this->program['config_template'], $data, true)); @fclose($handler); diff --git a/application/models/experiment.php b/application/models/experiment.php new file mode 100644 index 0000000..09729b6 --- /dev/null +++ b/application/models/experiment.php @@ -0,0 +1,145 @@ + + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * Experiments are used to store different variations of the same project. + * + * @author Karsten Heiken + */ +class Experiment extends CI_Model { + + /** + * Create a new experiment. + * + * @param array $data The data of the new experiment + * @return boolean Was the insert successful? + */ + public function create($data) { + if (!isset($data['project_id'])) { + return false; + } + + do { // generate unique hash + $data['id'] = random_hash(); + } while ($this->db->where('id', $data['id'])->from('experiments')->count_all_results() > 0); + + if ($this->db->insert('experiments', $data)) { + return $data['id']; + } else { + return false; + } + } + + /** + * Deletes a experiment. + * + * @param string $experimentId The experiments ID to delete + * @return boolean Was the deletion successful? + */ + public function delete($experimentId) { + return $this->db->delete('experiments', array('id' => $experimentId)); + } + + /** + * Adds a parameter for a specific experiment. + * + * @param array $data + * @param string $experimentId + * @return boolean Returns TRUE if the parameter was added successfully. + */ + public function addParameter($data, $experimentId) { + if (!isset($data['parameter_id'])) { + return false; + } + + $experiment = $this->get($experimentId); + $parameter = $this->db->get_where('parameters', array('id' => $data['parameter_id']))->row_array(); + + if (isset($experiment['id']) && $experiment['program_id'] == $parameter['program_id']) { + $data['experiment_id'] = $experimentId; + $this->db->insert('experiments_parameters', $data); + } + return $this->db->affected_rows() == 1 ? $experimentId : false; + } + + /** + * Gets all parameters for the specified experiment. + * + * @param string $experimentId + * @return array + */ + public function getParameters($experimentId) { + $this->db->select('experiments_parameters.*, parameters.name AS `name`, parameters.type AS `type`'); + $this->db->join('parameters', 'experiments_parameters.parameter_id = parameters.id', 'left'); + $this->db->where('experiment_id', $experimentId); + + $query = $this->db->get('experiments_parameters'); + + return $query->num_rows() > 0 ? $query->result_array() : false; + } + + /** + * Gets an experiment by ID. + * + * @param string $experimentId The experiment to get + * @return array The experiment + */ + public function get($experimentId) { + $query = $this->db->get_where('experiments', array('id' => $experimentId)); + return $query->row_array(); + } + + /** + * Gets an experiment by ID. + * + * @param string $experimentId The experiment to get + * @return array The experiment + */ + public function getById($experimentId) { + return $this->db->get_where('experiments', array('id' => $experimentId))->row_array(); + } + + /** + * Gets a experiment by its project ID. + * + * @param string $projectId + * @return array + */ + public function getByProjectId($projectId) { + $query = $this->db->get_where('experiments', array('project_id' => $projectId)); + return $query->result_array(); + } + + /** + * Search for a specific experiment and return a list of possible results. + * + * @param string $needle The needle to look for in the haystack. + */ + public function search($project, $needle) { + $query = $this->db->where('project_id', $project) + ->like('name', $needle)->get('experiments'); + $results = $query->result_array(); + + return $results; + } +} \ No newline at end of file diff --git a/application/models/group.php b/application/models/group.php index 433bc0e..0641d65 100644 --- a/application/models/group.php +++ b/application/models/group.php @@ -1,4 +1,25 @@ - + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ /** * Group model. diff --git a/application/models/job.php b/application/models/job.php index dd2a560..f2a9647 100644 --- a/application/models/job.php +++ b/application/models/job.php @@ -1,5 +1,4 @@ - * @@ -74,8 +73,8 @@ class Job extends CI_Model { * @return array */ public function getRecent($projectId = '') { - $this->db->select('jobs.*, trials.project_id, trials.name'); - $this->db->join('trials', 'jobs.trial_id = trials.id', 'left'); + $this->db->select('jobs.*, experiments.project_id, experiments.name'); + $this->db->join('experiments', 'jobs.experiment_id = experiments.id', 'left'); //$this->db->where('finished_at', 0); if (!empty($projectId)) { @@ -112,3 +111,6 @@ class Job extends CI_Model { return $this->db->count_all_results() > 0 ? $query->row() : FALSE; } } + +/* End of file job.php */ +/* Location: ./application/controllers/job.php */ diff --git a/application/models/parameter.php b/application/models/parameter.php index ac519c9..d902bcb 100644 --- a/application/models/parameter.php +++ b/application/models/parameter.php @@ -1,4 +1,4 @@ - * @@ -24,7 +24,7 @@ /** * Model for parameters. * - * Each program has many parameters used for configuration of trials. + * Each program has many parameters used for configuration of experiments. * * @author Eike Foken */ diff --git a/application/models/program.php b/application/models/program.php index dd0d448..4914bae 100644 --- a/application/models/program.php +++ b/application/models/program.php @@ -1,4 +1,4 @@ - * @@ -22,7 +22,7 @@ */ /** - * Programs are used to do the actual calculation of a trial. + * Programs are used to do the actual calculation of a experiment. * * @author Karsten Heiken * @author Eike Foken @@ -135,3 +135,6 @@ class Program extends CI_Model { return $query->result_array(); } } + +/* End of file program.php */ +/* Location: ./application/models/program.php */ diff --git a/application/models/project.php b/application/models/project.php index 4c29a3d..97f1fef 100644 --- a/application/models/project.php +++ b/application/models/project.php @@ -1,5 +1,4 @@ - * @@ -28,10 +27,10 @@ * @author Karsten Heiken */ class Project extends CI_Model { - + /** * Add a short and medium length description to one project. - * + * * @param mixed $project */ private function _addShortName($project) { @@ -39,10 +38,10 @@ class Project extends CI_Model { $project['mediumname'] = character_limiter($project['name'], 35); return $project; } - + /** * Add a short and medium length description to an array of projects. - * + * * @param mixed $project */ private function _addShortNames($project) { @@ -205,4 +204,7 @@ class Project extends CI_Model { return $this->db->delete('projects', array('id' => $projectId)); } -} \ No newline at end of file +} + +/* End of file project.php */ +/* Location: ./application/models/project.php */ diff --git a/application/models/server.php b/application/models/server.php index 2e3e35c..3f62a2e 100644 --- a/application/models/server.php +++ b/application/models/server.php @@ -1,5 +1,4 @@ - * @@ -85,11 +84,22 @@ class Server extends CI_Model { get_where('servers', 'workload <= 2')->row_array(); } + /** + * + * @param string $secret + */ public function getBySecret($secret) { return $this->db->get_where('servers', array('secret' => $secret))->row(); } - - public function getById($server_id) { - return $this->db->get_where('servers', array('id' => $server_id))->row(); + + /** + * + * @param string $serverId + */ + public function getById($serverId) { + return $this->db->get_where('servers', array('id' => $serverId))->row(); } } + +/* End of file server.php */ +/* Location: ./application/models/server.php */ diff --git a/application/models/trial.php b/application/models/trial.php deleted file mode 100644 index e34e3b5..0000000 --- a/application/models/trial.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * Trials are used to store different variations of the same project. - * - * @author Karsten Heiken - */ -class Trial extends CI_Model { - - /** - * Create a new trial. - * - * @param array $data the data of the new trial - * @return bool was the insert successful - */ - public function create($data) { - if (!isset($data['project_id'])) { - return false; - } - - do { // generate unique hash - $data['id'] = random_hash(); - } while ($this->db->where('id', $data['id'])->from('trials')->count_all_results() > 0); - - if ($this->db->insert('trials', $data)) { - return $data['id']; - } else { - return false; - } - } - - /** - * Delete a trial. - * @param string the trial id to delete - * @return bool was the deletion successful - */ - public function delete($trial_id) { - return $this->db->delete('trials', array('id' => $trial_id)); - } - - /** - * Adds a parameter for a specific trial. - * - * @param array $data - * @param string $trialId - * @return boolean Returns TRUE if the parameter was added successfully. - */ - public function addParameter($data, $trialId) { - if (!isset($data['parameter_id'])) { - return false; - } - - $trial = $this->get($trialId); - $parameter = $this->db->get_where('parameters', array('id' => $data['parameter_id']))->row_array(); - - if (isset($trial['id']) && $trial['program_id'] == $parameter['program_id']) { - $data['trial_id'] = $trialId; - $this->db->insert('trials_parameters', $data); - } - return $this->db->affected_rows() == 1 ? $trialId : false; - } - - /** - * Gets all parameters for the specified trial. - * - * @param string $trialId - * @return array - */ - public function getParameters($trialId) { - $this->db->select('trials_parameters.*, parameters.name AS `name`, parameters.type AS `type`'); - $this->db->join('parameters', 'trials_parameters.parameter_id = parameters.id', 'left'); - $this->db->where('trial_id', $trialId); - - $query = $this->db->get('trials_parameters'); - - return $query->num_rows() > 0 ? $query->result_array() : false; - } - - /** - * Get a trial by id. - * - * @param string $trial_id The trial to get. - * @return array The trial - */ - public function get($trial_id) { - $query = $this->db->get_where('trials', array('id' => $trial_id)); - - return $query->row_array(); - } - - /** - * Gets a trial by ID. - * - * @param string $trialId The trial to get - * @return array The trial - */ - public function getById($trialId) { - return $this->db->get_where('trials', array('id' => $trialId))->row_array(); - } - - /** - * Get a trial by its project id. - * - * @param type $trial_id The trials to get. - * @return array The trial - */ - public function getByProjectId($project_id) { - $query = $this->db->get_where('trials', array('project_id' => $project_id)); - - return $query->result_array(); - } - - /** - * Search for a specific trial and return a list of possible results. - * - * @param string $needle The needle to look for in the haystack. - */ - public function search($project, $needle) { - $query = $this->db->where('project_id', $project) - ->like('name', $needle)->get('trials'); - $results = $query->result_array(); - - return $results; - } -} \ No newline at end of file diff --git a/application/models/user.php b/application/models/user.php index 2187aa6..3a34443 100644 --- a/application/models/user.php +++ b/application/models/user.php @@ -1,4 +1,25 @@ + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ /** * User model. diff --git a/application/views/dashboard.php b/application/views/dashboard.php index 37ad1e1..6a4168d 100644 --- a/application/views/dashboard.php +++ b/application/views/dashboard.php @@ -1,4 +1,4 @@ -load->view('header'); ?> +load->view('header');?>
@@ -13,9 +13,9 @@

-

+

- +

@@ -27,4 +27,4 @@
-load->view('footer'); ?> +load->view('footer');?> diff --git a/application/views/trial/index.html b/application/views/experiments/index.html similarity index 100% rename from application/views/trial/index.html rename to application/views/experiments/index.html diff --git a/application/views/trial/new.php b/application/views/experiments/new.php similarity index 87% rename from application/views/trial/new.php rename to application/views/experiments/new.php index 34cf425..17741d3 100644 --- a/application/views/trial/new.php +++ b/application/views/experiments/new.php @@ -3,16 +3,16 @@
-

+

-
+

  • - + *
    @@ -22,7 +22,7 @@
  • *
    - +
    @@ -35,7 +35,7 @@ ?>

    - +

    -
    +

    - +

  • diff --git a/application/views/header.php b/application/views/header.php index 95d0efd..a3bf8a5 100644 --- a/application/views/header.php +++ b/application/views/header.php @@ -37,15 +37,15 @@ // get the active project, if there is one if ($this->input->get('active_project')) $active_project = $this->project->getById($this->input->get('active_project')); - else + else $active_project = false; - + $projects = $this->project->getAll(); - + if(!$active_project): ?> - @@ -75,7 +75,7 @@
    • -
    • +
    diff --git a/application/views/projects/detail.php b/application/views/projects/detail.php index e34a1b8..06394d5 100644 --- a/application/views/projects/detail.php +++ b/application/views/projects/detail.php @@ -34,28 +34,28 @@ -

    +

    - + 0): - foreach ($trials as $trial): + if (count($experiments) > 0): + foreach ($experiments as $experiment): ?> - + - +
    "> - | - | - | - + | + | + | +
    -

    +