Ejemplo n.º 1
0
def grade_added():
    hackbright_app.connect_to_db()
    github = request.args.get("github")
    title =  request.args.get("title") 
    grade = request.args.get("grade")
    hackbright_app.give_student_grade(github, title, grade)
    html = render_template("grade_added.html", github=github, title=title, 
                                                grade=grade)
    return html
Ejemplo n.º 2
0
def view_new_grade():
    hackbright_app.connect_to_db()
    student = request.form.get("student")
    title = request.form.get("title")
    grade = request.form.get("grade")
    hackbright_app.give_student_grade(student, title, grade)
    return render_template("view_grade.html", student = student,
                                                title = title,
                                                grade = grade)
Ejemplo n.º 3
0
def give_grade():
    hackbright_app.connect_to_db()
    project_title = request.args.get("project_title")
    student_github = request.args.get("student_github")
    grade = request.args.get("grade")
    give_grade = hackbright_app.give_student_grade(project_title, student_github, grade)
    
    return redirect('/student?github=%s' % student_github)
Ejemplo n.º 4
0
def grade_given():
    hackbright_app.connect_to_db()
    github = request.args.get("github")
    project = request.args.get("project")
    grade = request.args.get("grade")
    status = hackbright_app.give_student_grade(github, project, grade)

    if status == 1:
        return render_template("grade_given.html",
                               github=github,
                               project=project,
                               grade=grade)
    else:
        return render_template(
            "error.html",
            error_message=
            "Oops, we failed to add the grade %s to the project %s for account %s."
            % (grade, project, github))
Ejemplo n.º 5
0
def put_student_grade_in_db():
  hackbright_app.connect_to_db()
  project_name = request.args.get("project_name")
  project_grade = request.args.get("project_grade")
  hackbright_app.give_student_grade(last_name, project_name, project_grade)