# 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])]
# 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(course,tree):
defreplace_custom_tags(course,tree):
tags=os.listdir(course.path+'/custom_tags')
try:
fortagintags:
tags=os.listdir(course.path+'/custom_tags')
forelementintree.iter(tag):
fortagintags:
element.tag='customtag'
forelementintree.iter(tag):
impl=etree.SubElement(element,'impl')
element.tag='customtag'
impl.text=tag
impl=etree.SubElement(element,'impl')
impl.text=tag
exceptos.error:
# The directory must not exist. This is okay, as it is optional. If it is empty, git has trouble tracking it
pass
defcourse_xml_process(course,tree):
defcourse_xml_process(course,tree):
''' Do basic pre-processing of an XML tree. Assign IDs to all
''' Do basic pre-processing of an XML tree. Assign IDs to all
<p>The course will consist of 24 lectures, each lasting 50 minutes. There will be regular assignments consisting of map tests and short essays.</p>
<p>The course will consist of 24 lectures, each lasting 50 minutes. There will be regular assignments consisting of map tests and short essays.</p>
</li>
</li>
<li>Are there any prerequisites?
<li>Are there any prerequisites?
<p>No - anyone and everyone is welcome to take this class.</p>
<p>No - anyone and everyone is welcome to take this course.</p>
</li>
</li>
<li>What textbook should I buy?
<li>What textbook should I buy?
<p>Although the lectures are designed to be self-contained, we recommend (but do not require) that students refer to the book Worlds Together, Worlds Apart: A History of the World: From 1000 CE to the Present (W W Norton, 3rd edition) -- Volume II, which was written specifically for this course.</p>
<p>Although the lectures are designed to be self-contained, we recommend (but do not require) that students refer to the book Worlds Together, Worlds Apart: A History of the World: From 1000 CE to the Present (W W Norton, 3rd edition) -- Volume II, which was written specifically for this course.</p>