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

Block completion progress db error for feedback activity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.10.6
    • None
    • MOODLE_310_STABLE

      When selecting the Overview report in the block then selecting the feedback activity in the completion report a dml exception is thrown as per below:

      Can't find data record in database table feedback_completed.

       

      Debug info:

      SELECT * FROM {feedback_completed} WHERE feedback = ? AND anonymous_response = ? AND userid = ?
      [array (
      0 => '13483',
      1 => 2,
      2 => 57204,
      )]

      Error code: invalidrecord

      Stack trace:

       

      • line 1646 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
      • line 1622 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      • line 94 of /mod/feedback/classes/completion.php: call to moodle_database->get_record()
      • line 63 of /mod/feedback/show_entries.php: call to mod_feedback_completion->__construct()

       

      Issue seems to be caused by the urls generated in the blocks report passing the user id to the feedback module without checking the user has submitted something the url should default to the feedback activity without any parameters as is consistent with other activity modules which support completion data.

       

      Te replicate

       

      Create a course with completion tracking enabled and enrol 1 user in the course

      Create the feedback activity in the course and set completion to student must view this activity to complete it.

      Add the completion progress block to the course

      Select the "Overview" report from the completion progress block

      Click the feedback module from the report details and note the dml exception for a record which doesnt exist

            jonof Jonathon Fowler
            bmatthias Barry Matthias
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

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