-
Sub-task
-
Resolution: Fixed
-
Major
-
1.9.7
-
None
-
« Hide
Debian Lenny Stable
PHP 5.2.11-0.dotdeb.1 with Suhosin-Patch 0.9.7 (cli) (built: Sep 19 2009 23:21:37)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Server version: Apache/2.2.9 (Debian)
Server built: Mar 28 2010 19:04:04
mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2
Linux version 2.6.26-2-amd64 (Debian 2.6.26-21lenny4) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Tue Mar 9 22:29:32 UTC 2010« Hide Debian Lenny Stable PHP 5.2.11-0.dotdeb.1 with Suhosin-Patch 0.9.7 (cli) (built: Sep 19 2009 23:21:37) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies Server version: Apache/2.2.9 (Debian) Server built: Mar 28 2010 19:04:04 mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2 Linux version 2.6.26-2-amd64 (Debian 2.6.26-21lenny4) ( dannf@debian.org ) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Tue Mar 9 22:29:32 UTC 2010
-
MySQL
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
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.