sumbission date is set after clicking upload of files

sumbission date is set after clicking upload of files

by Andreas Panagiotopoulos -
Number of replies: 3

I am using Moodle v.20.2+ and I noticed that when a student just clicks the button "Upload files" in module "Advanced uploading of files", then the system sets submission time before uploading of files.

And if a student chooses "Upload files" and then "cancel" (which means that he/she didn't submit anything) then the system shows that the student has submitted his/her assingment and the teacher is notified with an email.

And this is wrong, as the student has just click "Upload files" and the "cancel" - consequently he/she hasn't submit the assignment yet.

How can we overcome this problem??

Thanks a lot!

Andreas P.

Average of ratings: -
In reply to Andreas Panagiotopoulos

Re: sumbission date is set after clicking upload of files

by Michelle Leung -

Dear Andreas,

Here is a patch (MDL-26969) for your second problem.  It works for the "single file upload".  For the "multiple file upload", I haven't tested it yet as our programmers are busy with other stuff.  I hope they will upload the patch for me asap so that I can test it again.  Please let me know if you test it.  wink

In reply to Michelle Leung

Re: sumbission date is set after clicking upload of files

by Andreas Panagiotopoulos -

Dear Michelle!

Thank you for your reply and for the suggested patch!

I applied to my moodle server and here are the results:

-- there is no entry (submission) when a students clicks "upload files" as before

-- there is no entry (submission) when a students clicks "upload files"and then clicks "cancel"

-- unfortunately, there is entry (submission) when a student clicks "upload files" and then clicks "save changes" without uploading any file.

The last one is a (small) problem as it is also the email that will be sent is such conditions.

"Save changes" button is still presented after appling the lasf patch from the above link (MDL-26969). Is there something that I am missing and don't work for me?

And one more question: Is there any way to print filenames of the files that a student uploads? I mean that I would like the names of the files that a students uploads to be shown in the email sent to the teacher. Is there any way to do this?

Thank you in advance once more!

Andreas

In reply to Andreas Panagiotopoulos

Απάντηση: Re: sumbission date is set after clicking upload of files

by Andreas Panagiotopoulos -

Dear Michelle!

I think that i found the solution.

In \lib\form\filemanager.js file, the if statements should be added after the first "if" has closed.

So, patch file should be like that:

if (this.filecount >= this.maxfiles && this.maxfiles!=-1) {
button_addfile.setStyle('display', 'none');

+    }
+        if(this.filecount == this.maxfiles) {
+          submit_button.disabled=false;   
+        }
+        else {
+        submit_button.disabled=true;
+        }

-  }

To be honest, I used the following and everything is working good. The assignment can't be saved before a file has been uploaded.

 

if (this.filecount >= this.maxfiles && this.maxfiles!=-1) {
button_addfile.setStyle('display', 'none');
}
//EDIT Andreas
if(this.filecount == 0) {
submit_button.disabled=true;
}
else {
submit_button.disabled=false;
}