|
|
@ -16,6 +16,7 @@ class ChallengesController < ApplicationController
|
|
|
|
#before_filter :find_shixun_language, :only => [:show, :new, :edit]
|
|
|
|
#before_filter :find_shixun_language, :only => [:show, :new, :edit]
|
|
|
|
before_filter :base_index, :only => [:index, :index_down, :index_up, :destroy]
|
|
|
|
before_filter :base_index, :only => [:index, :index_down, :index_up, :destroy]
|
|
|
|
before_filter :view_allow, :only => [:show]
|
|
|
|
before_filter :view_allow, :only => [:show]
|
|
|
|
|
|
|
|
# before_filter :check_cnmooc, :only => [:index]
|
|
|
|
|
|
|
|
|
|
|
|
include ApplicationHelper
|
|
|
|
include ApplicationHelper
|
|
|
|
|
|
|
|
|
|
|
@ -487,4 +488,12 @@ class ChallengesController < ApplicationController
|
|
|
|
response.headers['content--type'] = 'text/javascript'
|
|
|
|
response.headers['content--type'] = 'text/javascript'
|
|
|
|
request.format = 'js'
|
|
|
|
request.format = 'js'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# def check_cnmooc
|
|
|
|
|
|
|
|
# if params[:authToken]
|
|
|
|
|
|
|
|
# user = User.find_by_id(session[:user_id])
|
|
|
|
|
|
|
|
# set_autologin_cookie(user)
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|