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

Wrong sql query in function questionnaire_get_survey_list

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4, 2.5
    • Fix Version/s: 2.4
    • Component/s: Module: Questionnaire
    • Labels:
      None
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE

      Description

      When Jenny transferred functions from questionnaire/lib to locallib, she changed the order of the SELECT fields, which results in this error message when creating a questionnaire on a site with existing template or public questionnaires:

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '5' found in column 'id'.

      line 1014 of \lib\dml\mysqli_native_moodle_database.php: call to debugging()
      line 433 of \mod\questionnaire\locallib.php: call to mysqli_native_moodle_database->get_records_sql()
      line 440 of \mod\questionnaire\locallib.php: call to questionnaire_get_survey_list()
      line 115 of \mod\questionnaire\mod_form.php: call to questionnaire_get_survey_select()
      line 191 of \lib\formslib.php: call to mod_questionnaire_mod_form->definition()
      line 71 of \course\moodleform_mod.php: call to moodleform->moodleform()
      line 248 of \course\modedit.php: call to moodleform_mod->moodleform_mod()

      Easy fix: revert to original order of SELECT fields as per version 2.3.

        Attachments

          Activity

            People

            Assignee:
            rezeau Joseph Rézeau
            Reporter:
            rezeau Joseph Rézeau
            Participants:
            Component watchers:
            Mike Churchward
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Dec/12