Exemplo n.º 1
0
def assignment(gradebook: Gradebook) -> Gradebook:
    gradebook.add_assignment('foo')
    gradebook.add_notebook('p1', 'foo')
    gradebook.add_grade_cell('test1', 'p1', 'foo', max_score=1, cell_type='code')
    gradebook.add_grade_cell('test2', 'p1', 'foo', max_score=2, cell_type='markdown')
    gradebook.add_solution_cell('solution1', 'p1', 'foo')
    gradebook.add_solution_cell('test2', 'p1', 'foo')
    gradebook.add_source_cell('test1', 'p1', 'foo', cell_type='code')
    gradebook.add_source_cell('test2', 'p1', 'foo', cell_type='markdown')
    gradebook.add_source_cell('solution1', 'p1', 'foo', cell_type='code')
    return gradebook
Exemplo n.º 2
0
def assignmentWithTask(gradebook: Gradebook) -> Gradebook:
    for f in ['foo', 'foo2']:
        gradebook.add_assignment(f)
        for n in ['p1', 'p2']:
            gradebook.add_notebook(n, f)
            gradebook.add_solution_cell('solution1', n, f)
            gradebook.add_solution_cell('test2', n, f)
            gradebook.add_source_cell('test1', n, f, cell_type='code')
            gradebook.add_source_cell('test2', n, f, cell_type='markdown')
            gradebook.add_source_cell('solution1', n, f, cell_type='code')
            gradebook.add_grade_cell('grade_code1', n, f, cell_type='code', max_score=1)
            gradebook.add_grade_cell('grade_code2', n, f, cell_type='code', max_score=10)
            gradebook.add_grade_cell('grade_written1', n, f, cell_type='markdown', max_score=1)
            gradebook.add_grade_cell('grade_written2', n, f, cell_type='markdown', max_score=10)
            gradebook.add_task_cell('task1', n, f, cell_type='markdown', max_score=2)
            gradebook.add_task_cell('task2', n, f, cell_type='markdown', max_score=20)

    return gradebook