File locking / prevent deletion by user

File locking / prevent deletion by user

by Enrique Castro -
Number of replies: 9
Picture of Core developers Picture of Particularly helpful Moodlers

Hi:

We at ULPGC are migrating our moodle 1.9 sites to Moodle 2 (2.3 if not delayed). I have realized that new file management introduces a problem for bookeeping in Assignment/Assing.

We use a lot of assignments with resubmission option (if interested, I've creted a plugin for new Assig to allow that): after submitting and being graded the students can re-submit again to improve grades (while the assignment due date is not met).

The system worked great in 1.9 but the teachers testing it in 2.3 find that after grading the student find his/her assignment  filearea open: he can submit a new fuile but he can also DELETE the previous one.

This is a problem if you are interested in keeping a record of progression and grades along re-submissions. If the student can delete the files submitted previously then ther will be grades without a clear basis (not tecnically, at DB level, but administratively), this open a lot of corners if there are conflicts about grades.

Thus, ¿is it possible to lock a file to prevent it to be deleted by the user, the owner? Files coukld be deleted by admins.

I do not know deeply the File API, but I wonder if the file.status filed coud be used in this context. For instance, that file delete methods would check file.status and NOT detele (or even not offer the "delete" button) a fiel if file.status is set approppiately.

If there is not a mechanism to lock sumitted files in this moment, I will fill a bug/feature request at moodle tracker.

 

 

 

Average of ratings: -
In reply to Enrique Castro

Re: File locking / prevent deletion by user

by ben reynolds -

How odd. "Allow deleting" seems to be missing in 2.3 But it is certainly present in 2.2.3.

In reply to ben reynolds

Re: File locking / prevent deletion by user

by Enrique Castro -
Picture of Core developers Picture of Particularly helpful Moodlers

I have reviewed the behavior of the several subtypes of assignment in moodle 2.2.3, and there are problems with respect to our custom behavior in 1.9

a) Advanced upload

There is indeed a setting "allow deleting", but I do NOT see any effect in 2.2.3. According to documentation "If enabled, students may delete uploaded files at any time before submitting for grading", so if set to NO, students should NOT be able to delete files while in draft modfe , may add new ones but not deleting.

However, what happens is that either students can or cannot edit the whole filearea with the new filemanager. If the filemanager is active, each file has a javascript manager that allows moving and deleting. With NO effect of the "allow deleting"  setting. Students can delete files even if "allow deleting" option is set to NO.

b) Single file upload

Here there is a "resubmit" setting, that is what we need at ULPGC. But resubmitting implies loss acces to previous file. Neither student nor teacher hav a list of submitted files, the last one the valid. The assignment page shows just ONE file, the last one submitted without any reference to a submission history. What is correct for "single file upload", but not what we use.

In reply to Enrique Castro

Re: File locking / prevent deletion by user

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

This is a very interesting point. And we do lack this ability.

Will be really great if you can create issues about that. There are actually two:

1. Filemanager form element should have options to prevent existing files from deleting and overwriting (two options needed). This issue will come to me.

2. Assign module should have an option to "lock" files in filearea after submission was graded. This issue will go to Dan Marsden and he will decide how it should work along with files number limit and existing 'prevent submissions changes' button.

In reply to Marina Glancy

Re: File locking / prevent deletion by user

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

sorry for mistake, it's not Dan Marsden, it's Damyon Wise

In reply to Marina Glancy

Re: File locking / prevent deletion by user

by Willem van Oosten -

Hi Marina,

 

Do you know if there is any progress to add the option of preventing deletion of submitted assignment yet. This is of major importance just to avoid claimes of students about submitted (and deleted) work

Since the new schoolyear is almost starting I would like to start using 2.3.1+ soon, I have already migrated (manually, since the upgrade did not work) it would be a lot of work to role back now

thanks,

 

Willem

In reply to Willem van Oosten

Re: File locking / prevent deletion by user

by Martin Matthews -

I'll bump this one as well.  Students deleting marked work is causing havoc for us.  If my units are checked by an EV I am going to have trouble finding samples which include all the evidence even if the sample is not reandomised.  Anyone know whether there has been any progress (hopefully for 2.4).

In reply to Martin Matthews

Re: File locking / prevent deletion by user

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The easiest way to prevent students deleting previous work is to lock the assignment or require them to click 'submit for marking'. Both of these prevent the students from making any changes to the files they have already submitted.

I understand the idea of wanting to allow students to make a resubmission on their assignment (I used to teach BTEC qualifications which allow for that), but that is currently best achieved by duplicating the assignment and allowing the student to resubmit to the duplicate - this means you can set new deadlines and there is a very clear distinction between the original submission and the resubmission (this is what I did for all of my assignments and, on the whole, it worked reasonably well).

The real solution to this problem is not to adjust the filemanager to prevent files from being deleted, but to adjust the assignment module to fully support resubmissions, with each set of files being kept in a separate area, along with a user interface to switch between submissions (I'm planning on including a limited version of this in the Moodle 2.3 verison of my uploadpdf plugin, once I've finished it, but a full implementation would need changes to the assign module itself). The best way to do this would probably involve adding a 'submission number' to the assign_submissions table and then insert extra records into this table to cover the different submissions (as the submission / feedback plugins generally work with the ID from the 'assign_submission' table, they shouldn't even 'realise' that each user had multiple submissions, they should just display the results for the currrently-selected submission, making this a relatively straight-forward fix).

If there is significant interest in this, then I might even be able to put together a fuller description of this and possibly even a patch to implement it (but I'm not making any promises, as I've got several other bits and pieces to work on at the moment).

In reply to Martin Matthews

Re: File locking / prevent deletion by user

by Robert Higginson -

Thee seems to be varous comments about allowing students to resubmit but not deleting heir older versions - has any one who teaches BTEC courses have a solution to prevent the deletion of older versions.