estudiantes = [ ('edgar', '1234',17,13,16,12,14,16, 9), ('osuna', '1234',15,12,14,18,14,19, 8), ('malu', '1234', 7,10, 4, 8,17,14,16), ('jose', '1234',17, 6,16,13,14,11, 8), ('david', '1234',15,10,13,14,17,15,11), ('juan', '1234',11,13,11,10,13,18, 8), ('cota', '1234',13, 7,18,14,12,10,13), ('omar', '1234', 7, 3, 7,12,16,17, 6), ('santana', '1234',10, 9,13,13,13,14,13), ('hector', '1234', 1,11,11,11,18,13,13), ('edie', '1234',14, 6,16,12,12,13,12), ('baby', '1234',15,18,20,17,13,18,17), ('saul', '1234',13,11,14,11,14,14,13), ('brenda', '1234',17,13,20,12,14,11,16), ('samara', '1234',14,15,13,12,15,16,12), ('daniel', '1234', 9, 8,15,11,13,14,13), ('jorge', '1234',17,12,14,17,19,18,14), ('mike', '1234',15,16,17,18,18,13,11), ('luis', '1234',11, 7,11,10,11,12, 6)] for e in estudiantes: User.objects.filter(username=e[0]).delete() u = User.objects.create_user(e[0],e[0], e[1]) u.is_active = True u.save() lsu=LearningStyleInventory(visual=e[2],verbal=e[3],aural=e[4],physical=e[5],logical=e[6], social=e[7], solitary=e[8], user = u) lsu.save() print(e[0], e[1])
## Example of two Users ## ## User.objects.filter(username='******').delete() User.objects.filter(username='******').delete() j = User.objects.create_user('ana', '*****@*****.**', '1234') j.is_active = True j.save() p = User.objects.create_user('paul', '*****@*****.**', '1234') p.is_active = True p.save() lsj=LearningStyleInventory(visual=12,verbal=11,aural=15,physical=9,logical=11, social=9, solitary=10, user = j) lsj.save() lsp=LearningStyleInventory(visual=12,verbal=11,aural=20,physical=9,logical=11, social=9, solitary=7, user = p) lsp.save() s = SimpleSequencing() s.assignActivityTree(j,POO) s.assignActivityTree(p,POO) estudiantes = [ ]
('omar', '1234', 7, 3, 7, 12, 16, 17, 6), ('santana', '1234', 10, 9, 13, 13, 13, 14, 13), ('hector', '1234', 1, 11, 11, 11, 18, 13, 13), ('edie', '1234', 14, 6, 16, 12, 12, 13, 12), ('baby', '1234', 15, 18, 20, 17, 13, 18, 17), ('saul', '1234', 13, 11, 14, 11, 14, 14, 13), ('brenda', '1234', 17, 13, 20, 12, 14, 11, 16), ('samara', '1234', 14, 15, 13, 12, 15, 16, 12), ('daniel', '1234', 9, 8, 15, 11, 13, 14, 13), ('jorge', '1234', 17, 12, 14, 17, 19, 18, 14), ('mike', '1234', 15, 16, 17, 18, 18, 13, 11), ('luis', '1234', 11, 7, 11, 10, 11, 12, 6), ('*****@*****.**', '1234', 12, 10, 12, 13, 10, 18, 10)] for e in estudiantes: User.objects.filter(username=e[0]).delete() u = User.objects.create_user(e[0], e[0], e[1]) u.is_active = True u.save() lsu = LearningStyleInventory(visual=e[2], verbal=e[3], aural=e[4], physical=e[5], logical=e[6], social=e[7], solitary=e[8], user=u) lsu.save() print e[0], e[1]