Beispiel #1
0
def list_course_content():
    data = [banner('Course Content Data')]
    data += Course.list()
    for c in unc_courses():
        data.append(banner(c))
        data.append('\nPROJECTS:\n')
        data += [str(p) for p in Project.list(c)]
        data.append('\nLESSONS:\n')
        data += Lesson.list(c)
        data.append('\nSTUDENTS:')
        data.append(list_students(c))
        # data.append('\nASSIGNMENTS:')
        # data.append(list_assignments(c))
    return text_join(data)
Beispiel #2
0
 def show_differences(t):
     if t.expected == None:
         t.expected = 'Initial expectation'
         t.save()
     if t.output != t.expected:
         diffs = differences(t.output, t.expected)
         return banner(t.name) + diffs
Beispiel #3
0
def tst_output(self, args):
    if args:
        t = Test.objects.filter(name=args[0])
        if not t:
            self.stdout.write('Could not find test case: %s' % args[0])
        else:
            self.stdout.write(banner(t[0].name))
            self.stdout.write(t[0].output)

    else:
        tests = Test.objects.all()
        if tests:
            for t in tests:
                self.stdout.write(banner(t.name))
                self.stdout.write(t.output)
        else:
            self.stdout.write('no tests found')
Beispiel #4
0
def show_course_files(course):
    return banner(course) + text_join(
        recursive_list('Documents/unc/%s' % course))