QUES MAS CHANGED3

This commit is contained in:
velz 2018-09-27 11:08:03 +05:30
parent bd428730cc
commit 48578c2fd4
3 changed files with 5 additions and 5 deletions

View File

@ -86,7 +86,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
// 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', 'triggerNewPD'); // no errors
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'saveNewQuestion'); // no errors
/*********************AWS resources Constants*************************************************/
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');

View File

@ -23,13 +23,13 @@ class Question_Management_Controller extends REST_Controller {
public function listAllQuestions_get()
{
$page = 0;$limit = 50;$sort = 'ASC';
$page = 0;$limit = 0;$sort = 'ASC';
if($this->get('page')) { $page = $this->get('page'); }
if($this->get('limit')){ $limit = $this->get('limit'); }
if($this->get('sort')) { $sort = $this->get('sort'); }
$result = $this->Question_Management_Model->$listAllQuestions($page,$limit,$sort);
$result = $this->Question_Management_Model->listAllQuestions($page,$limit,$sort);
if($result['data_status'])
{
$data['dataStatus'] = true;
@ -58,7 +58,7 @@ class Question_Management_Controller extends REST_Controller {
unset($records['ansewrs']);
}
$question_id = $this->db->saveRecords($records,QUESTIONS);
$question_id = $this->Question_Management_Model->saveRecords($records,QUESTIONS);
if($question_id != '' || $question_id != null)
{

View File

@ -14,7 +14,7 @@ class Question_Management_Model extends SPARQ_Model {
{
$this->db->SELECT('QUESTIONS.question_id, QUESTIONS.question, QUESTIONS.description, QUESTIONS.fk_question_catagory,QUESTIONCATEGORY.category_name, QUESTIONS.fk_question_answertype,QUESTIONANSWERTYPE.answer_type_name,QUESTIONS.isactive, QUESTIONS.createdon, QUESTIONS.fk_createdby, QUESTIONS.updatedon, QUESTIONS.fk_updatedby,concat(USERPROFILE.first_name," " ,USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby');
$this->db->SELECT('QUESTIONS.question_id, QUESTIONS.question, QUESTIONS.description, QUESTIONS.fk_question_catagory,QUESTIONCATEGORY.categroy_name, QUESTIONS.fk_question_answertype,QUESTIONANSWERTYPE.answer_type_name,QUESTIONS.isactive, QUESTIONS.createdon, QUESTIONS.fk_createdby, QUESTIONS.updatedon, QUESTIONS.fk_updatedby,concat(USERPROFILE.first_name," " ,USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby');
$this->db->FROM(QUESTIONS.' as QUESTIONS');
$this->db->JOIN(QUESTIONANSWERTYPE.' as QUESTIONANSWERTYPE','QUESTIONS.fk_question_answertype = QUESTIONANSWERTYPE.question_answer_type_id AND QUESTIONANSWERTYPE.isactive = 1');
$this->db->JOIN(QUESTIONCATEGORY.' as QUESTIONCATEGORY','QUESTIONS.fk_question_catagory = QUESTIONCATEGORY.question_categroy_id AND QUESTIONCATEGORY.isactive = 1');