Ejemplo n.º 1
0
def assign_reviews_round1():
    for s in Course.students('bacs200'):
        create_review(s, s, 'bacs200/index.html', '2019-10-25',
                      bacs200_1_requirements, bacs200_1_notes)
    for s in Course.students('bacs350'):
        create_review(s, s, 'bacs350/index.php', '2019-10-25',
                      bacs350_1_requirements, bacs350_1_notes)
Ejemplo n.º 2
0
def student_project_data(course):
    data = []
    for s in Course.students(course):
        data.append(
            dict(student=s,
                 designer=designer_scores(s.pk),
                 reviewer=reviewer_scores(s.pk)))
    return data
Ejemplo n.º 3
0
def review_groups(course):
    show_students(course)
    groups = []
    num = 4
    s = [a.pk for a in Course.students(course)]
    shuffle(s)
    x = 0
    while s[x:x + num]:
        groups.append(s[x:x + num])
        x += num
    # groups = [groups[0] + groups[-1]] + groups[1:-1]
    return groups
Ejemplo n.º 4
0
def review_groups(course):

    groups = []
    num = 8
    s = Course.students(course)
    shuffle(s)
    x = 0
    while s[x:x + num]:
        groups.append(s[x:x + num])
        x += num
    # groups = [groups[0] + groups[-1]] + groups[1:-1]
    return groups
Ejemplo n.º 5
0
def query_reviewers(course):
    def reviewer_summary(student):
        student_id = student.pk
        reviews = student_reviews_done(student_id)
        not_done = student_reviews(student_id)
        assigned = len(reviews) + len(not_done)
        rounds = 13
        points = 10 * rounds * len(reviews) / assigned
        return student, reviews, "%d done of %d assigned, score = %d" % (
            len(reviews), assigned, points)

    all_students = Course.students(course)
    return [reviewer_summary(s) for s in all_students]
Ejemplo n.º 6
0
def query_designers(course):
    def designer_summary(student):
        student_id = student.pk
        reviews = review_feedback(student_id).filter(
            page='bacs200/projects/nonprofit.html')
        scores = ','.join([
            str(r.score) for r in reviews
            if r.page == 'bacs200/projects/nonprofit.html'
        ])
        return student, reviews, "%d reviews, scores: %s" % (len(reviews),
                                                             scores)

    all_students = Course.students(course)
    return [designer_summary(s) for s in all_students]
Ejemplo n.º 7
0
def show_students(course):
    print('Students - %s' % len(Course.students(course)))
    for s in Course.students(course):
        print('%s. %s' % (s.pk, s.name))
Ejemplo n.º 8
0
def list_students(course):
    return ("\nStudents %s:\n" % course) + text_join(
        [str(s) for s in Course.students(course)])
Ejemplo n.º 9
0
def student_data(course):
    return Course.students(course)
Ejemplo n.º 10
0
def assign_homework(course, project, due):
    for s in Course.students(course):
        add_assignment(course, s, project, due)