Exemplo n.º 1
0
def grade_class(directory):
    remoteID = RemoteID(os.path.join(directory, 'RemoteID.csv'))
    datadir = os.path.join(directory, 'SessionData')
    outputdir = os.path.join(directory, 'Upload')

    def find_files(name):
        return name[0] == 'L' and name[-3:] == 'csv'

    files = filter(find_files, os.listdir(datadir))
    files.sort()
    for i, file in enumerate(files):
        inputname = os.path.join(datadir, file)
        session = ClickerGrades(inputname, remoteID)
        outputname = os.path.join(outputdir, 'Rlqz{0:02d}.csv'.format(i + 1))
        session.output_CHIP(outputname)
Exemplo n.º 2
0
 def test_small_file(self):
     small_class = RemoteID('smallremoteID.csv')
     small_class.convert_file()
     print small_class.conversion
     self.assertEqual(small_class.conversion, self.ans2)
Exemplo n.º 3
0
 def test_convertID(self):
     conversion = RemoteID.convertID(self.student1)
     self.assertEqual(conversion, self.ans1)