Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-44542

Feedback analsysis causes ORA-00932: inconsistent datatypes: expected - got CLOB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.1
    • Fix Version/s: 2.5.6, 2.6.3
    • Component/s: Feedback
    • Labels:
    • Testing Instructions:
      Hide

      For testing you need an Oracle installation

      1. activate the feedback module on "Site administration / Plugins / Activity modules"
      2. create a course, enrol several users in one or more groups
      3. create a new feedback instance inside a course in separate group mode
      4. create two multiple choice questions, one of them with the setting "Do not analyse empty submits" = "Yes"
      5. do some submits (It can be anonymous or nonanonymous)
      6. go to the analyse page (No error should appear both in "all participants" and in "group x")
      Show
      For testing you need an Oracle installation activate the feedback module on "Site administration / Plugins / Activity modules" create a course, enrol several users in one or more groups create a new feedback instance inside a course in separate group mode create two multiple choice questions, one of them with the setting "Do not analyse empty submits" = "Yes" do some submits (It can be anonymous or nonanonymous) go to the analyse page (No error should appear both in "all participants" and in "group x")
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      wip-MDL-44542-master

      Description

      The feedback analysis tab appears to be showing errors. This will probably only affect those courses that have already had feedback submitted.

      This issue is also a duplicate of MDL-32708 (which was closed due to being too old)

      Here is the error message displayed to the user:

      Error reading from database

      More information about this error

      Debug info: ORA-00932: inconsistent datatypes: expected - got CLOB
      SELECT * FROM m_feedback_value WHERE item = :o_param1 AND value != '' AND value != '0'
      [array (
      'o_param1' => '241',
      )]
      Error code: dmlreadexception
      Stack trace:

      line 441 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 271 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      line 1122 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      line 1244 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_records_sql()
      line 2442 of /mod/feedback/lib.php: call to moodle_database->get_records_select()
      line 137 of /mod/feedback/item/multichoice/lib.php: call to feedback_get_group_values()
      line 230 of /mod/feedback/item/multichoice/lib.php: call to feedback_item_multichoice->get_analysed()
      line 155 of /mod/feedback/analysis.php: call to feedback_item_multichoice->print_analysed()

      I have successfully fixed this error on my system by replacing a line in the lib.php file with an SQL statement which should be database agnostic:

      file: /moodle/mod/feedback/lib.php, line 2430

      $ignore_empty_select = "AND value != '' AND value != '0'";

      replaced with the following line:

      $ignore_empty_select = "AND $DB->sql_compare_text('value') != ' ' AND $DB->sql_compare_text('value') != '0'";

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14