Public feed
#887126
def self.condition_for_find_by_udak_frag(frag, placeholder='?')
# frag is college, department, or division
sub_select="=#{placeholder}"
if frag!="college"
sub_select="IN (select id from `#{frag}s` where `name` like #{placeholder})"
end
return "(`units`.`#{frag}_id` #{sub_select}
OR `units_in_charge_faculties`.#{frag}_id #{sub_select} OR
(`loaned_to_unit_id` IS NOT NULL AND `loaned_to_units_rooms`.#{frag}_id #{sub_select}))"
end