Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-1294 Test send for marking part of advanced uploading of files assignment type
  3. CONTRIB-2163

Marking block does not show submissions for advanced upload type assignments when "send for marking" is disabled.

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.10
    • Component/s: Block: AJAX Marking
    • Labels:
      None
    • Environment:
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      There seems to be a bug with the ajax marking block that is related to the advances uploading of files assignment type. If you have and advanced uploading of files assingment that has the "Enable Send For Marking" feature turned OFF, then student submissions do not show up in the ajax marking block. If the "Enable Send for Marking" feature is ON, then everything seems to work as it should.

      In investigating this, I traced it back to a couple of conditional statements in blocks/ajax_marking/assignment_grading.php, namely at lines 112, 157, and 224. the conditions look like this:

      if (($submission->data2 != 'submitted') && ($submission->assignmenttype == 'upload'))

      { unset($unmarked[$key]); }

      The problem seems to be that when you have send for marking disabled, the submission->data2 field is not marked submitted when a student uploads a file. I have verified this by inspecting the database contents. I'm not sure if this is a bug with the moodle core or correct operation, but it seems to be an issue that merits further investigation by a core moodle developer.

      The fix that I am using currently is to alter the three of occurrences of the above conditional statement to include a check on the var4 field of the assignment. The var4 field contains a 1 if send for marking is enabled and a 0 if it is disabled. I have also had to modify the associated sql statement so that it fetches var4 as well.

      The modified conditional statements look like:

      if (($submission->data2 != 'submitted') && ($submission->assignmenttype == 'upload') && ($submission->var4 == 1)) { unset($unmarked[$key]); }

      In plain english this means that any advanced uploading of files assignment with send for marking enabled that does not have it's submitted field set is excluded from the list of assignments to be marked.

      I've attached a diff of assignment_grading.php that implements these propopsed changes.

        Attachments

          Activity

            People

            Assignee:
            mattgibson Matt Gibson
            Reporter:
            gbridge Gordon Bridge
            Participants:
            Component watchers:
            Matt Gibson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Oct/10