Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 2.18 KB

README.md

File metadata and controls

29 lines (23 loc) · 2.18 KB

Unpack-and-prepare-data

A simple yet efficient script for dealing with data coming from moodle.

An utilitary for unpacking and selecting folders

The project at hand was designed to help teachers mnanage files coming from platforms such as moodle.

It contains the following functions:

  • unpacking data
  • removing all files except archives
  • adding base files from another folder
  • select students and move them in another folder
  • run unit tests using the make test command - the unit testing has to have a make test rule that runs the entire code

Make rules:

  1. rename_submissions: - removes trailing characters from the folders in the submissions folder
  2. unzip_files: - unzips all the files placed in the submissions folder
  3. get_students: runs the above commands and then sleects all the students from the submissions folder that are also in students.txt and places them in the folder named 312AB (to change the folder name just go in the makefile and change 312AB to whatever you need)
  4. remove_not_archive: - removes all the files from the submissions folder subfolders that are not a valid archive
  5. prepare_all: - runs the get_students make rule and then selects only the files that have a .c extension (this can be changed, just change or add the parameter endings to the prepare_moss routine), the files are stored in the folder 312AB - for Moss (this can also be changed via the makefile, in order to change the - for Moss ending you'll have to add the parameter folder_ending to the prepare_moss routine)
  6. prepare_for_grading: - runs the get_students make rule and then creates 2 additional folders, the first one it's identical with the one mentioned above, the other one selects all the files ending in .c and adds the files from the data folder to every submission
  7. prepare_for_grading_all: - selects all the students from the submission folder, NOT just the ones from the students.txt file, and runs the above mentioned command (prepare_for_grading) on all of them
  8. clean: - removes the folders created by the script