This is a request for a postprocessing script to fix the way moodle downloads assignments.
This script should work on Linux so things like bash might be relevant tool. (sorry I am using Linux)
This is how Moodle does things currently.
Say I have 2 students, username st1 and st2.
They wrote a homework hwk1 which has 2 files, so each has
hwk1p1.txt and hwk1p2.txt.
When teh teacher downloads the hwk1 zip (really 4 files, 2 from each
students) it will look
something like this:
st1-hwk1p1.txt
st1-hwk1p2.txt
st2-hwk1p1.txt
st2-hwk1p2.txt.
What I would like to have is this.
I would like to have a postprocessor script that takes the files that Moodle geneerates and creates directory for each student named as username and the original files
names unchanged.
In other words it would look like this after the processing.
In the download dir there would be 2 dirs, st1 and st2 created.
And in st1 I would see file hwk1p1.txt, hwk1p2.txt.
In st2 I would file hwk1p1.txt, hwk1p2.txt.
The best solution would be if Moodle gave that option in the assignment download page.
But since there is no such option, I am asking for a script.
The script would take the moodle file names like st1_hwk1p1.txt. Create folder st1,
and rename the file to hwk1p1.txt, and move it to directory st1. Similarly for the other files.
thank you
General developer forum
request for: each assignment into student-named folder
This discussion has been locked so you can no longer reply to it.