示例#1
0
def send_report(aid, username):
    """sends the most current report for the given assignment to the
    given username"""
    print("sending %s report to %s." % (aid, username))
    email = get_email(username)
    report = queries.get_report(aid, username)
    send_report_to_email(report, email)
示例#2
0
def submission_report(assignment, username):
    submission,autograder,grade = queries.get_report(assignment, username)
    comments = queries.get_submission_comments(assignment, username)

    students = queries.who_turned_in(assignment)
    p,n = grading.find_prev_next(students, username)

    ## just in case.
    submission.replace("\r", "")
    sourcelines = submission.split("\n")

    return template("gradingreport",
                    prevstudent=p,
                    nextstudent=n,
                    student=username,
                    assignment=assignment,
                    sourcelines=sourcelines,
                    grade=grade,
                    autograder=autograder,
                    linenumbers=grading.makelinenumbers(submission),
                    existingcomments=comments)