Skip to content

Instantly share code, notes, and snippets.

@hig3 hig3/
Created Aug 2, 2017

What would you like to do?
Python script to make directory structure of feedback files from the offline grading worksheet in Moodle Assignments
# make directories to be zipped for feedback files
# from offline grading worksheet
# of Assignment activity in Moodle
# Usage: cat offlinegradingworksheet.csv | python
# Saburo Higuchi
# Time-stamp "2017-08-02 Wed 16:47 JST hig"
import csv
import sys
import re
import os
reader = csv.reader(sys.stdin, delimiter=',',quotechar='"')
header=next(reader) # skip the header
# Assume:
# row[0] internal participant ID
# row[1] Fullname
for row in reader:
dirname="%s_%s_assignsubmission_file_" % (fullname,partid)
# note no error checking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.