Upgraded payload for create_course_attempts and tested it out with various enrollments.

This commit is contained in:
Norm Rasmussen
2025-01-29 16:02:42 -05:00
parent ac9fb1f467
commit e79ac3589c

View File

@ -18,6 +18,8 @@ probject = {}
items = {}
courses = {}
people = {}
gym_climbing = "f1b92092-60bd-4d52-922a-e462f132b69c"
person_uuid = "2bcfa4b9-eb76-4808-a922-946526f60a5a"
item_types = [
"courses",
@ -114,15 +116,14 @@ def create_attempt_resource():
"data": {
"learner_id": f"{list(people.values())[0]}",
"course_id": f"{list(courses.values())[0]}",
"progress": 100,
"enrolled_at": f"{datetime.now() - timedelta(hours=3)}",
"started_at": f"{datetime.now() - timedelta(hours=2)}",
"completed_at": formatted_now,
"completed_activities": [
{
"id": str(uuid.uuid4()),
"completed_at": formatted_now
}
# {
# "id": str(uuid.uuid4()),
# "completed_at": formatted_now
# }
]
}
}
@ -210,6 +211,8 @@ def get_group_person(list):
def start_migration():
print("Starting Migration Attempt.")
print("")
start_url = (
f"{baseurl}/migration/projects/{list(probject.values())[0]}/start_migration"
)
@ -222,4 +225,4 @@ def start_migration():
if __name__ == "__main__":
create_project(project_name)
get_people(email, course)
# start_migration()
start_migration()