Deleted questions being not being excluded

Deleted questions being not being excluded

by Derek Henderson -
Number of replies: 0

In the M3.1 version, release 2016071103, there seems to be an issue when the downloading all Pre-course and Post Course Questionnaire .csv data.

It looks like deleted questions are being included in the survey responses, but not in the question list.

In questionnaire.class.php line 3160, 3161 there are the following 2 lines:

  $qid = $responserow->question_id;
   $question = $this->questions[$qid];

But if the question is deleted it gives an error as its not loaded in $this->questions, which looks like its being populated from

public function add_questions (in questionnaire.class.php). This section of code has

  $select = 'survey_id = '.$sid.' AND deleted != \'y\''

So it looks like deleted questions are being excluded.

But if you look at the sql generated from function get_survey_all_responses, it does not look like deleted questions are excluded, which I think is causing the mismatch.

Let me know if you need more information.

 


      




         


Average of ratings: -