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

dmlreadexception error when duplicating Questionnaire activity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.7.1
    • 3.6.5, 3.6.6, 3.7
    • Module: Questionnaire
    • None

      After upgrading Questionnaire to 3.7.0 (Build - 2019101700) 2019101701, I get the error "dmlreadexception / Error reading from database" anytime I try to duplicate a Questionnaire. This happens on both a server running 3.6.5 and one running 3.6.6. It did not happen before updating the plugin.

      I turned debug on the 3.6.5 machine. I see the following message when I try to duplicate a Questionnaire.

       

      dmlreadexception

      Error reading from database
      File: /lib/dml/moodle_database.php
      Line: 486
       
      Stack trace:
      You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AMD qq.surveyid = '34'' at line 1
      SELECT qrr.* FROM mdl_questionnaire_question qq INNER JOIN mdl_questionnaire_response_rank qrr ON qq.id = qrr.question_id WHERE qq.type_id = ? AND qrr.rankvalue >= ? AMD qq.surveyid = ?
      [array (
      0 => 8,
      1 => 0,
      2 => 34,
      )]
      Error code: dmlreadexception

      • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 1184 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 1038 of /mod/questionnaire/classes/question/rate.php: call to mysqli_native_moodle_database->get_recordset_sql()
      • line 406 of /mod/questionnaire/backup/moodle2/restore_questionnaire_stepslib.php: call to mod_questionnaire\question\rate::move_all_nameddegree_choices()
      • line 410 of /backup/util/plan/restore_structure_step.class.php: call to restore_questionnaire_activity_structure_step->after_execute()
      • line 113 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->launch_after_execute_methods()
      • line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
      • line 210 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
      • line 178 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
      • line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
      • line 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
      • line 3440 of /course/lib.php: call to restore_controller->execute_plan()
      • line 3485 of /course/externallib.php: call to duplicate_module()
      • line 244 of /lib/externallib.php: call to core_course_external::edit_module()
      • line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
         

       

       

            mchurch Mike Churchward
            sstrauss@haverford.edu Sharon Strauss
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.