Esempio n. 1
0
def process_arguments(argv, assignments):
    try:
        if len(argv) <= 1:
            print_usage(option_flags, assignments)
            exit()

        args = parse_options(argv[1:], option_flags)

        assignment = parse_assignment(args, assignments)

        validate_options_for(assignment)

        if print_usage_flag:
            print_usage(option_flags, assignments)
            exit()

        base_test = assignments[0][3]

        if bulk_grade_mode:
            do_bulk_grading(assignment, base_test)
        else:
            check_assignment(assignment, base_test)

    finally:
        leave_quiet_mode()
Esempio n. 2
0
def reset_state():
    global bulk_grade_mode, bulk_grade_directory
    global file_with_commit_links

    bulk_grade_mode = False
    file_with_commit_links = None
    bulk_grade_directory = DEFAULT_BULK_GRADE_DIRECTORY
    set_assignment_name('')

    leave_quiet_mode()