Beispiel #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)
Beispiel #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
Beispiel #3
0
def add_student(first, last, email, domain, course):
    course = Course.lookup(course)
    name = '%s %s' % (first, last)
    s = Student.objects.get_or_create(name=name, email=email, course=course)[0]
    u = add_user_login(first, last, email)
    s.user = u
    s.domain = domain
    s.save()
    return s
Beispiel #4
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
Beispiel #5
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
Beispiel #6
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]
Beispiel #7
0
def list_course_content():
    data = [banner('Course Content Data')]
    data += Course.list()
    for c in unc_courses():
        data.append(banner(c))
        data.append('\nPROJECTS:\n')
        data += [str(p) for p in Project.list(c)]
        data.append('\nLESSONS:\n')
        data += Lesson.list(c)
        data.append('\nSTUDENTS:')
        data.append(list_students(c))
        # data.append('\nASSIGNMENTS:')
        # data.append(list_assignments(c))
    return text_join(data)
Beispiel #8
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]
Beispiel #9
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))
Beispiel #10
0
def list_students(course):
    return ("\nStudents %s:\n" % course) + text_join(
        [str(s) for s in Course.students(course)])
Beispiel #11
0
def unc_courses():
    return Course.all()
Beispiel #12
0
def student_data(course):
    return Course.students(course)
Beispiel #13
0
def assign_homework(course, project, due):
    for s in Course.students(course):
        add_assignment(course, s, project, due)
Beispiel #14
0
def show_assignments():
    return text_join([list_assignments(c) for c in Course.all()])