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)
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
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
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
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]
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]
def show_students(course): print('Students - %s' % len(Course.students(course))) for s in Course.students(course): print('%s. %s' % (s.pk, s.name))
def list_students(course): return ("\nStudents %s:\n" % course) + text_join( [str(s) for s in Course.students(course)])
def student_data(course): return Course.students(course)
def assign_homework(course, project, due): for s in Course.students(course): add_assignment(course, s, project, due)