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

Grading assignments - row number logic

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.4.6, 2.5, 2.7, 2.8.6, 2.9.3
    • Fix Version/s: None
    • Component/s: Assignment
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE

      Description

      We have noticed that the row number logic used in the assignment module is somewhat dangerous. At least if you are working in multiple browser tabs and is about to grade a student.

      If you are filtering the assignment list differently between tabs and if you end up trying to grade someone in one of your "old" tabs where you did not filter the list most recently, then you might get into trouble. First of all when you click the grading link (.../mod/assign/view.php?id=100&rownum=14&action=grade) you could end up grading another student than the one you just chose. That is because of the row number logic used in the filtering. Since you can filter the list in other tabs row numbers will change in your session.

      ---------
      SCENARIO 1:
      1. Open two browser tabs and navigate into the same assignment in both tabs. The two lists with assignments should now be in sync in both tabs

      2. Filter your list differently in your current tab so that you have less posts in this list.

      3. Switch back to your other tab and try to grade one student which is on a row number which is no longer present in your lastly filtered list (the one in your other tab).

      RESULT:
      In this case you will try to reach an index which is not currently present and receive an error like this one:

      Coding error detected, it must be fixed by a programmer: Row is out of bounds for the current grading table: X…

      Where X of course differs depending on the specific case.

      ---------

      SCENARIO 2:
      1. Open two browser tabs and navigate into the same assignment in both tabs. The two lists with assignments should now be in sync in both tabs

      2. Filter your list differently in your current tab so that your student on row X in your current tab differs from the student on row X in your other tab.

      3. Switch back to your other tab and grade student on row X.

      RESULT:
      In this case you intend to grade one student but instead you end up with another student in the grading page.
      ---------

      (Quick grading however seems to be working fine, because of the userid logic instead of row numbers)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  41 Vote for this issue
                  Watchers:
                  37 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: