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

Print overview for assign fails when multiple submissions exist for a user

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.5.3, 2.6
    • Assignment
    • MOODLE_25_STABLE, MOODLE_26_STABLE

      The query used to get the status of an assign submission for the course overview block (assign_print_overview) will not always return the correct result when multiple submissions exist for a user. The query and use of its result is done in such a way that it only supports a single submission.

      https://github.com/moodle/moodle/blob/master/mod/assign/lib.php#L443

      Notice: Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'assignment'.
      * line 980 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()
      * line 479 of /mod/assign/lib.php: call to pgsql_native_moodle_database->get_records_sql()
      * line 43 of /blocks/course_overview/locallib.php: call to assign_print_overview()
      

      Query will need a more unique key (a.id + s.id maybe?) and php code to then report on the most recent submission for that user.

            poltawski Dan Poltawski
            aolley Adam Olley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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