Skip to content
Snippets Groups Projects
Commit 2812c49e authored by Nick Barry's avatar Nick Barry
Browse files

Merge branch 'projects-task-27' into 'master'

Projects Task 27

Merge branch 'projects-task-27' into 'master'
parents 5d8feeb0 0f10c7f7
No related branches found
No related tags found
No related merge requests found
...@@ -3926,10 +3926,12 @@ class Courses_CourseModel extends Unl_Model ...@@ -3926,10 +3926,12 @@ class Courses_CourseModel extends Unl_Model
$this->_data['aceRecertification'] = null; $this->_data['aceRecertification'] = null;
} }
} else { } else {
if($this->_data['course']){ // if there is an existing course this request refers to
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('a' => 'creqCourseAceRecertifications')); $select->from(array('a' => 'creqCourseAceRecertifications'));
$select->where('a.generation = ?', $this->_data['course']); $select->where('a.generation = ?', $this->_data['course']);
$record = $select->query()->fetch(); $record = $select->query()->fetch();
}
if($record){ if($record){
// for AceRecertification record, get the questions and answers // for AceRecertification record, get the questions and answers
...@@ -3962,6 +3964,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -3962,6 +3964,7 @@ class Courses_CourseModel extends Unl_Model
} }
} }
// No previous ace recertification data found -- Last resort is to just load the most recent question set version.
if (!is_array($this->_data['aceRecertification'])) { if (!is_array($this->_data['aceRecertification'])) {
// load current empty question set // load current empty question set
//SELECT q.* FROM creq.creqCourseAceRecertifyQuestionSets as s //SELECT q.* FROM creq.creqCourseAceRecertifyQuestionSets as s
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment