@courses=Course.joins("join users u on courses.tea_id = u.id").joins("join user_extensions ue on u.id = ue.user_id").where("ue.school_id = #{params[:school_id]}")
@courses=@courses.joins("join user_extensions ue on courses.tea_id = ue.user_id").where("ue.school_id = #{params[:school_id]}")
end
end
ifparams[:homepage_show]
ifparams[:homepage_show]
@ -1819,7 +1819,7 @@ end
user_id=User.where("concat(lastname, firstname) like '%#{@search}%'")
user_id=User.where("concat(lastname, firstname) like '%#{@search}%'")
@courses=@courses.joins("join users u on courses.tea_id = u.id").where("concat(u.lastname, u.firstname) like '%#{@search}%'")
@courses=@courses.joins("join users u on courses.tea_id = u.id").where("concat(u.lastname, u.firstname) like '%#{@search}%'")
end
end
else
elsif "dep_name"==@keyword
school=School.where("name like '%#{@search}%'").map(&:id)
school=School.where("name like '%#{@search}%'").map(&:id)
@courses=@courses.where(:school_id=>school)
@courses=@courses.where(:school_id=>school)
# @courses= @courses.where("name like '%#{@search}%'")
# @courses= @courses.where("name like '%#{@search}%'")
qurey_test_sets=TestSet.find_by_sql("SELECT o.actual_output, o.out_put, o.result, o.test_set_position, o.query_index,t.is_public,t.input, t.output, g.id as game_id, c.id as challenge_id FROM outputs o,games g ,challenges c,test_sets t where
ifmax_query_index>0
g.id=#{game.id} and o.query_index=#{max_query_index} and g.id = o.game_id and c.id= g.challenge_id and t.challenge_id = c.id and t.position =o.test_set_position order by o.query_index
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width,initial-scale=1,shrink-to-fit=no"><metaname="theme-color"content="#000000"><metaname="renderer"content="webkit"/><metaname="force-rendering"content="webkit"/><metahttp-equiv="X-UA-Compatible"content="IE=edge"/><linkrel="manifest"href="/manifest.json"><linkrel="shortcut icon"href="/favicon.ico"><title>Educoder</title><scripttype="text/javascript">window.__isR=!0</script><linkrel="stylesheet"href="/css/css_min_all.css"><linkrel="stylesheet"href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><linkhref="/react/build/./static/css/main.80b6ec5e.css"rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><divid="md_div"style="display:none"></div><divid="root"class="page -layout-v -fit"></div><divid="picture_display"style="display:none"></div><scripttype="text/javascript"src="/js/js_min_all.js"></script><scripttype="text/javascript"src="http://testbdweb.educoder.net/assets/kindeditor/kindeditor.js"></script><scripttype="text/javascript"src="/js/create_kindeditor.js"></script><scripttype="text/javascript"src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script><scripttype="text/javascript"src="/react/build/./static/js/main.a9947884.js"></script></body></html>
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width,initial-scale=1,shrink-to-fit=no"><metaname="theme-color"content="#000000"><metaname="renderer"content="webkit"/><metaname="force-rendering"content="webkit"/><metahttp-equiv="X-UA-Compatible"content="IE=edge"/><linkrel="manifest"href="/manifest.json"><linkrel="shortcut icon"href="/favicon.ico"><title>Educoder</title><scripttype="text/javascript">window.__isR=!0</script><linkrel="stylesheet"href="/css/css_min_all.css"><linkrel="stylesheet"href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><linkhref="/react/build/./static/css/main.80b6ec5e.css"rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><divid="md_div"style="display:none"></div><divid="root"class="page -layout-v -fit"></div><divid="picture_display"style="display:none"></div><scripttype="text/javascript"src="/js/js_min_all.js"></script><scripttype="text/javascript"src="http://testbdweb.educoder.net/assets/kindeditor/kindeditor.js"></script><scripttype="text/javascript"src="/js/create_kindeditor.js"></script><scripttype="text/javascript"src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script><scripttype="text/javascript"src="/react/build/./static/js/main.b4ee5e8a.js"></script></body></html>