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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.5.3, 2.6
    • Fix Version/s: None
    • Component/s: Assignment
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              aolley Adam Olley
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: