@field=params[:org_subfield_id].nil??OrgSubfield.where("organization_id =? and field_type =?",params[:id].to_i,"Comptec").first:OrgSubfield.find(params[:org_subfield_id])
@type=params[:type]
if@type=="courses"||@type.nil?
if@type.blank?
@org_teachers=User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
@field=params[:org_subfield_id].nil??OrgSubfield.where("organization_id =? and field_type =?",params[:id].to_i,"Compstu").first:OrgSubfield.find(params[:org_subfield_id])
@type=params[:type]
if@type=="courses"||@type.nil?
if@type.blank?
@org_students=User.find_by_sql("select u.*, ue.student_id, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
@field=params[:org_subfield_id].nil??OrgSubfield.where("organization_id =? and field_type =?",params[:id].to_i,"Comppro").first:OrgSubfield.find(params[:org_subfield_id])
@type=params[:type]
if@type.nil?
if@type.blank?
@containers=Project.find_by_sql("select p.*, (select count(*) from forge_activities where forge_activities.project_id = p.id) as project_count
@field=params[:org_subfield_id].nil??OrgSubfield.where("organization_id =? and field_type =?",params[:id].to_i,"Compstu").first:OrgSubfield.find(params[:org_subfield_id])
@type=params[:type]
if@type.nil?
if@type.blank?
@containers=Course.find_by_sql("select c.*, (select count(*) from course_activities where course_activities.course_id = c.id) as course_count