Assignment

 
 
Picture of Andrew Ruether
Missing student assignment submission
 

I have an odd situation with an "advanced uploading of files" assignment.  The assignment is set up using separate groups with a due date far in the future.  Students are allowed to delete and we have "send for marking" turned off.

There are about 100 students in the class, divided into lab sections for groups.  Almost all of the students have submitted their assignments.  You can see all the student uploads when clicking on "View X submitted assignments".  For two students (in two different groups),  there is nothing under "Last modified (student)", just as if they did not submit their assignment.  However, when you click on the "grade" link for those students you can see a PDF file they uploaded.  The files seem normal -- 2MB (well within the maximum file size) and no strange characters in the name.

I checked the activity log for each student and it does have an entry for them uploading a file to the correct assignment.  The file is located in the proper place in moddata assignment folder under their user id.

I looked in the database and the students do not have entry in the assignment_submissions table corresponding to their user id and assignment id.  

We are on Moodle 1.9.15.  I've looked at other posts with similar problems, but they seem to be related to either a role problem or a database error.  I turned on the highest level of debug messages and displayed the debug messages, but I don't get any errors.

There aren't any role overrides or special role assignments.  As I said, all the other 90+ students' assignments are fine.  If you upload a file and then delete it, there is a "Last modified" date in the assignment submissions view, but in this case, the box for "Last Modified (student)" is completely blank.

Any ideas as to what might be happening?  It seems that the file is in the correct location, the grade popup shows the file, the activity log has a record of the file upload, but there is no record of the file in assignment_submissions.

Thanks for any ideas,

- Andrew 

 
Average of ratings: -
Picture of Garret Gengler
Re: Missing student assignment submission
 

Hi Andrew.   We are experiencing the same bug, in 1.9.15.   

Our school makes heavy use of Moodle, and this is the first time we've seen this one... so perhaps it is a new issue in 1.9.15.

In one confirmed case, the assignment is not using groups, and has a typical due date (the students had 6 weeks to complete this.)    One of our students has an assignment which you can find in the moddata directory, but the Last modified" is blank.

I'm going to update our staging server with the prod db and see if I can trace this one through...

I guess we should make sure there is a bug tracker entry about this... 

-Garret

 
Average of ratings: -
Picture of Andrew Ruether
Re: Missing student assignment submission
 

Do you think this tracker item matches?

http://tracker.moodle.org/browse/MDL-27312

Thanks,

- Andrew

 
Average of ratings: -
Picture of Garret Gengler
Re: Missing student assignment submission
 

It's probably related to the same underlying issue.

After digging through the moodle database and server logs for a few hours, I think I have an explanation for my case.  We have experienced quite a few issues like this, and part of the problem may be that we use CAS authentication.

The scenario:

A student views an assignment at 10:30pm.

The student leaves their web browser open overnight.   Meanwhile, working late in MS word, he writes his paper.

In the morning, the student logs back into Moodle in a new tab.

The student finds the already open tab with the assignment page they loaded the night before, and uploads their submission (a ms word document).

That's a sesskey mismatch... the form from the night before was stale, and referenced a session which expired. 

The assignment handling code accepts the file, and stores it in the appropriate moodledata directory for that course and assignment.    But it rejects the rest of the operation because of the sesskey mismatch. 

By my read, this code is wrong:

assignment.class.php, line 119:

            require_once($CFG->dirroot.'/lib/uploadlib.php');
            $um = new upload_manager('newfile',true,false,$this->course,false,$this->assignment->maxbytes);
            if ($um->process_file_uploads($dir) and confirm_sesskey()) {
                $newfile_name = $um->get_new_filename();
                ...
            }

I think Moodle should check the sesskey first.   I don't see why it should call process_file_uploads regardless of whether there is a sesskey mismatch.

It should be something like:

            require_once($CFG->dirroot.'/lib/uploadlib.php');
            $um = new upload_manager('newfile',true,false,$this->course,false,$this->assignment->maxbytes);
            if (confirm_sesskey()) {
            if ($um->process_file_uploads($dir)) {
                $newfile_name = $um->get_new_filename();
                ...
              }
            }


Since moodle processed the upload, the file got stored on the file system, and the instructor could see it.  Yet Moodle didn't log a sumission for this student (in the mdl_log or mdl_assignment_submission tables).

Of course this all relates to a bigger issue, which I hope is better in Moodle 2.x.    Moodle needs to do a better job of handling session (and auth token) timeouts that are discovered in the middle of an operation.    It has come up before in the tracker.  http://tracker.moodle.org/browse/MDL-11972

Best,
-Garret

 

 
Average of ratings: -
Picture of Andrew Ruether
Re: Missing student assignment submission
 

Based on your information, I checked out the logs more carefully and see that the user had an extra login in between the time the assignment was viewed and the file was uploaded.  It looks exactly like your scenario.  We have CAS as well, so things seems to match up well.

It is a strange problem because the student can't see the submitted assignment, but there is no button to upload a file anymore.  

Thanks for your help!

- Andrew

 
Average of ratings: -
Picture of Amanda Doughty
Re: Missing student assignment submission
Group Developers

Thanks for the fix. This helped us too.

 
Average of ratings: -