Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-7313

Deleted questions being not being excluded

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.1.12
    • None
    • Module: Questionnaire
    • None
    • 2016071103
    • MOODLE_31_STABLE

    Description

      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.

      Attachments

        Activity

          People

            mchurch Mike Churchward
            2shediac Derek Henderson
            Mike Churchward
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: