This commit is contained in:
velz 2018-10-18 15:23:47 +05:30
parent 14f4e356f5
commit 6fb1714661
3 changed files with 6 additions and 4 deletions

View File

@ -87,7 +87,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
// define login route name for token verification // define login route name for token verification
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors //defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listAllTemplates/:any)'); // no errors //defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listAllTemplates/:any)'); // no errors
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getTemplateQuestionAnswers'); // no errors defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getQuestionsForTemplateCreation'); // no errors
/*********************AWS resources Constants*************************************************/ /*********************AWS resources Constants*************************************************/
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic'); defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');

View File

@ -293,6 +293,7 @@ class PD_Model extends SPARQ_Model {
// $this->db->JOIN(USERPROFILE.' as USERPROFILE1','TEMPLATEQUESTION.fk_updatedby = USERPROFILE1.userid','LEFT'); // $this->db->JOIN(USERPROFILE.' as USERPROFILE1','TEMPLATEQUESTION.fk_updatedby = USERPROFILE1.userid','LEFT');
$this->db->WHERE('TEMPLATEQUESTION.fk_template_question_category_id',$category['fk_question_category_id']); $this->db->WHERE('TEMPLATEQUESTION.fk_template_question_category_id',$category['fk_question_category_id']);
$this->db->WHERE('TEMPLATEQUESTION.fk_template_id',$template_id); $this->db->WHERE('TEMPLATEQUESTION.fk_template_id',$template_id);
$questions = $this->db->GET()->result_array(); $questions = $this->db->GET()->result_array();
@ -304,7 +305,8 @@ class PD_Model extends SPARQ_Model {
$this->db->SELECT('QUESTIONANSWERS.question_answer_id,QUESTIONANSWERS.answer,TEMPLATEANSWERWEIGHTAGE.template_answer_weightage_id, TEMPLATEANSWERWEIGHTAGE.fk_template_question_id, TEMPLATEANSWERWEIGHTAGE.fk_question_answer_id, TEMPLATEANSWERWEIGHTAGE.template_answer_weightage, TEMPLATEANSWERWEIGHTAGE.isactive'); $this->db->SELECT('QUESTIONANSWERS.question_answer_id,QUESTIONANSWERS.answer,TEMPLATEANSWERWEIGHTAGE.template_answer_weightage_id, TEMPLATEANSWERWEIGHTAGE.fk_template_question_id, TEMPLATEANSWERWEIGHTAGE.fk_question_answer_id, TEMPLATEANSWERWEIGHTAGE.template_answer_weightage, TEMPLATEANSWERWEIGHTAGE.isactive');
$this->db->FROM(TEMPLATEANSWERWEIGHTAGE.' as TEMPLATEANSWERWEIGHTAGE'); $this->db->FROM(TEMPLATEANSWERWEIGHTAGE.' as TEMPLATEANSWERWEIGHTAGE');
$this->db->JOIN(QUESTIONANSWERS.' as QUESTIONANSWERS','TEMPLATEANSWERWEIGHTAGE.fk_question_answer_id = QUESTIONANSWERS.question_answer_id','LEFT'); $this->db->JOIN(QUESTIONANSWERS.' as QUESTIONANSWERS','TEMPLATEANSWERWEIGHTAGE.fk_question_answer_id = QUESTIONANSWERS.question_answer_id','LEFT');
$this->db->WHERE('QUESTIONANSWERS.fk_question_id',$question['question_id']); // $this->db->WHERE('QUESTIONANSWERS.fk_question_id',$question['question_id']);
$this->db->WHERE('TEMPLATEANSWERWEIGHTAGE.fk_template_question_id',$question['template_question_id']);
$answers = $this->db->GET()->result_array(); $answers = $this->db->GET()->result_array();
$questions[$answer_key]['answers'] = $answers; $questions[$answer_key]['answers'] = $answers;
} }

View File

@ -156,7 +156,7 @@ class Template_Management_Model extends SPARQ_Model {
$fields = array('fk_question_id'); $fields = array('fk_question_id');
$where_condition_array = array('fk_template_question_category_id' => $category_id,'fk_template_id' => $template_id); $where_condition_array = array('fk_template_question_category_id' => $category_id,'fk_template_id' => $template_id);
$result_data = $this->selectCustomRecords($fields,$where_condition_array,TEMPLATEQUESTION); $result_data = $this->selectCustomRecords($fields,$where_condition_array,TEMPLATEQUESTION);
// print_r($result_data);
if(count($result_data)) if(count($result_data))
{ {
$temp_array = array(); $temp_array = array();
@ -207,7 +207,7 @@ class Template_Management_Model extends SPARQ_Model {
// $this->db->JOIN(USERPROFILE.' as USERPROFILE','TEMPLATEQUESTION.fk_createdby = USERPROFILE.userid','LEFT'); // $this->db->JOIN(USERPROFILE.' as USERPROFILE','TEMPLATEQUESTION.fk_createdby = USERPROFILE.userid','LEFT');
// $this->db->JOIN(USERPROFILE.' as USERPROFILE1','TEMPLATEQUESTION.fk_updatedby = USERPROFILE1.userid','LEFT'); // $this->db->JOIN(USERPROFILE.' as USERPROFILE1','TEMPLATEQUESTION.fk_updatedby = USERPROFILE1.userid','LEFT');
$this->db->WHERE('QUESTIONS.fk_question_category',$category_id); $this->db->WHERE('QUESTIONS.fk_question_category',$category_id);
$this->db->WHERE('TEMPLATEQUESTION.fk_template_id',$template_id); //$this->db->WHERE('TEMPLATEQUESTION.fk_template_id',$template_id);
$questions = $this->db->GET()->result_array(); $questions = $this->db->GET()->result_array();
if(count($questions)) if(count($questions))
{ {