예제 #1
0
def main(user_id):
    '''
    For a given user, displays information about one of their canvas courses.

    Parameters:
        user (str): A user token
    Returns: None
    '''
    # User
    user = canvas_requests.get_user(user_id)
    print_user_info(user)
    # Course
    courses = canvas_requests.get_courses(user_id)
    available_courses = filter_available_courses(courses)
    print_courses(available_courses)
    course_ids = get_course_ids(available_courses)
    course_id = choose_course(course_ids)
    # Submissions
    submissions = canvas_requests.get_submissions(user_id, course_id)
    # Statistics
    summarize_points(submissions)
    summarize_groups(submissions)
    # Plots
    plot_scores(submissions)
    plot_grade_trends(submissions)
예제 #2
0
def main(user_id):
    user = canvas_requests.get_user(user_id)
    print_user_info(user)
    available_courses = filter_available_courses(
        canvas_requests.get_courses(user_id))
    print_courses(available_courses)
    course_ids = get_course_ids(available_courses)
    valid_id = choose_course(course_ids)
    submissions = canvas_requests.get_submissions(user_id, valid_id)
    summarize_points(submissions)
def main(name):
    #The main function, executes all the other functions
    print_user_info(canvas_requests.get_user(name))
    print_courses(canvas_requests.get_courses(name))
    courses = filter_available_courses(canvas_requests.get_courses(name))
    course_ids = get_course_ids(canvas_requests.get_courses(name))
    selected_course = choose_course(course_ids)
    summarize_points(canvas_requests.get_submissions(name, selected_course))
    summarize_groups(canvas_requests.get_submissions(name, selected_course))
    plot_scores(canvas_requests.get_submissions(name, selected_course))
    plot_grade_trends(canvas_requests.get_submissions(name, selected_course))
예제 #4
0
def main(name):
    user = canvas_requests.get_user(name)
    print_user_info(user)
    courses = canvas_requests.get_courses(name)
    courses = filter_available_courses(courses)
    print_courses(courses)
    course_ids = get_course_ids(courses)
    course_id = choose_course(course_ids)
    submissions = canvas_requests.get_submissions(name,course_id)
    summarize_points(submissions)
    summarize_groups(submissions)
예제 #5
0
def main(user_id: str):
    user = canvas_requests.get_user(user_id)
    print_user_info(user)
    course = canvas_requests.get_courses(user_id)
    courses = filter_available_courses(course)
    print_courses(courses)
    course_ids = get_course_ids(courses)
    course_id = choose_course(course_ids)
    submissions = canvas_requests.get_submissions(user_id, course_id)
    summarize_points(submissions)
    summarize_groups(submissions)
    plot_scores(submissions)
    plot_grade_trends(submissions)
def main(user_id):
    user = canvas_requests.get_user(user_id)
    print_user_info(user)
    courses = canvas_requests.get_courses(user_id)
    list_courses = filter_available_courses(courses)
    print_courses(courses)
    list_course_ids = get_course_ids(courses)
    user_chosen_id = choose_course(list_course_ids)
    a_list = canvas_requests.get_submissions(user_id, user_chosen_id)
    summarize_points(a_list)
    summarize_groups(a_list)
    plot_scores(a_list)
    plot_grade_trends(a_list)
def main(user):
    '''
    Consumes a string representing the user token (e.g., 'hermione') and calls all the other functions as shown in the diagram.
    :param user:
    :return:
    '''
    print_user_info(canvas_requests.get_user(user))
    courses = filter_available_courses(canvas_requests.get_courses(user))
    print_courses(courses)
    selected = choose_course(get_course_ids(courses))
    summarize_points(canvas_requests.get_submissions(user, selected))
    summarize_groups(canvas_requests.get_submissions(user, selected))
    plot_scores(canvas_requests.get_submissions(user, selected))
    plot_grade_trends(canvas_requests.get_submissions(user, selected))
def main (user_id):
    user = canvas_requests.get_user (user_id)
    print_user_info (user)
    #above is user info
    courses = canvas_requests.get_courses (user_id)
    filtered_courses = filter_available_courses (courses)
    print_courses (filtered_courses)
    #above is courses info
    course_ids = get_course_ids (courses)
    course_id = choose_course (course_ids)
    #above is course ids and course id info
    submissions = canvas_requests.get_submissions (user_id, course_id)
    summarize_points (submissions)
    summarize_groups (submissions)
    plot_scores (submissions)
    plot_grade_trends (submissions)
예제 #9
0
def main(user_id):
    import requests
    import canvas_requests

    #Initializes variables
    user_info = canvas_requests.get_user(user_id)
    courses = canvas_requests.get_courses(user_id)
    courseIDs = get_course_ids(courses)
    ids = choose_course(courseIDs)
    subs = canvas_requests.get_submissions(user_id, ids)

    #Calls functions using variables
    print_user_info(user_info)
    filter_available_courses(courses)
    print_courses(courses)
    summarize_points(subs)
    summarize_groups(subs)
    plot_scores(subs)
    plot_grade_trends(subs)
예제 #10
0
def main(user_id: str):
    '''
    Consumes a user token and calls other functions

    Args:
        user_id (str): The string of text that represents the user token
    '''
    user = canvas_requests.get_user(user_id)
    print_user_info(user)
    courses = canvas_requests.get_courses(user_id)
    filtered_courses = filter_available_courses(courses)
    print_courses(filtered_courses)
    course_ids = get_course_ids(filtered_courses)
    course_id = choose_course(course_ids)
    submissions = canvas_requests.get_submissions(user_id, course_id)
    summarize_points(submissions)
    summarize_groups(submissions)
    plot_scores(submissions)
    plot_grade_trends(submissions)
def main(userName):
    #get student file from canvas requests
    studentFile = crs.get_user(userName)
    #print information to display
    print_user_info(studentFile)
    #filter available current classes for user
    filteredCourses = filter_available_courses(crs.get_courses(userName))
    #print filtered courses
    print_courses(filteredCourses)
    #get id numbers for courses
    courseIDS = get_course_ids(filteredCourses)
    #loop for user to choose a valid id
    chosenCourse = choose_course(courseIDS)
    #get submissions to choosen course
    submissions = crs.get_submissions(userName, chosenCourse)
    #get current grade of course
    summarize_points(submissions)
    #catagorize grades by group
    summarize_groups(submissions)
    #plot data for distribution of grade and trend over the semester
    plot_scores(submissions)
    plot_grade_trends(submissions)
예제 #12
0
def main(userID):

    #--User data portion--#
    userInfo = canvas_requests.get_user(userID)

    print_user_info(userInfo)

    #--User courses portion--#
    userCourses = canvas_requests.get_courses(userID)
    filteredUserCourses = filter_available_courses(userCourses)

    print_courses(filteredUserCourses)

    #---Stats / plotting Portion---#
    listOfCourses = get_course_ids(filteredUserCourses)
    chosenCourse = choose_course(listOfCourses)
    userSubmissions = canvas_requests.get_submissions(userID, chosenCourse)

    summarize_points(userSubmissions)
    summarize_groups(userSubmissions)
    plot_scores(userSubmissions)
    plot_grade_trends(userSubmissions)
예제 #13
0
def main(user_id):
    return canvas_requests.get_user(user_id)
예제 #14
0
    course_ids = []
    for course in course_dictionaries:
        course_ids.append(course['id'])
    print()
    return course_ids


def choose_course(course_ids):
    user_input = input("Enter a valid id")
    user_input = int(user_input)
    while user_input not in course_ids:
        user_input = int(input("Enter a valid id"))
    return user_input


def summarize_points(submissions):
    possible = 0
    points_obtained = 0


if __name__ == "__main__":
    print_user_info(canvas_requests.get_user("hermione"))
    filter_available_courses(canvas_requests.get_courses('hermione'))
    print_courses(canvas_requests.get_courses('hermione'))
    get_course_ids(canvas_requests.get_courses('hermione'))
    choose_course(canvas_requests.get_courses('hermione'))
    # main
    # main('harry')

    # https://community.canvaslms.com/docs/DOC-10806-4214724194
    # main('YOUR OWN CANVAS TOKEN (You know, if you want)')