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.



    • Sub-task
    • Resolution: Fixed
    • Major
    • 1.9.10
    • 1.9.7
    • Block: AJAX Marking
    • None
    • MySQL


      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.




            mattgibson Matt Gibson
            gbridge Gordon Bridge
            0 Vote for this issue
            0 Start watching this issue




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