'Toggles "hide from students" which enables or disables a staff-only lock.
Returns True if the lock is now enabled, else False.'

def toggle_staff_lock(self, inherits_staff_lock=False):

    was_locked_initially = self.is_staff_locked
    if (not was_locked_initially):
        self.q(css='a.action-staff-lock').first.click()
    else:
        click_css(self, 'a.action-staff-lock', 0, require_notification=False)
        if (not inherits_staff_lock):
            confirm_prompt(self)
    self.wait_for_ajax()
    return (not was_locked_initially)
