def assignment_submission_dict() -> Dict[Tuple[str, str], DataFrame]: # arrange submission: Dict[str, str] = { "state": CREATED_STATE, } submissions_df = DataFrame.from_dict( [ merged_dict(submission, BOILERPLATE), ] ) # act return submissions_to_assignment_submissions_dfs(submissions_df)
def _get_assignment_submissions( classroom_resource: Resource, sync_db: sqlalchemy.engine.base.Engine, output_directory: str, ): logger.info("Writing LMS UDM AssignmentSubmissions to CSV files") course_ids: List[str] = result_bucket["course_ids"] submissions_df = request_all_submissions_as_df( classroom_resource, course_ids, sync_db ) result_bucket["submissions_df"] = submissions_df write_assignment_submissions( submissions_to_assignment_submissions_dfs(submissions_df), now, output_directory, )
def assignment_submissions_dicts() -> Dict[Tuple[str, str], DataFrame]: # arrange submission1: Dict[str, str] = { "id": ID, "courseId": COURSE_ID, "courseWorkId": COURSEWORK_ID, } submission2: Dict[str, str] = { "id": submission2_id, "courseId": COURSE_ID, "courseWorkId": coursework2_id, } submissions_df = DataFrame.from_dict([ merged_dict(submission1, BOILERPLATE), merged_dict(submission2, BOILERPLATE), ]) # act return submissions_to_assignment_submissions_dfs(submissions_df)
def assignment_submissions_dicts() -> Dict[Tuple[str, str], DataFrame]: # arrange submissions_df = DataFrame({ "courseId": [COURSE_ID], "courseWorkId": [COURSEWORK_ID], "id": [ID], "userId": [USER_ID], "creationTime": [CREATION_TIME], "updateTime": [UPDATE_TIME], "state": [STATE], "late": [LATE], "draftGrade": [DRAFT_GRADE], "assignedGrade": [ASSIGNED_GRADE], "alternateLink": [ALTERNATE_LINK], "associatedWithDeveloper": [ASSOCIATED_WITH_DEVELOPER], "submissionHistory": [SUBMISSION_HISTORY], "CreateDate": [CREATE_DATE], "LastModifiedDate": [LAST_MODIFIED_DATE], }) # act return submissions_to_assignment_submissions_dfs(submissions_df)