def removeStudents(browser, schoolyear, term, section, students, state=None, date=None): browser.ui.section.go(schoolyear, term, section) selector = '//a[@title="Edit students for this section"]' browser.query.xpath(selector).click() if state is None: state = 'Withdrawn' remove_temporal_relationship(browser, students, state, date)
def removeMembers(browser, schoolyear, group, members, state=None, date=None): browser.ui.group.go(schoolyear, group) selector = '//a[@title="Edit members for this group"]' browser.query.xpath(selector).click() if state is None: state = 'Removed' if group != 'Students' else 'Withdrawn' remove_temporal_relationship(browser, members, state, date)