# return [u.name for u in UserTestGroup.objects.raw("select * from auth_user, student_usertestgroup, student_usertestgroup_users where auth_user.id = student_usertestgroup_users.user_id and student_usertestgroup_users.usertestgroup_id = student_usertestgroup.id and auth_user.id = %s", [user.id])]
defreplace_custom_tags(tree):
tags=os.listdir(settings.DATA_DIR+'/custom_tags')
defreplace_custom_tags(course,tree):
tags=os.listdir(course.path+'/custom_tags')
fortagintags:
forelementintree.iter(tag):
element.tag='customtag'
impl=etree.SubElement(element,'impl')
impl.text=tag
defcourse_xml_process(tree):
defcourse_xml_process(course,tree):
''' Do basic pre-processing of an XML tree. Assign IDs to all
items without. Propagate due dates, grace periods, etc. to child