Try to download assignment file, but get file.php

Try to download assignment file, but get file.php

by Yun Pan -
Number of replies: 0
I add an upload-a-single-file assignment and students can submit their assignments with word's doc file. But when I clicked on the link and try to download the doc file, I always got a file named 'file.php'. Interestingly, the downloaded 'file.php' is not really a php file. If I change the downloaded file name, eg. file.php -> file.doc, I can get the correct file.

I found the problem was caused by the downloading URL. Current downloading URL use 'file.php?file=/9/moddata/assignment/14/89/student_assignment.doc' to get students' assignments. If I manually changed URL to 'file.php/9/moddata/assignment/14/89/student_assignment.doc', everything is OK.

I'm using moodle 1.8 under Linux and I checked 'Use slash arguments slasharguments' in Site Administration->Server->HTTP. Everything else works fine even in resource download.

Can anyone help? Thanks.
Average of ratings: -