engine/process.py
def ques_ans(self, survey):
        """Return the dictionary of questions and
           all answers for a survey, collected by all users."""
        ques_ans = {'question': None, 'answer': [], 'count': None}

        cursor.execute(f"select question from {self.db}questions where survey = {survey} order by id")
        ques_ans['question'] = cursor.fetchall()

        ques_ans['count'] = len(ques_ans['question'])

        cursor.execute(f"select id from {self.db}features where survey = {survey} and ans_check = 1 order by id")
        for elem in cursor.fetchall():
            cursor.execute(f"select answer from {self.db}answers where f_id = {elem[0]} order by id")
            for line in cursor.fetchall():
                ques_ans['answer'].append(line)

        return ques_ans
Return the dictionary of questions and
           all answers for a survey, collected by all users.
Return the dictionary of questions and
all answers for a survey, collected by all users.
Return the dictionary of questions and all answers for a survey collected by all users .
def ques_ans(self, survey):
        ques_ans = {'question': None, 'answer': [], 'count': None}
        cursor.execute(f"select question from {self.db}questions where survey = {survey} order by id")
        ques_ans['question'] = cursor.fetchall()
        ques_ans['count'] = len(ques_ans['question'])
        cursor.execute(f"select id from {self.db}features where survey = {survey} and ans_check = 1 order by id")
        for elem in cursor.fetchall():
            cursor.execute(f"select answer from {self.db}answers where f_id = {elem[0]} order by id")
            for line in cursor.fetchall():
                ques_ans['answer'].append(line)
        return ques_ans
def ques_ans ( self , survey ) : ques_ans = { 'question' : None , 'answer' : [ ] , 'count' : None } cursor . execute ( f"select question from {self.db}questions where survey = {survey} order by id" ) ques_ans [ 'question' ] = cursor . fetchall ( ) ques_ans [ 'count' ] = len ( ques_ans [ 'question' ] ) cursor . execute ( f"select id from {self.db}features where survey = {survey} and ans_check = 1 order by id" ) for elem in cursor . fetchall ( ) : cursor . execute ( f"select answer from {self.db}answers where f_id = {elem[0]} order by id" ) for line in cursor . fetchall ( ) : ques_ans [ 'answer' ] . append ( line ) return ques_ans
Return the dictionary of questions and
all answers for a survey, collected by all users.
Return the dictionary of questions and all answers for a survey collected by all users .
"""Return the dictionary of questions and
           all answers for a survey, collected by all users."""
self
survey