Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop
# Conflicts: # app/views/games/_code_actions.html.erb # public/javascripts/edu/edu_tpi.js
This commit is contained in:
commit
89078e6ff9
|
|
@ -151,8 +151,7 @@ class ChallengesController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
|
||||
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab]), notice: 'Succeed'
|
||||
rescue Exception => e
|
||||
flash[:error] = "#{e.message}"
|
||||
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
|
||||
|
|
|
|||
|
|
@ -49,17 +49,17 @@ class CoursesController < ApplicationController
|
|||
@syllabuses_num = Course.where("is_end = #{@is_end} and is_delete = 0").count
|
||||
#@syllabus_count = all_syllabuses.count
|
||||
# 我创建的课堂
|
||||
create_syllabuses = Course.where(:tea_id => @user.id).where("is_end = #{@is_end} and is_delete = 0 and name like '%#{@search}%'")
|
||||
create_syllabuses = Course.where(:tea_id => @user.id)
|
||||
# 我参与的课堂
|
||||
join_syllabuses = @user.courses.where("is_end = #{@is_end} and is_delete = 0 and tea_id != #{@user.id} and name like '%#{@search}%'")
|
||||
join_syllabuses = @user.courses.where("is_delete = 0 and tea_id != #{@user.id}")
|
||||
@join_syllabuses_count = join_syllabuses.count
|
||||
@create_syllabuses_count = create_syllabuses.count
|
||||
|
||||
# 页面筛选的课程
|
||||
if @select == "create"
|
||||
@syllabuses = create_syllabuses
|
||||
@syllabuses = create_syllabuses.where("is_end = #{@is_end} and is_delete = 0 and name like '%#{@search}%'")
|
||||
elsif @select == "join"
|
||||
@syllabuses = join_syllabuses
|
||||
@syllabuses = join_syllabuses.where("is_end = #{@is_end} and is_delete = 0 and tea_id != #{@user.id} and name like '%#{@search}%'")
|
||||
elsif @select == "end"
|
||||
# 归档的课堂
|
||||
end_syllabuses = Course.where("is_end = #{@is_end} and name like '%#{@search}%'")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ class GamesController < ApplicationController
|
|||
layout "base_myshixun"
|
||||
skip_before_filter :verify_authenticity_token, :only => [:file_update]
|
||||
before_filter :find_myshixun, :only => [:index]
|
||||
before_filter :find_game, :only => [:show, :game_build, :entry,:next_step, :outputs_show, :file_edit, :file_update,
|
||||
before_filter :find_game, :only => [:show, :game_build, :entry,:next_step, :outputs_show, :file_edit, :file_update, :get_waiting_time,
|
||||
:game_status, :change_status, :answer, :minus_score, :refresh_game_list, :reset_original_code, :reset_new_code, :evaluating_choice]
|
||||
before_filter :find_repository, :only => [:show, :entry, :file_edit, :file_update, :reset_original_code, :reset_new_code, :html_show]
|
||||
before_filter :allowd_manager
|
||||
|
|
@ -147,6 +147,25 @@ class GamesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 获取评测的等待的时间
|
||||
# res['waitNum'] 评测等待人数
|
||||
# res['waitingTime'] 评测等待时间
|
||||
# res['onRun'] 0 表示在等待中 1 表示可执行
|
||||
def get_waiting_time
|
||||
shixun_tomcat = Redmine::Configuration['shixun_tomcat']
|
||||
uri = "#{shixun_tomcat}/bridge/game/getWaitingTime"
|
||||
params = {:tpiID => "#{@myshixun.id}"}
|
||||
res = uri_exec uri, params
|
||||
if (res && res['code'] != 0)
|
||||
@message = "实训云平台繁忙(繁忙等级:94)"
|
||||
raise("实训云平台繁忙(繁忙等级:94)")
|
||||
end
|
||||
render :json => {:result => "success", :onRun => res['onRun'], :waitNum => res['waitNum'], :waitingTime => res['waitingTime'] }
|
||||
#render :json => {:result => "success", :onRun => 1, :waitNum => 12, :waitingTime => 546 }
|
||||
rescue Exception => e
|
||||
render :json => {:result => "failed"}
|
||||
end
|
||||
|
||||
# status 0: 未提交测评或者提交测评失败后报错;1:中间状态还没返回值;2:返回值并成功
|
||||
# resubmit 唯一随机码,为了区分每一次重新评测结果
|
||||
CODES = %W(1 2 3 4 5 6 7 8 9 A B C D E F G H J K L N M O P Q R S T U V W X Y Z)
|
||||
|
|
@ -359,7 +378,9 @@ class GamesController < ApplicationController
|
|||
|
||||
# 自动推送下一个任务
|
||||
def next_step
|
||||
render_403 if @game.status != 2
|
||||
unless show_next_stage?(@game, @myshixun.shixun.try(:status))
|
||||
render_403
|
||||
end
|
||||
next_game = @game.next_game
|
||||
next_game.update_attributes(:status => 0, :open_time => Time.now) if next_game.status == 3
|
||||
respond_to do |format|
|
||||
|
|
@ -548,7 +569,10 @@ class GamesController < ApplicationController
|
|||
|
||||
# 判断成员是否允许查看
|
||||
def allowd_view
|
||||
render_403 if (@game.status == 3 && User.current.id != @myshixun.shixun.try(:user_id))
|
||||
if @myshixun.shixun.try(:status) == 2 && @game.status == 3 && User.current.id != @myshixun.shixun.try(:user_id)
|
||||
render_403
|
||||
end
|
||||
# render_403 if (@game.status == 3 && User.current.id != @myshixun.shixun.try(:user_id))
|
||||
end
|
||||
|
||||
def find__shixun_language
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
class IframesController < ApplicationController
|
||||
layout false
|
||||
skip_before_filter :verify_authenticity_token, :only => [:html_content]
|
||||
|
||||
def show
|
||||
render :layout => false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ class ManagementsController < ApplicationController
|
|||
end
|
||||
|
||||
if params[:support_shixuns]
|
||||
@major = @major.where(:support_shixuns => params[:support_shixuns].to_i, :major_level => 2)
|
||||
@major = @major.where(:support_shixuns => params[:support_shixuns].to_i,:major_level=> 2)
|
||||
end
|
||||
|
||||
@major = @major.order("created_at #{@sx_order}")
|
||||
|
|
@ -652,6 +652,7 @@ end
|
|||
def class_shixuns
|
||||
@menu_type = 4
|
||||
@sub_type = 1
|
||||
@sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
|
||||
@edit_class_sx_num=Subject.where(:status => 0).count
|
||||
@audit_class_sx_num=Subject.where(:status => 1).count
|
||||
@publish_class_sx_num=Subject.where(:status => 2).count
|
||||
|
|
@ -680,6 +681,8 @@ end
|
|||
user_exs = UserExtensions.where(:user_id => @c_shixuns.map(&:user_id))
|
||||
@schools = School.where(:id => user_exs.map(&:school_id))
|
||||
end
|
||||
@c_shixuns = @c_shixuns.order("created_at #{@sx_order}")
|
||||
|
||||
@c_shixuns_count = @c_shixuns.count
|
||||
limit = 20
|
||||
@c_shixuns_pages = Paginator.new @c_shixuns_count, limit, params['page'] || 1
|
||||
|
|
@ -700,6 +703,7 @@ end
|
|||
def class_publish_shixuns
|
||||
@menu_type = 4
|
||||
@sub_type = 2
|
||||
@sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
|
||||
search = params[:search] # 搜索字
|
||||
keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/课程名搜索
|
||||
if params[:school_id] && params[:school_id] != '0'
|
||||
|
|
@ -719,7 +723,7 @@ end
|
|||
user_exs = UserExtensions.where(:user_id => @c_shixuns.map(&:user_id))
|
||||
@schools = School.where(:id => user_exs.map(&:school_id))
|
||||
end
|
||||
@c_shixuns = @c_shixuns.order("created_at desc")
|
||||
@c_shixuns = @c_shixuns.order("created_at #{@sx_order}")
|
||||
@c_shixuns_count = @c_shixuns.count
|
||||
limit = 20
|
||||
@c_shixuns_pages = Paginator.new @c_shixuns_count, limit, params['page'] || 1
|
||||
|
|
@ -898,35 +902,56 @@ end
|
|||
=end
|
||||
|
||||
if params[:member_ids] && params[:trial_whether] == "trial_agree"
|
||||
params[:member_ids].each do |member|
|
||||
aUser = ApplyAction.where(:user_id => member, :container_type => "TrialAuthorization")
|
||||
if aUser.blank?
|
||||
ApplyAction.create(:user_id => member, :container_type => "TrialAuthorization", :status => 1)
|
||||
else
|
||||
aUser.update_all(:status => 1)
|
||||
end
|
||||
end
|
||||
aUser = User.where(:id => params[:member_ids])
|
||||
aUser.update_all(:certification => 1)
|
||||
apply_user = ApplyAction.where(:user_id => params[:member_ids])
|
||||
apply_user.update_all(:status => 1) unless apply_user.blank?
|
||||
elsif params[:member_ids] && params[:trial_whether] == "trial_cancel"
|
||||
ApplyAction.where(:user_id => params[:member_ids], :container_type => "TrialAuthorization").update_all(:status => 2)
|
||||
User.where(:id => params[:member_ids]).update_all(:certification => 0)
|
||||
apply_user = ApplyAction.where(:user_id => params[:member_ids])
|
||||
apply_user.update_all(:status => 2) unless apply_user.blank?
|
||||
end
|
||||
|
||||
if params[:member_ids] && (params[:occupation] == "occupation_agree" || params[:realname] == "realname_agree")
|
||||
if params[:member_ids] && params[:occupation] == "occupation_agree"
|
||||
User.where(:id => params[:member_ids]).update_all(:professional_certification => true)
|
||||
apply_user = ApplyUserAuthentication.where(:user_id => params[:member_ids], :auth_type => 2)
|
||||
unless apply_user.blank?
|
||||
apply_user.update_all(:status => 1)
|
||||
end
|
||||
elsif params[:member_ids] && params[:realname] == "realname_agree"
|
||||
User.where(:id => params[:member_ids]).update_all(:authentication => true)
|
||||
elsif params[:member_ids] && (params[:occupation] == "occupation_agree" || params[:realname] == "realname_cancel")
|
||||
apply_user = ApplyUserAuthentication.where(:user_id => params[:member_ids], :auth_type => 1)
|
||||
unless apply_user.blank?
|
||||
apply_user.update_all(:status => 1)
|
||||
end
|
||||
elsif params[:member_ids] && params[:occupation] == "occupation_cancel"
|
||||
User.where(:id => params[:member_ids]).update_all(:professional_certification => false)
|
||||
apply_user = ApplyUserAuthentication.where(:user_id => params[:member_ids], :auth_type => 2)
|
||||
unless apply_user.blank?
|
||||
apply_user.update_all(:status => 2)
|
||||
end
|
||||
elsif params[:member_ids] && params[:realname] == "realname_cancel"
|
||||
User.where(:id => params[:member_ids]).update_all(:authentication => false)
|
||||
apply_user = ApplyUserAuthentication.where(:user_id => params[:member_ids], :auth_type => 1)
|
||||
unless apply_user.blank?
|
||||
apply_user.update_all(:status => 2)
|
||||
end
|
||||
end
|
||||
|
||||
if params[:trial] == "-1"
|
||||
apply = ApplyAction.where(:container_type => "TrialAuthorization")
|
||||
apply_id = apply.blank? ? -1 : "(" + apply.map{|a| a.user_id}.join(",") + ")"
|
||||
apply_user_id = User.where("id not in #{apply_id} and status = 1").all
|
||||
apply_user_id = User.where("id not in #{apply_id} and status = 1 and certification = 0").all
|
||||
apply_user_id = apply_user_id.blank? ? [-1] : apply_user_id.map{|a| a.id}.split(",")[0]
|
||||
elsif params[:trial] == "-2"
|
||||
apply_user_id = User.where(:status => 1).all
|
||||
apply_user_id = apply_user_id.blank? ? [-1] : apply_user_id.map{|a| a.id}.split(",")[0]
|
||||
else
|
||||
apply = ApplyAction.where(:status => params[:trial])
|
||||
elsif params[:trial] == "0"
|
||||
apply = ApplyAction.where(:status => 0)
|
||||
apply_user_id = apply.blank? ? [-1] : apply.map{|a| a.user_id}.split(",")[0]
|
||||
else
|
||||
apply_user_id = User.where(:status => 1, :certification => params[:trial]).all
|
||||
apply_user_id = apply_user_id.blank? ? [-1] : apply_user_id.map{|a| a.id}.split(",")[0]
|
||||
end
|
||||
|
||||
if params[:school] == ""
|
||||
|
|
@ -1031,6 +1056,7 @@ end
|
|||
end
|
||||
end
|
||||
apply_action.update_attributes(:status => (params[:type] == "1" ? 2 : 1), :reason => params[:reject_reason], :dealer_id => User.current.id)
|
||||
User.where(:id => apply_action.user_id).first.update_attributes(:certification => (params[:type] == "1" ? 2 : 1))
|
||||
user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{search}%'")
|
||||
@authorizations = ApplyAction.where(:container_type => "TrialAuthorization", :status => 0, :user_id => user_id).includes(:user)
|
||||
@autu_count = @authorizations.count
|
||||
|
|
@ -1155,6 +1181,7 @@ end
|
|||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
# 课程实训发布审批
|
||||
def deal_subject_authorization
|
||||
apply_action = ApplyAction.find(params[:apply_id])
|
||||
|
|
@ -1180,6 +1207,7 @@ end
|
|||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 项目实训发布审批
|
||||
def deal_shixun_authorization
|
||||
apply_action = ApplyAction.find(params[:apply_id])
|
||||
|
|
|
|||
|
|
@ -647,10 +647,10 @@ class ShixunsController < ApplicationController
|
|||
|
||||
# 实训行为操作
|
||||
def operation
|
||||
@is_subject = params[:is_subject]
|
||||
@myshixun = Myshixun.where(:id => params[:myshixun_id]).first
|
||||
@is_modify = ShixunModify.where(:myshixun_id => params[:myshixun_id], :shixun_id => @shixun.try(:id), :status => 1).first
|
||||
@mail = User.current.mail.blank?
|
||||
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -668,7 +668,8 @@ class UsersController < ApplicationController
|
|||
@offset ||= @course_result_pages.offset
|
||||
@course_result = paginateHelper @course_result, @limit
|
||||
else
|
||||
@shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc")
|
||||
# @shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc")
|
||||
@shixuns_result = Shixun.where("name like ?", "%#{@search}%").reorder("created_at desc")
|
||||
@shixuns_result_count = @shixuns_result.count
|
||||
@shixun_pages = Paginator.new @shixuns_result_count, @limit, params['page'] || 1
|
||||
@offset ||= @shixun_pages.offset
|
||||
|
|
|
|||
|
|
@ -33,6 +33,18 @@ module ApplicationHelper
|
|||
extend Forwardable
|
||||
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
|
||||
|
||||
# 定义当前关卡是否有权开启下一关
|
||||
# :实训若发布了,必须通过当前关卡才能查看下一关
|
||||
# :未发布的实训,除了最后一关,其它的关卡都可以进入下一关
|
||||
def show_next_stage?(game, shixun_status)
|
||||
if game.is_final_game? || ([2,3].include?(shixun_status.to_i) && game.try(:status) != 2)
|
||||
false
|
||||
else
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# 适用与已经用url_safe编码后,回调字符串形式
|
||||
def tran_base64_decode64 str
|
||||
if str.blank?
|
||||
|
|
@ -142,7 +154,7 @@ module ApplicationHelper
|
|||
# if params[:action] == "on_search" || params[:action] == "apply_trail" # 之所以这样处理是为了避开account页面ajax加载
|
||||
# return true
|
||||
# end
|
||||
authentication = ApplyAction.where(:user_id => User.current.id, :status => 1).first
|
||||
authentication = User.where(:id => User.current.id, :certification => 1).first
|
||||
user_identity = User.current.try(:user_extensions).try(:identity)
|
||||
if user_identity.blank? || authentication.blank?
|
||||
redirect_to my_account_path
|
||||
|
|
@ -3026,12 +3038,15 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
def identity_authentication_status status
|
||||
case status
|
||||
when nil
|
||||
"未授权"
|
||||
def identity_authentication_status user
|
||||
authorization = ApplyAction.where(:user_id => user, :container_type => "TrialAuthorization").last
|
||||
case user.try(:certification)
|
||||
when 0
|
||||
"处理中"
|
||||
if authorization.try(:status) == 0
|
||||
"处理中"
|
||||
else
|
||||
"未授权"
|
||||
end
|
||||
when 1
|
||||
"已授权"
|
||||
when 2
|
||||
|
|
|
|||
|
|
@ -52,4 +52,9 @@ class Game < ActiveRecord::Base
|
|||
output = outputs.blank? ? nil : outputs.first
|
||||
return output
|
||||
end
|
||||
|
||||
def is_final_game?
|
||||
challenge = self.challenge
|
||||
challenge.try(:position).to_i == challenge.shixun.challenges.count ? true : false
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
# 85:challenge创建的时候Jenkins处理异常;86:实训评测失败,jenkins返回错误结果; 87:版本库删除异常;88:点击评测失败,没返回数据;89:重置链接jenkins返回失败
|
||||
# 90: 更新公共测试用例失败,返回code非0;91:实训有改动,评测的时候初始化数据,返回数据code非0;92:webssh开启失败,接口getConnectInfo返回code值非0
|
||||
# 93: 实训断开连接失败,接口deleteSSH返回code值非0
|
||||
# 94: 获取评测等待时间失败,接口getWaitingTime返回code值为非0
|
||||
# 116:challenge创建关卡的时候返回结果错误
|
||||
#
|
||||
class Shixun < ActiveRecord::Base
|
||||
|
|
@ -23,6 +24,7 @@ class Shixun < ActiveRecord::Base
|
|||
has_many :shixun_major_courses, :dependent => :destroy
|
||||
has_and_belongs_to_many :homework_commons
|
||||
has_many :discusses, :as => :dis, :dependent => :destroy
|
||||
has_many :shixun_ports
|
||||
|
||||
scope :visible, lambda{where(status: [2,3])}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
class ShixunPort < ActiveRecord::Base
|
||||
attr_accessible :port, :shixun_id
|
||||
belongs_to :shixun
|
||||
end
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<p id="user_password_1_notice"></p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="pr">
|
||||
<li class="pr drag_certi_block">
|
||||
<div id="drag" class="drag_slider"></div>
|
||||
<div class="new-login-error" style="display: none;">
|
||||
<p id="user_verification_notice"></p>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
<p id="user_password_2_notice"></p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="pr" style="margin-bottom:15px;">
|
||||
<li class="pr drag_certi_block" style="margin-bottom:15px;">
|
||||
<div id="email_drag" class="drag_slider"></div>
|
||||
<div class="new-login-error" style="display: none;">
|
||||
<p id="email_verification_notice"></p>
|
||||
|
|
@ -116,6 +116,12 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
if(!!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)){
|
||||
$(".drag_certi_block").remove();
|
||||
}
|
||||
});
|
||||
|
||||
document.onkeydown=function(event){
|
||||
e = event ? event :(window.event ? window.event : null);
|
||||
if(e.keyCode==13){
|
||||
|
|
@ -132,7 +138,27 @@
|
|||
var wait = 60;
|
||||
function get_phone_verification_code(btn) {
|
||||
if ($phone_correct){
|
||||
if($('#drag .drag_text').html() == "验证通过") {
|
||||
if($(".drag_certi_block").length > 0){
|
||||
if($('#drag .drag_text').html() == "验证通过") {
|
||||
$.get(
|
||||
'<%=account_get_verification_code_path%>',
|
||||
{ value: $('#user_phone_num').val().trim(),
|
||||
type: 1},
|
||||
function (data) {
|
||||
if (data.status == "2") {
|
||||
$('#user_phone_notice').html('该手机号已被注册');
|
||||
$('#user_phone_notice').parent().show();
|
||||
} else {
|
||||
$('#user_phone_notice').html('');
|
||||
$('#user_phone_notice').parent().hide();
|
||||
time(btn);
|
||||
}
|
||||
});
|
||||
} else{
|
||||
$("#user_verification_notice").html("请先拖动滑块完成验证");
|
||||
$('#user_verification_notice').parent().show();
|
||||
}
|
||||
} else{
|
||||
$.get(
|
||||
'<%=account_get_verification_code_path%>',
|
||||
{ value: $('#user_phone_num').val().trim(),
|
||||
|
|
@ -147,9 +173,6 @@
|
|||
time(btn);
|
||||
}
|
||||
});
|
||||
} else{
|
||||
$("#user_verification_notice").html("请先拖动滑块完成验证");
|
||||
$('#user_verification_notice').parent().show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,9 @@
|
|||
<span class="mr100 itoblock_w150"><%= shixun_done(@shixun, challenge.position).to_i %>人 完成挑战</span>
|
||||
<span class="mr100 itoblock_w150"><%= shixun_running(@shixun, challenge.position).to_i %>人 正在挑战</span>
|
||||
<span class="mr100 w150 g_frame"><%= challenge.score %>经验值</span>
|
||||
<span class="mr390 fr"><%= find_game_status challenge.id %></span>
|
||||
<% if @shixun.status == 2 %>
|
||||
<span class="mr390 fr"><%= find_game_status challenge.id %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
<div class="panel-form">
|
||||
<div id="edit_skill_show" class="<%= @challenge_tags.blank? ? "undis" : "" %>">
|
||||
<div class="clearfix mb20">
|
||||
<p class="fr">
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<a href="javascript:void(0);" class="shixun-task-btn task-btn-green fr" id="edit_skill">编辑</a>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<% unless @challenge_tags.blank? %>
|
||||
<label class="panel-form-label fl"> 技能标签:</label>
|
||||
<div class="fl task-bd-grey panel-box-sizing panel-form-width-690">
|
||||
<% @challenge_tags.each do |tag| %>
|
||||
<div class="task-tag tag-grey mb10 mr10 fl">
|
||||
<%= tag.name %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="<%= @challenge_tags.blank? ? "" : "undis" %>" id="skill_edit">
|
||||
<!--<div id="edit_skill_show" class="<%#= @challenge_tags.blank? ? "undis" : "" %>">-->
|
||||
<!--<div class="clearfix mb20">-->
|
||||
<!--<p class="fr">-->
|
||||
<!--<%# if User.current.manager_of_shixun?(@shixun) %>-->
|
||||
<!--<a href="javascript:void(0);" class="shixun-task-btn task-btn-green fr" id="edit_skill">编辑</a>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</p>-->
|
||||
<!--</div>-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="clearfix">-->
|
||||
<!--<%# unless @challenge_tags.blank? %>-->
|
||||
<!--<label class="panel-form-label fl"> 技能标签:</label>-->
|
||||
<!--<div class="fl task-bd-grey panel-box-sizing panel-form-width-690">-->
|
||||
<!--<%# @challenge_tags.each do |tag| %>-->
|
||||
<!--<div class="task-tag tag-grey mb10 mr10 fl">-->
|
||||
<!--<%#= tag.name %>-->
|
||||
<!--</div>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</div>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
<ul class="<%#= @challenge_tags.blank? ? "" : "undis" %>" id="skill_edit">
|
||||
<%= form_for @challenge, :url => update_evaluation_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 5),
|
||||
:html => {:id => "challenge_skill_update", :onkeydown => "if(event.keyCode==13)return false;"} do |f| %>
|
||||
<%= render :partial => "skill_form", :locals => {:f => f} %>
|
||||
|
|
@ -30,8 +30,8 @@
|
|||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
$("#edit_skill").click(function(){
|
||||
$("#edit_skill_show").hide();
|
||||
$("#skill_edit").show();
|
||||
});
|
||||
// $("#edit_skill").click(function(){
|
||||
// $("#edit_skill_show").hide();
|
||||
// $("#skill_edit").show();
|
||||
// });
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<!--<li class="clearfix">-->
|
||||
<!--<a href="javascript:void(0);" class="task-btn task-btn-green fr" onclick="challenge_skill_update();">保存</a>-->
|
||||
<!--<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 5) %>" class="task-btn fr mr10" id="skill_cancel">取消</a>-->
|
||||
<!--<a href="<%#= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 5) %>" class="task-btn fr mr10" id="skill_cancel">取消</a>-->
|
||||
<!--</li>-->
|
||||
</div>
|
||||
|
||||
|
|
@ -63,6 +63,7 @@
|
|||
// 获取父节点的id
|
||||
var obj = $(thisObj).parent();
|
||||
$(obj).remove();
|
||||
$("#challenge_skill_update").submit();
|
||||
}
|
||||
/* $(document).click(function(e){
|
||||
if(e.target.id==$("#edit_skill").attr("id")||e.target.id==$("#add_knowledge").attr("id")||e.target.className==$(".knowledge_frame").attr("class")||e.target.className==$(".close").attr("class")||e.target.id==$("#shixun_skill_input").attr("id")){
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<a href="<%= edit_shixun_challenge_path(@prev_challenge, :shixun_id => @shixun) %>" class="shixun-task-btn task-btn-green fr ml10">上一阶段</a>
|
||||
<% end %>
|
||||
<% if @shixun.status == 0 && User.current.manager_of_shixun?(@shixun) %>
|
||||
<!-- <a href="<%#= new_shixun_challenge_path(@shixun) %>" class="shixun-task-btn task-btn-green fr">新建阶段</a>-->
|
||||
<!-- <a href="<%#= new_shixun_challenge_path(@shixun) %>" class="shixun-task-btn task-btn-green fr">新建阶段</a>-->
|
||||
<a href="<%= new_shixun_challenge_path(@shixun, :st => 0) %>" class="shixun-task-btn task-btn-green fr">+实践任务</a>
|
||||
<a href="<%= new_shixun_challenge_path(@shixun, :st => 1) %>" class="shixun-task-btn task-btn-green fr mr10">+多选任务</a>
|
||||
<a href="<%= new_shixun_challenge_path(@shixun, :st => 2) %>" class="shixun-task-btn task-btn-green fr mr10">+单选任务</a>
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
<li class="fl <%= @tab == 3 ? "check_nav" : "" %>">
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 3) %>" class="color-black">参考答案</a>
|
||||
</li>
|
||||
<!-- <li class="fl <%#= @tab == 6 ? "check_nav" : "" %>">
|
||||
<!-- <li class="fl <%#= @tab == 6 ? "check_nav" : "" %>">
|
||||
<a href="<%#= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 6) %>" class="color-black">预备知识</a>
|
||||
</li>-->
|
||||
<li class="fl <%= @tab == 4 ? "check_nav" : "" %>">
|
||||
|
|
@ -79,11 +79,23 @@
|
|||
<%= render :partial => "edit_scoring" %>
|
||||
<% elsif @tab == 5 %>
|
||||
<%= render :partial => "edit_skill" %>
|
||||
<%# elsif @tab == 6 %>
|
||||
<%# elsif @tab == 6 %>
|
||||
<%#= render :partial => "edit_propaedeutics" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="save-tip">
|
||||
<div class="save-tip-content">已保存</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
<% if notice %>
|
||||
<% notice = nil %>
|
||||
$(".save-tip").show();
|
||||
<% end %>
|
||||
setTimeout(function(){
|
||||
$(".save-tip").hide();
|
||||
}, 2000)
|
||||
|
||||
})
|
||||
</script>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="active-class">
|
||||
<div class="task-index-head mt20 mb20">
|
||||
<div class="task-index-head mt30 mb30">
|
||||
<div class="task-index-head-top-course">
|
||||
<h2 class="fl task-inde-head-title">在线课堂</h2>
|
||||
<div class="cl"></div>
|
||||
|
|
@ -27,15 +27,15 @@
|
|||
</ul>
|
||||
</li>-->
|
||||
|
||||
<form action="<%= courses_path() %>" data-remote="true" onsubmit="submitFn(this, event);" class="fl ml15" id="search_syllabuses_name" >
|
||||
<div class="search-wrapper">
|
||||
<div class="input-holder">
|
||||
<form action="<%= courses_path() %>" data-remote="true" class="fl ml15" id="search_syllabuses_name" >
|
||||
<div class="searchFor fr" style="margin-top: -3px">
|
||||
<div class="searchCon">
|
||||
<input type="hidden" name="select" id="input_select_val" value="<%= @select %>">
|
||||
<input type="hidden" name="is_end" id="input_select_text" value="<%= @is_end %>">
|
||||
<input type="text" class="search-input" name="search" placeholder="输入课堂名称的关键字进行搜索" />
|
||||
<button class="search-icon" onclick="searchToggle(this, event);"><i class="fa fa-search font-16 mt5"></i></button>
|
||||
<input type="text" class="searchinput" name="search" placeholder="请输入实训名称的关键字进行搜索" style="background: none;"/>
|
||||
<i class="fa fa-close mr5 color-dark-grey" onclick="colse_searchbox();" title="搜索"></i>
|
||||
</div>
|
||||
<span class="close" onclick="searchToggle(this, event);"><i class="fa fa-times font-16 mt5"></i></span>
|
||||
<i class="fa fa-search mr5 color-dark-grey search_icon" onclick="search_shixun()" style="margin:10px" title="搜索"></i>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -49,6 +49,22 @@
|
|||
<%= render :partial => 'layouts/public_left_info' %>
|
||||
|
||||
<script>
|
||||
//搜索实训
|
||||
function search_shixun(){
|
||||
if($(".searchCon").is(":visible")){
|
||||
$("#search_syllabuses_name").submit();
|
||||
} else{
|
||||
$(".searchCon").show();
|
||||
}
|
||||
}
|
||||
//关闭搜索框
|
||||
function colse_searchbox(){
|
||||
$('.searchCon').hide();
|
||||
if($('.searchinput').val().trim() != ""){
|
||||
$('.searchinput').val('');
|
||||
$("#search_syllabuses_name").submit();
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------- 添加或取消收藏 ---------------------- */
|
||||
function add_cancel_to_favorites(nThis){
|
||||
|
|
@ -116,6 +132,7 @@
|
|||
$("#search_syllabuses_name").submit();
|
||||
}
|
||||
}
|
||||
|
||||
function submitFn(obj, evt){
|
||||
value = $(obj).find('.search-input').val().trim();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ $("#courses_index_syllabuses_3").attr('href', '<%= courses_path(:select => "join
|
|||
<% end %>
|
||||
$("#all_syllabuses").html("<%= @syllabuses_num %>");
|
||||
$("#my_syllabuses").html("<%= @join_syllabuses_count + @create_syllabuses_count %>");
|
||||
$("#input_select_val").val('<%= @select %>');
|
||||
//$("#input_select_val").val('<%#= @select %>');
|
||||
$("#input_select_text").val('<%= @is_end %>');
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
<div class="stud-class-container">
|
||||
<p style="line-height: 2.0;">
|
||||
<i class="fa fa-map-marker mr5 color-grey"></i>
|
||||
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '在线课堂', courses_path %>
|
||||
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '在线课堂', courses_path %> > <%= link_to '新建课堂' %>
|
||||
|
||||
</p>
|
||||
<div class="user_bg_shadow bor-grey-e">
|
||||
<div class="edu-con-top ">
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
:obj_type => discuss.class
|
||||
}) %>' data-remote="true" data-tip-down="点赞" class="fr mt5">
|
||||
<i class="fa fa-thumbs-up color_Purple_grey"></i>
|
||||
<%= discuss.praise_tread_cache ? discuss.praise_tread_cache.praise_num : 0 %>
|
||||
<%= discuss.praise_tread_cache ? (discuss.praise_tread_cache.praise_num == 0 ? "" : discuss.praise_tread_cache.praise_num ) : "" %>
|
||||
</a>
|
||||
<% else %>
|
||||
<a href='<%= praise_tread_praise_minus_path({:obj_id => discuss.id,
|
||||
:obj_type => discuss.class
|
||||
}) %>' data-remote="true" class="fr mt5" data-tip-down="取消点赞" >
|
||||
<i class="fa fa-thumbs-up color-light-green"></i>
|
||||
<%= discuss.praise_tread_cache ? discuss.praise_tread_cache.praise_num : 0 %>
|
||||
<%= discuss.praise_tread_cache ? (discuss.praise_tread_cache.praise_num == 0 ? "" : discuss.praise_tread_cache.praise_num ) : "" %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<span class="mt10 -flex c_grey ml15" id="time-consuming"></span>
|
||||
<span class="mt10 mr15" style="color: #2dad96;" id="game_wating_time"></span>
|
||||
<% if @st == 0 %>
|
||||
<div id="reset_code_to_bengin" class="<%= @game.status == 2 ? "" : "undis" %>">
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-green mr15 mt8" onclick="delete_confirm_box('<%= reset_new_code_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %>', '你在本关中修改的内容将丢失<br />是否确定重新加载上次通过的代码');">加载上次通过的代码</a>
|
||||
|
|
@ -6,7 +7,7 @@
|
|||
<% end %>
|
||||
<div id="code_test">
|
||||
<% if @st == 0 %>
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-blue mr15 mt8" onclick="training_task_submmit();">评测</a>
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-blue mr15 mt8" onclick="training_task_submmit();">评测</a>
|
||||
<% elsif @game.status != 2 %>
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-blue mr15 mt8" onclick="choice_submmit();">评测</a>
|
||||
<% end %>
|
||||
|
|
@ -14,29 +15,28 @@
|
|||
<div id="code_estimate">
|
||||
<% if @game.status == 1 %>
|
||||
<a class="shixun-task-btn mt8 mr15" id="code_testing">评测中..</a>
|
||||
<% elsif @game.status == 2 %>
|
||||
<% end %>
|
||||
<% if show_next_stage?(@game, @myshixun.shixun.try(:status)) %>
|
||||
<% if @had_done == 0 %>
|
||||
<%= link_to "下一关 ", {:controller => 'games',
|
||||
:action => "next_step", :id => @game,
|
||||
:myshixun_id => @myshixun},
|
||||
:class => "shixun-task-btn task-btn-blue mr15 mt8",
|
||||
:id => "next_step",
|
||||
:remote => true %>
|
||||
<%= link_to "下一关 ", {:controller => 'games', :action => "next_step", :id => @game, :myshixun_id => @myshixun},
|
||||
:class => "shixun-task-btn task-btn-blue mr15 mt8", :id => "next_step", :remote => true %>
|
||||
<!--<a href="javascript:void(0);" onclick="shixun_next_step();" class="task-btn task-btn-blue mr15 mt8">下 一 步</a>-->
|
||||
<% else %>
|
||||
<a href="<%= shixun_path(@shixun) %>" id="exit_shixun" class="shixun-task-btn task-btn-blue mt8 mr15">退出实训</a>
|
||||
<a href="<%= shixun_path(@myshixun.shixun) %>" id="exit_shixun" class="shixun-task-btn task-btn-blue mt8 mr15">退出实训</a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<script>
|
||||
// 如果是HTML实训,则在效果显示栏实时渲染code
|
||||
<% if @shixun.language == "Html" %>
|
||||
<% if @myshixun.shixun.try(:language) == "Html" %>
|
||||
setTimeout(tpi_html_show, 1000);
|
||||
<% end %>
|
||||
// 渲染用户的HTML的CODE。
|
||||
function tpi_html_show(){
|
||||
var contents = editor_CodeMirror.getValue();
|
||||
$("#html_contents").attr("src", "/iframes/html_content?contents="+contents);
|
||||
$("#data_param").val(contents);
|
||||
$("#html_form").attr("action", "/iframes/html_content");
|
||||
$("#html_form").submit();
|
||||
}
|
||||
/* -------------- 点击加载上次通过的代码----------------*/
|
||||
$("#task_popup_confirm").live("click", function(){
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 0}) %>";
|
||||
}else{
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game => @game, :myshixun => @myshixun, :had_done => 1}) %>";
|
||||
}
|
||||
// 传递具体屏幕的宽高,实现不同浏览器与不同分辨率都能撑满屏幕
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
if(0 == data.had_done){
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
}else if(1 == data.had_done ){
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -145,7 +145,6 @@
|
|||
|
||||
/* ----------------- 评测 -------------------- */
|
||||
function training_task_submmit(){
|
||||
|
||||
// 加载页面
|
||||
nEvalContent = $("#evaluating_contents").hide();
|
||||
nEvalInfo = $("#evaluating_info").hide();
|
||||
|
|
@ -178,120 +177,141 @@
|
|||
$.ajax({
|
||||
url: '<%= game_build_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
success: function (data){
|
||||
// 每2s匹配一次状态,成功2 评测中1 评测 0
|
||||
var intId = setInterval(function(){
|
||||
var ajaxTimeoutTest = $.ajax({
|
||||
url: '<%= game_status_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
timeout : 50000,
|
||||
timeID = setInterval(function(){
|
||||
$.ajax({
|
||||
url: '<%= get_waiting_time_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
async: false,
|
||||
data:{"resubmit":data.resubmit},
|
||||
success:function(data){
|
||||
// 如果查到了,就退出
|
||||
i = i + 1;
|
||||
console.log(i);
|
||||
if(data.status == 2 || data.status == 0){
|
||||
if(data.language == "Html"){
|
||||
tpi_html_show();
|
||||
}
|
||||
clearInterval(intId);
|
||||
nEvalContent.show();
|
||||
nEvalInfo.show();
|
||||
nAjaxLoading.val("");
|
||||
nInfoAjaxLoading.val("");
|
||||
nAjaxLoading.hide();
|
||||
nInfoAjaxLoading.hide();
|
||||
// test_sets 公开测,hide_test_sets 隐藏测试集
|
||||
code_evaluation(
|
||||
eval('[' + data.test_sets + ']'),
|
||||
data.had_test_count,
|
||||
data.test_sets_count,
|
||||
data.had_passed_testsests_error_count,
|
||||
data.test_sets_hidden_count,
|
||||
data.test_sets_public_count,
|
||||
data.had_passed_testsests_hidden_count,
|
||||
data.had_passed_testsests_public_count,
|
||||
data.final_score,
|
||||
data.latest_output,
|
||||
data.language
|
||||
);
|
||||
$("#blacktab_nav_1").trigger("click");
|
||||
if(data.status == 2){
|
||||
clearInterval(cm);
|
||||
clearInterval(intId);
|
||||
var icon = $("#game_status_<%= @game_challenge.id %>"); // 实训列表的icon
|
||||
$("#user_grade").html(parseInt($("#user_grade").html()) + parseInt(data.final_score));
|
||||
console.log("############################################");
|
||||
console.log(data.score);
|
||||
console.log(data.tag_count);
|
||||
console.log($("#shixun_exp_<%=@game_challenge.id %>")[0]);
|
||||
$("#shixun_exp_<%=@game_challenge.id %>").html("经验值<span class='color-light-green mr5'>+"+ data.score + "</span>");
|
||||
$("#shixun_grade_<%=@game_challenge.id %>").html("金币<span class='color-light-green mr5'>+"+ data.score + "</span>");
|
||||
$("#shixun_tag_<%=@game_challenge.id %>").html("技能标签<span class='color-light-green mr5'>+"+ data.tag_count + "</span>");
|
||||
icon.find("i").attr("class", "fa fa-unlock fr font-18 mt5 color-light-green w20_center");
|
||||
icon.find("a:last").attr("title", "已完成");
|
||||
if( data.had_done == 0 ) {
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 0}) %>";
|
||||
}else{
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 1}) %>";
|
||||
}
|
||||
// 传递具体屏幕的宽高,实现不同浏览器与不同分辨率都能撑满屏幕
|
||||
pop_box_new2(htmlvalue, window.innerWidth, window.innerHeight);
|
||||
$("#reset_code_to_bengin").show(); // 显示加载上次通过的代码
|
||||
}
|
||||
var html = "<a href='javascript:void(0)' class='task-btn task-btn-blue mr15 mt8' onclick='training_task_submmit();'>评测</a>";
|
||||
$("#code_test").html(html); // 恢复评测
|
||||
var codeEstimate = $("#code_estimate").children("a").html();
|
||||
if(codeEstimate == undefined){
|
||||
return;
|
||||
}else if(codeEstimate.trim() == "下一关"){
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
} else if(codeEstimate.trim() == "退出实训"){
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
}
|
||||
}
|
||||
// 访问60次,即120s后后台还未改变状态即执行
|
||||
if(i == 60){
|
||||
if(data.language == "Html"){
|
||||
tpi_html_show();
|
||||
}
|
||||
clearInterval(intId);
|
||||
nEvalContent.show();
|
||||
nEvalInfo.show();
|
||||
nAjaxLoading.val("");
|
||||
nInfoAjaxLoading.val("");
|
||||
nAjaxLoading.hide();
|
||||
nInfoAjaxLoading.hide();
|
||||
var html = "<a href='javascript:void(0)' class='task-btn task-btn-blue mr15 mt8' onclick='training_task_submmit();'>评测</a>";
|
||||
var html_1 = "实训云平台繁忙(繁忙等级:88)";
|
||||
$("#code_test").html(html);
|
||||
notice_box(html_1);
|
||||
}
|
||||
},
|
||||
complete: function(XMLHttpRequest,status){if(status=='timeout'){
|
||||
clearInterval(intId);
|
||||
nEvalContent.show();
|
||||
nEvalInfo.show();
|
||||
nAjaxLoading.val("");
|
||||
nInfoAjaxLoading.val("");
|
||||
nAjaxLoading.hide();
|
||||
nInfoAjaxLoading.hide();
|
||||
ajaxTimeoutTest.abort();
|
||||
clearInterval(intId);
|
||||
success: function(data){
|
||||
console.log(data);
|
||||
if(data.onRun == 1){
|
||||
clearInterval(timeID);
|
||||
$("#game_wating_time").html("");
|
||||
// 每2s匹配一次状态,成功2 评测中1 评测 0
|
||||
var intId = setInterval(function(){
|
||||
var ajaxTimeoutTest = $.ajax({
|
||||
url: '<%= game_status_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
timeout : 50000,
|
||||
async: false,
|
||||
data:{"resubmit":data.resubmit},
|
||||
success:function(data){
|
||||
// 如果查到了,就退出
|
||||
i = i + 1;
|
||||
console.log(i);
|
||||
if(data.status == 2 || data.status == 0){
|
||||
if(data.language == "Html"){
|
||||
tpi_html_show();
|
||||
}
|
||||
clearInterval(intId);
|
||||
nEvalContent.show();
|
||||
nEvalInfo.show();
|
||||
nAjaxLoading.val("");
|
||||
nInfoAjaxLoading.val("");
|
||||
nAjaxLoading.hide();
|
||||
nInfoAjaxLoading.hide();
|
||||
// test_sets 公开测,hide_test_sets 隐藏测试集
|
||||
code_evaluation(
|
||||
eval('[' + data.test_sets + ']'),
|
||||
data.had_test_count,
|
||||
data.test_sets_count,
|
||||
data.had_passed_testsests_error_count,
|
||||
data.test_sets_hidden_count,
|
||||
data.test_sets_public_count,
|
||||
data.had_passed_testsests_hidden_count,
|
||||
data.had_passed_testsests_public_count,
|
||||
data.final_score,
|
||||
data.latest_output,
|
||||
data.language
|
||||
);
|
||||
$("#blacktab_nav_1").trigger("click");
|
||||
if(data.status == 2){
|
||||
clearInterval(cm);
|
||||
clearInterval(intId);
|
||||
var icon = $("#game_status_<%= @game_challenge.id %>"); // 实训列表的icon
|
||||
$("#user_grade").html(parseInt($("#user_grade").html()) + parseInt(data.final_score));
|
||||
console.log("############################################");
|
||||
console.log(data.score);
|
||||
console.log(data.tag_count);
|
||||
console.log($("#shixun_exp_<%=@game_challenge.id %>")[0]);
|
||||
$("#shixun_exp_<%=@game_challenge.id %>").html("经验值<span class='color-light-green mr5'>+"+ data.score + "</span>");
|
||||
$("#shixun_grade_<%=@game_challenge.id %>").html("金币<span class='color-light-green mr5'>+"+ data.score + "</span>");
|
||||
$("#shixun_tag_<%=@game_challenge.id %>").html("技能标签<span class='color-light-green mr5'>+"+ data.tag_count + "</span>");
|
||||
icon.find("i").attr("class", "fa fa-unlock fr font-18 mt5 color-light-green w20_center");
|
||||
icon.find("a:last").attr("title", "已完成");
|
||||
if( data.had_done == 0 ) {
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 0}) %>";
|
||||
}else{
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 1}) %>";
|
||||
}
|
||||
// 传递具体屏幕的宽高,实现不同浏览器与不同分辨率都能撑满屏幕
|
||||
pop_box_new2(htmlvalue, window.innerWidth, window.innerHeight);
|
||||
$("#reset_code_to_bengin").show(); // 显示加载上次通过的代码
|
||||
}
|
||||
var html = "<a href='javascript:void(0)' class='task-btn task-btn-blue mr15 mt8' onclick='training_task_submmit();'>评测</a>";
|
||||
$("#code_test").html(html); // 恢复评测
|
||||
var codeEstimate = $("#code_estimate").children("a").html();
|
||||
if(codeEstimate == undefined){
|
||||
return;
|
||||
}else if(codeEstimate.trim() == "下一关"){
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
} else if(codeEstimate.trim() == "退出实训"){
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
}
|
||||
}
|
||||
// 访问60次,即120s后后台还未改变状态即执行
|
||||
if(i == 60){
|
||||
if(data.language == "Html"){
|
||||
tpi_html_show();
|
||||
}
|
||||
clearInterval(intId);
|
||||
nEvalContent.show();
|
||||
nEvalInfo.show();
|
||||
nAjaxLoading.val("");
|
||||
nInfoAjaxLoading.val("");
|
||||
nAjaxLoading.hide();
|
||||
nInfoAjaxLoading.hide();
|
||||
if( data.had_done == 0 ) {
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
}
|
||||
var html = "<a href='javascript:void(0)' class='task-btn task-btn-blue mr15 mt8' onclick='training_task_submmit();'>评测</a>";
|
||||
|
||||
}}
|
||||
});
|
||||
var html_1 = "实训云平台繁忙(繁忙等级:88)";
|
||||
$("#code_test").html(html);
|
||||
notice_box(html_1);
|
||||
}
|
||||
},
|
||||
complete: function(XMLHttpRequest,status){if(status=='timeout'){
|
||||
clearInterval(intId);
|
||||
nEvalContent.show();
|
||||
nEvalInfo.show();
|
||||
nAjaxLoading.val("");
|
||||
nInfoAjaxLoading.val("");
|
||||
nAjaxLoading.hide();
|
||||
nInfoAjaxLoading.hide();
|
||||
ajaxTimeoutTest.abort();
|
||||
}}
|
||||
});
|
||||
}, 2000);
|
||||
}else if(data.onRun == 0){
|
||||
mintes = parseInt(data.waitingTime / 60);
|
||||
if(mintes > 1){
|
||||
$("#game_wating_time").html("目前正有" + data.waitNum + "个任务正在等待,大约需要等待" + mintes + "分钟")
|
||||
}else{
|
||||
$("#game_wating_time").html("目前正有" + data.waitNum + "个任务正在等待,大约需要等待" + data.waitingTime + "秒")
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
$("#all_task_show").css("display","none");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -123,6 +123,9 @@
|
|||
// codemmirror键盘按下事件,用来触发自动补全代码功能
|
||||
editor_CodeMirror.on("keyup", function(editor, event)
|
||||
{
|
||||
<% if @myshixun.shixun.language == "Html" %>
|
||||
return;
|
||||
<% end %>
|
||||
var __Cursor = editor.getDoc().getCursor();
|
||||
var __Token = editor.getTokenAt(__Cursor);
|
||||
/* // 当前行变化时,codemirror的js会改变gutter的结构,因此要在此需要再增加标示
|
||||
|
|
|
|||
|
|
@ -18,113 +18,10 @@
|
|||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div id="game_test_set_results" class="-flex -relative blacktab-inner"></div>
|
||||
<script id="t:exec_results_1" type="text/html">
|
||||
<div id="blacktab_con_1" class="" >
|
||||
|
||||
<! if(language == "Html") { !>
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll task-padding16 loading-center undis" id="html_ajax_loading"></div>
|
||||
<div class="-flex -scroll task-padding16" id="html_contents" style="background: #fff">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<! } !>
|
||||
</div>
|
||||
<div id="blacktab_con_2" class="<!= language == 'Html' ? 'undis' : '' !>" >
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll task-padding16 loading-center undis" id="evaluating_ajax_loading">
|
||||
<embed src='/images/bigdata/loading2.svg' />
|
||||
</div>
|
||||
<div class="-flex -scroll task-padding16" id="evaluating_contents">
|
||||
<! if(had_test_count != "0") { !>
|
||||
<! if(had_passed_testsests_error_count != "0") { !>
|
||||
<p class="-text-danger mb10">
|
||||
<i class="fa fa-exclamation-circle font-16" ></i><span class="ml5 mr5 -text-danger"><!= had_passed_testsests_error_count !>/<!= test_sets_count !></span> <!= latest_output !>
|
||||
</p>
|
||||
<! }else{ !>
|
||||
<p class="color-light-green mb10">
|
||||
<i class="fa fa-check-circle font-16" ></i><span class="ml5 mr5"><!= test_sets_count !>/<!= test_sets_count !></span> 全部通过
|
||||
</p>
|
||||
<! } !>
|
||||
<! } !>
|
||||
<! for(var i = 0; i < test_sets.length; i++ ) { !>
|
||||
<div class="-task-ces-box mb15 clearfix">
|
||||
<div class="-task-ces-top" onclick="toggle_test_case('<!= test_sets[i].is_public !>', '<!= i !>')" style="cursor:pointer">
|
||||
<i class="fa fa-caret-right mr5 font-16" ></i>
|
||||
<span class="font-14">测试集 <!= i + 1 !></span>
|
||||
<! if( test_sets[i].result == 0 ) { !>
|
||||
<i class="fa fa-exclamation-circle -text-danger fr mt8 ml5" ></i>
|
||||
<! } !>
|
||||
<! if( test_sets[i].result == 1 ) { !>
|
||||
<i class="fa fa-check-circle color-light-green fr mt8 ml5 font-16" ></i>
|
||||
<! } !>
|
||||
<! if(test_sets[i].is_public == 0) { !>
|
||||
<i class="fa fa-lock fr mt8" ></i>
|
||||
<! } !>
|
||||
</div>
|
||||
<! if(test_sets[i].is_public == 1) { !>
|
||||
<div class="-task-ces-info undis" id="test_case_<!= i !>">
|
||||
<ul class="font-14">
|
||||
<li class="clearfix"><div class="clearfix"><span class="-task-ces-info-left color-blue fl fb">测试输入:</span><p class="fl" style="width: 90%;"><!= test_sets[i].input == null ? "空" : test_sets[i].input.replace(/\r\n/g,"<br>") !></p></div></li>
|
||||
<li class="clearfix"><div class="clearfix"><span class="-task-ces-info-left color-blue fl fb">预期输出:</span><p class="fl" style="width: 90%;"><!= test_sets[i].output == null ? "空" : test_sets[i].output.replace(/\r\n/g,"<br>") !></p></div></li>
|
||||
<li class="clearfix"><div class="clearfix"><span class="-task-ces-info-left color-blue fl fb">实际输出:</span><p class="fl color-orange" style="width: 90%;"><!= test_sets[i].actual_output == null ? "空" : test_sets[i].actual_output.replace(/\r\n/g,"<br>") !></p></div></li>
|
||||
</ul>
|
||||
</div>
|
||||
<! } !>
|
||||
<! if(test_sets[i].is_public == 0) { !>
|
||||
<div class="-task-ces-info undis" id="test_case_<!= i !>">
|
||||
<ul class="font-14">
|
||||
<li class="clearfix"><div class="clearfix"><p class="fl color-orange" style="width: 90%;margin-left: 34px;">此为隐藏测试项,暂不支持查看</p></div></li>
|
||||
</ul>
|
||||
</div>
|
||||
<! } !>
|
||||
</div>
|
||||
<! } !>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="blacktab_con_3" class="undis" >
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll task-padding16 loading-center undis" id="info_ajax_loading">
|
||||
<embed src='/images/bigdata/loading2.svg' />
|
||||
</div>
|
||||
<div class="-flex -scroll task-padding16" id="evaluating_info">
|
||||
<! if(had_test_count != "0") { !>
|
||||
<! if(had_passed_testsests_error_count != "0") { !>
|
||||
<p class="-text-danger mb10">
|
||||
<i class="fa fa-exclamation-circle font-16" ></i><span class="ml5 mr5 -text-danger"><!= had_passed_testsests_error_count !>/<!= test_sets_count !></span> <!= latest_output !>
|
||||
</p>
|
||||
<! }else{ !>
|
||||
<p class="color-light-green mb10">
|
||||
<i class="fa fa-check-circle font-16 " ></i><span class="ml5 mr5"><!= test_sets_count !>/<!= test_sets_count !></span> 全部通过
|
||||
</p>
|
||||
<! } !>
|
||||
<! } !>
|
||||
<div class="-task-ces-box mb10 clearfix">
|
||||
<div class="-task-ces-info">
|
||||
<ul>
|
||||
<li><span class="-task-ces-info-left ">公开测试:</span><span class="color-light-green"><!= had_passed_testsests_public_count !>/<!= test_sets_public_count !></span></li>
|
||||
<li><span class="-task-ces-info-left">隐藏测试:</span><span class="color-light-green"><!= had_passed_testsests_hidden_count !>/<!= test_sets_hidden_count !></span></li>
|
||||
<li><span class="-task-ces-info-left">经验值:</span><span class="color-light-green" id="experience_value">+ <!= final_score !></span></li>
|
||||
<li><span class="-task-ces-info-left">金币:</span><span class="color-light-green" id="grade_value">+ <!= final_score !></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// test_sets:测试集;had_test_count:输出集的个数;test_sets_count:测试集的个数;had_passed_testsests_error_count:测试集报错数;test_sets_hidden_count:隐藏测试集的个数
|
||||
// test_sets_public_count:公开测试集的个人;had_passed_testsests_hidden_count:通过的隐藏集个数;had_passed_testsests_public_count:通过的公开测试集个数
|
||||
// final_score:最终得分;had_done:通过的是否是最后一关;latest_output:最新的输出;language:实训的语言
|
||||
<%# test_sets:测试集;had_test_count:输出集的个数;test_sets_count:测试集的个数;had_passed_testsests_error_count:测试集报错数;test_sets_hidden_count:隐藏测试集的个数 %>
|
||||
<%# test_sets_public_count:公开测试集的个人;had_passed_testsests_hidden_count:通过的隐藏集个数;had_passed_testsests_public_count:通过的公开测试集个数 %>
|
||||
<%# final_score:最终得分;had_done:通过的是否是最后一关;latest_output:最新的输出;language:实训的语言 %>
|
||||
$(function(){
|
||||
code_evaluation(
|
||||
[<%= @test_sets.html_safe unless @test_sets.blank? %>],
|
||||
|
|
@ -142,34 +39,6 @@
|
|||
$("#blacktab_nav_1").trigger("click");
|
||||
});
|
||||
|
||||
|
||||
/* var bt = baidu.template;
|
||||
bt.LEFT_DELIMITER = '<!';
|
||||
bt.RIGHT_DELIMITER = '!>';
|
||||
bt.ESCAPE = false;
|
||||
$(function(){
|
||||
// console.log("<%#= @public_test_sets.join(',').html_safe %>");
|
||||
var html = bt('t:exec_results_1',{
|
||||
test_sets: [<%#= @test_sets.html_safe unless @test_sets.blank? %>],
|
||||
// hide_test_sets: [<%#= @private_test_sets.html_safe unless @private_test_sets.blank? %>]
|
||||
had_test_count: '<%#= @had_test_count %>',
|
||||
test_sets_count: '<%#= @test_sets_count %>',
|
||||
had_passed_testsests_error_count: '<%#= @had_passed_testsests_error_count %>',
|
||||
test_sets_hidden_count : '<%#= @test_sets_hidden_count %>',
|
||||
test_sets_public_count: '<%#= @test_sets_public_count %>',
|
||||
had_passed_testsests_hidden_count: '<%#= @had_passed_testsests_hidden_count %>',
|
||||
had_passed_testsests_public_count: '<%#= @had_passed_testsests_public_count %>',
|
||||
final_score: '<%#= @final_score %>',
|
||||
had_done: '<%#= @had_done %>',
|
||||
latest_output: [<%#= @latest_output.html_safe unless @latest_output.blank? %>],
|
||||
language: '<%#= @language %>'
|
||||
}
|
||||
);
|
||||
$("#game_test_set_results").html(html);
|
||||
$("#blacktab_nav_1").trigger("click");
|
||||
});*/
|
||||
|
||||
|
||||
function g_new(o){return document.getElementById(o);}
|
||||
function HoverLi(n){
|
||||
for(var i=1;i<=3;i++){
|
||||
|
|
@ -179,10 +48,4 @@
|
|||
g_new('blacktab_con_'+n).className='dis';
|
||||
g_new('blacktab_nav_'+n).className='blacktab_hover';
|
||||
}
|
||||
|
||||
/*allClassName---------------同一块tab共有的类名(同时对应的显示块ID要等于类名加上"_"在加上块的位置)
|
||||
* addClassName---------------点击tab需要添加的样式类
|
||||
* item-----------------------点击的当前tab元素
|
||||
* */
|
||||
|
||||
</script>
|
||||
|
|
@ -8,19 +8,33 @@
|
|||
<div class="panel-list">
|
||||
<div class=" clearfix -task-list-inner" id="game_status_<%= challenge.id %>">
|
||||
<span class="icon-success fl mr5"><%= challenge.try(:position) %></span>
|
||||
<% if game.try(:status) == 0 %>
|
||||
<h4 class=" -task-list-title fl"><%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
|
||||
<a class="fr " data-tip-down="待完成"><i class="fa fa-play-circle color-light-green fr font-18 mt5 -text-danger w20_center" ></i></a>
|
||||
<% elsif game.try(:status) == 1 %>
|
||||
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
|
||||
<span class="fr color-light-green">正在解决</span>
|
||||
<% elsif game.try(:status) == 2 %>
|
||||
<h4 class="-task-list-title fl"> <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
|
||||
<a class="fr" data-tip-down="已解决"><i class="fa fa-check-circle fr font-18 mt5 color-light-green w20_center" ></i></a>
|
||||
<% elsif game.try(:status) == 3 %>
|
||||
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
|
||||
<a class="fr" data-tip-down="未解锁"><i class="fa fa-play-circle fr font-18 mt5 color-grey w20_center" ></i></a>
|
||||
<% end %>
|
||||
|
||||
<% if game.try(:status) == 0 %>
|
||||
<h4 class=" -task-list-title fl"><%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
|
||||
<% if @myshixun.shixun.try(:status) == 2 %>
|
||||
<a class="fr " data-tip-down="待完成"><i class="fa fa-play-circle color-light-green fr font-18 mt5 -text-danger w20_center" ></i></a>
|
||||
<% end %>
|
||||
<% elsif game.try(:status) == 1 %>
|
||||
<% if @myshixun.shixun.try(:status) == 2 %>
|
||||
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
|
||||
<span class="fr color-light-green">正在解决</span>
|
||||
<% else %>
|
||||
<h4 class="-task-list-title fl"> <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
|
||||
<% end %>
|
||||
<% elsif game.try(:status) == 2 %>
|
||||
<h4 class="-task-list-title fl"> <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
|
||||
<% if @myshixun.shixun.try(:status) == 2 %>
|
||||
<a class="fr" data-tip-down="已解决"><i class="fa fa-check-circle fr font-18 mt5 color-light-green w20_center" ></i></a>
|
||||
<% end %>
|
||||
<% elsif game.try(:status) == 3 %>
|
||||
<% if @myshixun.shixun.try(:status) == 2 %>
|
||||
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
|
||||
<a class="fr" data-tip-down="未解锁"><i class="fa fa-play-circle fr font-18 mt5 color-grey w20_center" ></i></a>
|
||||
<% else %>
|
||||
<h4 class="-task-list-title fl"> <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div style="display: flex;" class="with80 ml30">
|
||||
<% if game.try(:status) == 0 || game.try(:status) == 1 || game.try(:status) == 3 %>
|
||||
|
|
|
|||
|
|
@ -20,12 +20,14 @@
|
|||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div id="codetab_con_1" style="background: #2b2b2b;">
|
||||
<div class="panel-header clearfix" id="top_repository" style="border-bottom:0">
|
||||
<h3 class="fl">
|
||||
<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir'} %>
|
||||
</h3>
|
||||
<h3 id="save_status" class="ml15 fl" style="font-weight: normal"></h3>
|
||||
</div>
|
||||
<% unless [2,3].include?(@myshixun.shixun.try(:status).to_i) %>
|
||||
<div class="panel-header clearfix" id="top_repository" style="border-bottom:0">
|
||||
<h3 class="fl">
|
||||
<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir'} %>
|
||||
</h3>
|
||||
<h3 id="save_status" class="ml15 fl" style="font-weight: normal"></h3>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="-flex -relative">
|
||||
<div class="fit">
|
||||
<!-- <div class="-layout-v -fit loading-center undis" id="coding_ajax_loading">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
$("#all_task_tab").trigger("click"); // 模拟全部任务点击事件
|
||||
if($("#all_task_index").css("left") == "0px"){
|
||||
$("#all_task_tab").trigger("click"); // 模拟全部任务点击事件
|
||||
}
|
||||
$("#all_task_show").html("<%= j (render :partial => "games_list") %>");
|
||||
hideModal();
|
||||
|
|
@ -112,8 +112,8 @@
|
|||
var keyword = $("input[name='search_keyword']").val(); // 搜索关键字
|
||||
var index = $("#all_status_show_value").text(); // 搜索课程/项目
|
||||
index = index == "课堂" ? 1 : 2;
|
||||
console.log("课堂" === index);
|
||||
console.log("实训" === index);
|
||||
// console.log("课堂" === index);
|
||||
// console.log("实训" === index);
|
||||
window.location.href = "<%= search_shixuns_or_courses_users_path %>" + "?search=" + keyword + "&index=" + index;
|
||||
/* $.ajax({
|
||||
url: "<%#= search_shixuns_or_courses_users_path %>",
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@
|
|||
</div>
|
||||
<%#= render_flash_messages %>
|
||||
<div class="task-pm-content">
|
||||
<% if !(params[:tab].to_i == 5 && params[:action] == "edit") %>
|
||||
<%= render_flash_messages %>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<th width="40%" class="edu-txt-left">实训套件名称</th>
|
||||
<th width="20%" class="edu-txt-left">单位</th>
|
||||
<th width="15%">创建者</th>
|
||||
<th class="eud-pointer">发布时间<i class="fa fa-long-arrow-down color-light-green ml5"></i></th>
|
||||
<th class="eud-pointer">发布时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -29,3 +29,15 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(".eud-pointer").on("click", function(ev){
|
||||
var nArrow = $(this).find("i");
|
||||
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
|
||||
$("input[name='sx_order']").val(sx_order);
|
||||
$.ajax({
|
||||
url:"<%= class_publish_shixuns_managements_path %>",
|
||||
data: $("#class_publish_shixuns_search").serialize(),
|
||||
dateType: "script"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -51,17 +51,6 @@
|
|||
|
||||
<script>
|
||||
// alert(window.location.href);
|
||||
$(".eud-pointer").on("click", function(ev){
|
||||
var nArrow = $(this).find("i");
|
||||
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
|
||||
$("input[name='sx_order']").val(sx_order);
|
||||
$.ajax({
|
||||
url:"<%= class_shixuns_managements_path %>",
|
||||
data: $("#class_shixuns_search").serialize(),
|
||||
dateType: "script"
|
||||
});
|
||||
});
|
||||
|
||||
$(function(){
|
||||
$(".subject_hidden").on("click", 'input', function(ev){
|
||||
var id = $(ev.target).parent().find("div").html();
|
||||
|
|
@ -71,5 +60,16 @@
|
|||
data:{subject_id: id}
|
||||
});
|
||||
});
|
||||
});
|
||||
$(".eud-pointer").on("click", function(ev){
|
||||
var nArrow = $(this).find("i");
|
||||
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
|
||||
$("input[name='sx_order']").val(sx_order);
|
||||
$.ajax({
|
||||
url:"<%= class_shixuns_managements_path %>",
|
||||
data: $("#class_shixuns_search").serialize(),
|
||||
dateType: "script"
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<td class="edu-txt-left">
|
||||
<%= link_to syllabus.title,syllabus_path(syllabus.id) %>
|
||||
</td>
|
||||
<td><%= link_to syllabus.user.show_name, user_path(syllabus.user) %></td>
|
||||
<td><%= link_to syllabus.user.show_real_name, user_path(syllabus.user) %></td>
|
||||
<td><%= format_time syllabus.created_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="10%">ID</th>
|
||||
<th class="table_Name_text" width="30%">实训名称</th>
|
||||
<th width="30%" class="edu-txt-left">实训名称</th>
|
||||
<th width="8%">顶</th>
|
||||
<th width="8%">踩</th>
|
||||
<th width="8%">未通关</th>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<% @shixuns.each do |shixun| %>
|
||||
<tr>
|
||||
<td><%= shixun.identifier %></td>
|
||||
<td><span class="table_Name_text"><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td class="edu-txt-left"><span><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td>
|
||||
<%= PraiseTread.where(:praise_tread_object_id => shixun.challenges, :praise_tread_object_type => "Challenge").count %>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<% unless @apply_status.blank? %>
|
||||
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -24,6 +25,9 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% end %>
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
</td>
|
||||
<td class="edu-txt-left">
|
||||
<span>
|
||||
<%= link_to schools.name,"http://#{Setting.host_name}/?schools_id=#{schools.id}" %>
|
||||
<%= schools.name %>
|
||||
</span>
|
||||
</td>
|
||||
<td><%= schools.province %></td>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="9%">ID</th>
|
||||
<th class="table_Name_text" >实训名称</th>
|
||||
<th width="18%" class="edu-txt-left">实训名称</th>
|
||||
<th width="8%">顶</th>
|
||||
<th width="8%">踩</th>
|
||||
<th width="8%">已通关</th>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<% @shixuns.each do |shixun| %>
|
||||
<tr>
|
||||
<td><%= shixun.identifier %></td>
|
||||
<td><span class="table_Name_text"><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td class="edu-txt-left"><span><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td>
|
||||
<%= PraiseTread.where(:praise_tread_object_id => shixun.challenges, :praise_tread_object_type => "Challenge").count %>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="10%">ID</th>
|
||||
<th class="table_Name_text" width="25%">实训名称</th>
|
||||
<th width="25%" class="edu-txt-left">实训名称</th>
|
||||
<th width="15%">技术平台</th>
|
||||
<th width="5%">任务</th>
|
||||
<th width="10%">状态</th>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<% @shixuns.each do |shixun| %>
|
||||
<tr>
|
||||
<td><%= shixun.identifier %></td>
|
||||
<td><span class="table_Name_text"><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td class="edu-txt-left"><span><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td><%= shixun.language %></td>
|
||||
<td><%= shixun.challenges.count %></td>
|
||||
<td><%= shixun_authentication_status shixun %></td>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<td class="operate">
|
||||
<!-- <a class="fl" href="<%#= shixun_path(shixun) %>" data-method="delete" >删除</a>-->
|
||||
<% if shixun.status == 0 %>
|
||||
<%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "确认删除" } ) %>
|
||||
<%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "您确定要删除吗?" } ) %>
|
||||
<% end %>
|
||||
<span class="fr ml5 shixun_hidden">
|
||||
<input type="checkbox" <%= shixun.hidden ? 'checked' : "" %> value="0" id="shixun_hidden_<%= shixun.id %>" name="hidden" class="ml-3 mr5 magic-checkbox">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<% unless @authorizations.blank? %>
|
||||
<% @authorizations.each do |authorization| %>
|
||||
<div class="admin-con-box clearfix">
|
||||
<% user = authorization.user %>
|
||||
|
|
@ -34,6 +35,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
function subject_agree_authorization(id){
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<% unless @apply_status.blank? %>
|
||||
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -81,6 +82,10 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% end %>
|
||||
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<% @users.each_with_index do |user,index| %>
|
||||
<% authorization = ApplyAction.where(:user_id => user, :container_type => "TrialAuthorization").last %>
|
||||
<tr>
|
||||
<td style="padding-left:15px;">
|
||||
<input id="authorization_<%= user.id %>" type="checkbox" class="magic-checkbox" name="member_ids[]" value="<%= user.id %>">
|
||||
|
|
@ -33,7 +32,7 @@
|
|||
<td><%= user.professional_certification ? "已认证" : "未认证" %></td>
|
||||
<td ><span class="edu-txt-w140 task-hide2" title="<%= user.try(:user_extensions).try(:school).try(:name) %>"><%= user.try(:user_extensions).try(:school).try(:name).blank? ? "--" : user.try(:user_extensions).try(:school) %></span></td>
|
||||
<td ><span class="edu-txt-w140 task-hide2"><%= user.try(:user_extensions).department ? user.try(:user_extensions).try(:department).try(:name).to_s : '--' %></span></td>
|
||||
<td><%= identity_authentication_status(authorization.try(:status)) %></td>
|
||||
<td><%= identity_authentication_status(user) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<input class="fl task-form-20 task-height-30" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="cla_sx_Look_name">
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5" onclick="$('#class_publish_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:clearSearchCondition();" class="fl task-btn ml5 mt2 ">清除</a>
|
||||
<input name="sx_order" type="hidden">
|
||||
</div>
|
||||
<div class="edu-con-bg01 mt15" id="class_shixun_list">
|
||||
<%= render :partial => "managements/class_publish_shixuns_list" %>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,6 @@
|
|||
<!--<form action="<%#= search_user_managements_path %>" id="management_search_user" method="post" data-remote="true">-->
|
||||
<%= form_tag(url_for(search_user_managements_path), :id => "management_search_user", :method => "post", :remote => true) do %>
|
||||
<div class="edu-class-top mt15 clearfix ">
|
||||
<!-- <div class="edu-position edu-admin-select fl mr10" style="width:100px;" >
|
||||
<p>认证情况<i class="fa fa-caret-down ml10" ></i></p>
|
||||
<input type="hidden" name="authentication" value="">
|
||||
<ul class="edu-admin-option">
|
||||
<li data-val="">认证情况</li>
|
||||
<li data-val="1">已认证</li>
|
||||
<li data-val="-1">未认证</li>
|
||||
<li data-val="0">处理中</li>
|
||||
<li data-val="2">被拒绝</li>
|
||||
</ul>
|
||||
</div>-->
|
||||
<div class="edu-position edu-admin-select fl mr10" style="width:110px;">
|
||||
<p>试用授权情况<i class="fa fa-caret-down ml10" ></i></p>
|
||||
<input type="hidden" name="trial" value='-2'>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ function showPreview(source) {
|
|||
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
|
||||
<div style="clear: both;"></div>
|
||||
<div class="mt15">学校名称:<input type="text" name="name" placeholder="现在对应的学校名称" value="<%= @school.name%>" class="schoolName ml10"/></div>
|
||||
<div class="mt10">学校省份:
|
||||
<div class="mt10">学校省市:
|
||||
<select class="provinceSelect ml10" name="province">
|
||||
<option value="" class="">--请选择省份--</option>
|
||||
<option value="北京市" <%= @school.province == '北京市' ? 'selected':'' %>>北京</option>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<div class="task-index">
|
||||
<div class="task-index-head mt20 mb20 user_bg_shadow">
|
||||
<div class="task-index-head-top">
|
||||
<div class="task-index-head mt30 mb30 user_bg_shadow">
|
||||
<div class="task-index-head-top pr">
|
||||
<!--<div id="triangle" class="top-xz" style="left: 20%;top:10px;"></div>-->
|
||||
<h2 class="fl task-inde-head-title">全部实训</h2>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
@ -15,14 +16,14 @@
|
|||
|
||||
<div class="clearfix">
|
||||
<form id="shixun_index_search_form">
|
||||
<div class="course-nav-box width1 edu-bg user_bg_shadow">
|
||||
<div class="course-nav-box width1 edu-bg user_bg_shadow01">
|
||||
<div class="course-nav-row bottomdashed1 clearfix">
|
||||
<span class="fl color-grey check_item">适用专业</span>
|
||||
<div class="course-nav-row_item fl" id="shixun_major_search">
|
||||
<%= render :partial => 'shixun_major_search' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="course-nav-row bottomdashed1 clearfix pr lesson_content">
|
||||
<div class="course-nav-row bottomdashed1 clearfix pr lesson_content" style="width: 100%">
|
||||
<span class="fl color-grey check_item">适用课程</span>
|
||||
<div class="course-nav-row_item fl with87 lesson_item" id="shixun_course_search">
|
||||
<%= render :partial => 'shixun_course_search' %>
|
||||
|
|
@ -184,7 +185,7 @@
|
|||
</div>
|
||||
<!----------------------- 左侧导航栏 ----------------------------->
|
||||
<%= render :partial => 'layouts/public_left_info' %>
|
||||
|
||||
<style>body{background: #FFFFFF}</style><!--后续需要删除-->
|
||||
<script>
|
||||
function searchToggle(obj, evt){
|
||||
var container = $(obj).closest('.search-wrapper');
|
||||
|
|
|
|||
|
|
@ -2,13 +2,18 @@
|
|||
sure_box_redirect('#{security_settings_path}', '开启实训,请先绑定邮箱');
|
||||
<% else %>
|
||||
<% if @is_modify.blank? %>
|
||||
//为了防止浏览器阻挡
|
||||
//为了防止浏览器阻挡,在实训路径中需要弹出新的页面,而实训首页又不需要弹出新的页面
|
||||
<% if @is_subject %>
|
||||
var newTab=window.open("/loading.html");
|
||||
$.ajax().done(function() {
|
||||
// 重定向到目标页面
|
||||
newTab.location.href = "<%= shixun_exec_shixun_path(@shixun) %>";
|
||||
});
|
||||
<% else %>
|
||||
$(".loading_all").show();
|
||||
window.location.href="<%= shixun_exec_shixun_path(@shixun) %>";
|
||||
$("#ajax-indicator").hide();
|
||||
//var tempwindow = window.open();
|
||||
//tempwindow.location = '<%#= shixun_exec_shixun_path(@shixun) %>';
|
||||
//window.open("<%#= shixun_exec_shixun_path(@shixun) %>");
|
||||
<% end %>
|
||||
<% else %>
|
||||
sure_box_redirect('<%= myshixun_reset_myshixun_path(@myshixun) %>', '实训已经更新啦,系统正在为您重置');
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@
|
|||
<a href="javascript:void(0);" class="tab_type">参考答案</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @is_teacher%>
|
||||
<% if @is_teacher %>
|
||||
<div class="fr edu-position edu-position-hidebox mr15 mt8">
|
||||
<a href="javascript:void(0);" class="font-16"><i class="fa fa-bars"></i></a>
|
||||
<a href="javascript:void(0);" class="font-16"><i class="fa fa-bars mr15 mt20"></i></a>
|
||||
<ul class="edu-position-hide undis" style="left:-85px;">
|
||||
<% if @homework.homework_type != 4 %>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -26,26 +26,30 @@
|
|||
<p class="triangle-topright font-12"></p>
|
||||
<span class="triangle-font">已发布</span>
|
||||
<% end %>
|
||||
<div class="subject-box" onclick="subject_link(<%= subject.id %>)" style="cursor: pointer;padding-bottom: 5px">
|
||||
<div class="subject-box" onclick="subject_link(<%= subject.id %>)" style="cursor: pointer;">
|
||||
<p class="font-14 course-list-index-title two_lines_show task-text-center mb5 mt5" style="height: 44px">
|
||||
<a href="javascript:void(0);" style="height: 44px;display: block;line-height: 22px;"><%= subject.name %></a>
|
||||
</p>
|
||||
<p class="font-14 three_lines_show task-text-center mb20 color-dark-grey justify break_word" style="text-align: left;">
|
||||
<%= subject.description.blank? ? "轻松学习#{subject.name}~" : subject.description %>
|
||||
</p>
|
||||
<p class="color-grey bor-bottom-greyE mb5 clearfix" style="text-align:center;">
|
||||
<span class="pl5 pr5"><i class="fa fa-pause-circle color-light-green transform90 pr5" aria-hidden="true" data-tip-down="章节"></i><em><%= subject.stages.count %></em></span>
|
||||
<span class="pl5 pr5"><i class="fa fa-gamepad color-light-green pr5" aria-hidden="true" data-tip-down="实训"></i><em><%= subject.stage_shixuns.count %></em></span>
|
||||
<p class="color-grey bor-bottom-greyE mb25 pb20 clearfix" style="text-align:center;">
|
||||
<span class="pl5 pr5"><i class="fa fa-pause-circle color-light-green transform90" aria-hidden="true" data-tip-down="章节" style="position: relative;right:5px"></i><em><%= subject.stages.count %></em></span>
|
||||
<span class="pl5 pr5"><i class="fa fa-gamepad color-light-green pr5" aria-hidden="true" data-tip-down="实训" style="position: relative;top:-1px"></i><em><%= subject.stage_shixuns.count %></em></span>
|
||||
<span class="pl5 pr5"><i class="fa fa-viacoin color-light-green pr5" aria-hidden="true" data-tip-down="总经验值"></i><em><%= subject.subject_score %></em></span>
|
||||
<span class="pl5 pr5"><i class="fa fa-users color-light-green pr5" aria-hidden="true" data-tip-down="学习人数"></i><em><%= subject.subject_challenges %></em></span>
|
||||
</p>
|
||||
<div class="clearfix mb10 df">
|
||||
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(subject.user), :width =>"40", :height => "40", :class => "bor-radius-all mr10 fl mt8", :alt=>"头像") %></a>
|
||||
<div class="fl" style="flex: 1;text-align: left">
|
||||
<p class="color-dark-grey"><%= subject.user.try(:show_name) %></p>
|
||||
<p class="font-12 unit-name color-dark-grey"><%= subject.user.school_name %></p>
|
||||
</div>
|
||||
<div class="clearfix task-index-list-user task_yx_bo" style="margin-bottom: 0px">
|
||||
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(subject.user), :width =>"30", :height => "30", :class => "bor-radius-all mr10 fl", :alt=>"头像") %></a>
|
||||
<span class="task-index-name task-hide fl"><%= subject.user.try(:show_name) %></span>
|
||||
</div>
|
||||
<!--<div class="clearfix mb15 df">
|
||||
<a href="javascript:void(0);"><%#= image_tag(url_to_avatar(subject.user), :width =>"40", :height => "40", :class => "bor-radius-all mr10 fl mt5", :alt=>"头像") %></a>
|
||||
<div class="fl" style="flex: 1;text-align: left">
|
||||
<p class="color-dark-grey"><%#= subject.user.try(:show_name) %></p>
|
||||
<p class="font-12 unit-name color-dark-grey"><%#= subject.user.school_name %></p>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="box_bg_shandow white_bg pre-book" style="z-index: 2;width: 98%;left: 1%;bottom: -5px;"></div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="active-class">
|
||||
<div class="course_shixun_list">
|
||||
<div class="task-index-head mt20 mb20">
|
||||
<div class="task-index-head mt30 mb30">
|
||||
<div class="header-color">
|
||||
<h2 class="fl task-inde-head-title">实训路径</h2>
|
||||
<div class="cl"></div>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<% stage.stage_shixuns.each_with_index do |stage_shixun, index| %>
|
||||
<% shixun = stage_shixun.shixun %>
|
||||
<div class="clearfix pt10 pb10 paragraph pl20 pr20" id="stage_shixun_<%= shixun.id %>"
|
||||
style="<%= allow_shixun_exec(shixun) ? "" : "cursor: pointer" %>;" onclick="<%= allow_shixun_exec(shixun) ? "" : "shixun_link('#{shixun.identifier}')" %>">
|
||||
style="<%= allow_shixun_exec(shixun) ? "" : "cursor: pointer" %>;" onclick="<%= allow_shixun_exec(shixun) ? "" : (shixun.status < 2 && !User.current.manager_of_shixun?(shixun) ? "" : "shixun_link('#{shixun.identifier}')") %>">
|
||||
<li class="fl li-width63">
|
||||
<i class="fa fa-sort-up color-grey-c fl transform90 font-18 icon-set mr5"></i>
|
||||
<span class="color-grey3 paragraph_name"><%= s_index + 1 %>-<%= index + 1 %> <%= shixun.name %></span>
|
||||
|
|
@ -43,31 +43,35 @@
|
|||
<span class="color-grey paragraph_status"><%= shixun.shixun_status %></span>
|
||||
<% else %>
|
||||
<% if shixun.status > 1 %>
|
||||
<% case my_shixun_status(shixun, User.current) %>
|
||||
<% when '已通关' %>
|
||||
<span class="color-grey status_sx">已通关</span> <i class="fr fa fa-check-circle color-light-green font-18 mr5 mt5" title="已通关"></i>
|
||||
<% when '未通关' %>
|
||||
<span class="color-grey status_sx">未通关</span> <i class="fr fa fa-play-circle color-light-green font-18 mr5 mt5" title="未通关"></i>
|
||||
<% when '未开启' %>
|
||||
<span class="color-grey status_sx">未开启</span> <i class="fr fa fa-play-circle color-grey-c font-18 mr5 mt5" title="未开启"></i>
|
||||
<% if my_shixun_status(shixun, User.current) == "已通关" %>
|
||||
|
||||
<i class="fr fa fa-check-circle color-light-green font-18 mr5 mt5"></i>
|
||||
<% else %>
|
||||
<i class="fr fa fa-play-circle color-light-green font-18 mr5 mt5"></i>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span class="color-grey status_sx">模拟实战</span> <i class="fr fa fa-play-circle color-light-green font-18 mr5 mt5" title="已通关"></i>
|
||||
<i class="fr fa fa-play-circle color-grey-c font-18 mr5 mt5"></i>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if allow_shixun_exec(shixun) %>
|
||||
<% if shixun.status > 1 %>
|
||||
<% myshixun = Myshixun.where(:user_id => User.current.id, :shixun_id => shixun.id).first %>
|
||||
<% if myshixun.blank? %>
|
||||
<%= link_to "开始实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-green ", :style=>"display: none", :id => "shixun_operation", :remote => true %>
|
||||
<%= link_to "开始实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id), :is_subject => true), :class => "task-btn task-btn-green ", :style=>"display: none", :id => "shixun_operation", :remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "继续实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-green", :style=>"display: none", :id => "shixun_operation", :remote => true %>
|
||||
<%= link_to "继续实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id), :is_subject => true), :class => "task-btn task-btn-green", :style=>"display: none", :id => "shixun_operation", :remote => true %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "模拟实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-green", :style=>"display: none", :id => "shixun_operation", :remote => true %>
|
||||
<% if User.current.manager_of_shixun?(shixun) %>
|
||||
<%= link_to "模拟实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id), :is_subject => true), :class => "task-btn task-btn-green", :style=>"display: none", :id => "shixun_operation", :remote => true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to "查看详情", shixun_path(shixun), :class => "task-btn task-btn-green ml10", :style=>"display: none", :target => "_blank" %>
|
||||
<% if shixun.status < 2 && !User.current.manager_of_shixun?(shixun) %>
|
||||
<a class="task-btn task-btn-grey ml10" style="display: none;cursor: default;">正在完善</a>
|
||||
<% else %>
|
||||
<%= link_to "查看详情", shixun_path(shixun), :class => "task-btn task-btn-green ml10", :style=>"display: none", :target => "_blank" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
@ -119,39 +123,42 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="with25 fr">
|
||||
<div class="edu-class-right-box ml15 mb20 user_bg_shadow bor-grey-e pl20 pt20 pr20 pb20">
|
||||
<p class="font-18">学习须知
|
||||
<div class="edu-class-right-box ml15 mb20 bor-radius4 bor-grey01 pl20 pt20 pr20 pb20">
|
||||
<p class="font-18" style="text-align: center">学习须知
|
||||
<% if User.current.manager_of_subject?(@subject) %>
|
||||
<a href="<%= edit_subject_path(@subject) %>"><i class="fa fa-pencil fr mt10 mr5 color-grey-c edit-produce font-12"data-tip-down="编辑"></i></a>
|
||||
<a href="<%= edit_subject_path(@subject) %>"><i class="fa fa-pencil mt10 mr5 color-grey-c edit-produce font-12"data-tip-down="编辑" style="position: relative;top:-3px"></i></a>
|
||||
<% end %>
|
||||
</p>
|
||||
<p class="mt10 mb10 color-dark-grey justify"><pre class="pre_word font-15" style="color: #666;font-family: '微软雅黑','宋体';"><%= @subject.learning_notes.blank? ? "暂未填写" : @subject.learning_notes %></pre></p>
|
||||
<div class="mt10 mb10 color-dark-grey justify"><pre class="pre_word font-15" style="color: #666;font-family: '微软雅黑','宋体';"><%= @subject.learning_notes.blank? ? "暂未填写" : @subject.learning_notes %></pre></div>
|
||||
</div>
|
||||
<div class="edu-class-right-box ml15 user_bg_shadow bor-grey-e pt20 mb40 pl20 pr20">
|
||||
<p class="font-18">教学团队
|
||||
<% if User.current == @subject.user %>
|
||||
<i class="fa fa-pencil fr mt10 mr5 color-grey-c edit-produce font-12"data-tip-down="编辑" onclick="edit_produce();"></i>
|
||||
<% end %>
|
||||
<div class="edu-class-right-box ml15 bor-radius4 bor-grey01 pt20 mb40">
|
||||
<p class="font-18" style="text-align: center">教学团队
|
||||
<%# if User.current == @subject.user %>
|
||||
<!--<i class="fa fa-pencil mt10 mr5 color-grey-c edit-produce font-12"data-tip-down="编辑" onclick="edit_produce();"></i>-->
|
||||
<%# end %>
|
||||
</p>
|
||||
<div class="mb30">
|
||||
<div style="text-align: center" class="mb30 mt30">
|
||||
<p style="line-height: 15px"><%= image_tag(url_to_avatar(@subject.user), :width =>"80", :height => "80", :class => "bor-radius-all", :alt=>"头像") %></p>
|
||||
<!--<p style="line-height: 15px"><%#= @subject.user.try(:show_name) %></p>-->
|
||||
<!--<p style="line-height: 27px" class="color-dark-grey font-12"><%#= @subject.user.school_name %></p><!–+ @subject.user.identity–>-->
|
||||
</div>
|
||||
<pre class="pre_word color-dark-grey produce justify clearfix font-15" style="color: #666;font-family: '微软雅黑','宋体';"><span class="color-black"><%= @subject.user.try(:show_name) %>:</span><%= @subject.user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没有留下" : @subject.user.user_extensions.brief_introduction %><span id="pre-content" class="undis"><%= @subject.user.user_extensions.brief_introduction.blank? ? "" : @subject.user.user_extensions.brief_introduction %></span></pre>
|
||||
<textarea id="user_produce_text" class="mb10 with100 panel-box-sizing produce_text undis" style="min-height: 100px;"></textarea>
|
||||
<input id="current_user_id" value="<%= User.current.id %>" type="hidden">
|
||||
</div>
|
||||
<% subject_co_users(@subject).each do |user| %>
|
||||
<div class="bor-top-greyE mb30">
|
||||
<div style="text-align: center" class="mb20 mt20">
|
||||
<p style="line-height: 15px"><%= image_tag(url_to_avatar(user), :width =>"80", :height => "80", :class => "bor-radius-all", :alt=>"头像") %></p>
|
||||
<!--<p style="line-height: 15px"><%#= user.try(:show_name) %></p>-->
|
||||
<!--<p style="line-height: 27px" class="color-dark-grey font-12"><%#= user.school_name + user.identity %></p>-->
|
||||
</div>
|
||||
<pre class="pre_word mb10 color-dark-grey produce justify clearfix font-15" style="color: #666;font-family: '微软雅黑','宋体';"><span class="color-black"><%= user.try(:show_name) %>:</span><%= user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没有留下" : user.user_extensions.brief_introduction %></pre>
|
||||
<a style="display:block; position:relative;" href="<%= user_path(@subject.user) %>" target="_blank">
|
||||
<div class="pt40 pb40 pl20 pr20 team-append">
|
||||
<div style="text-align: center">
|
||||
<p style="line-height: 15px"><%= image_tag(url_to_avatar(@subject.user), :width =>"80", :height => "80", :class => "bor-radius-all", :alt=>"头像") %></p>
|
||||
<p><%= @subject.user.try(:show_name) %></p>
|
||||
<p style="line-height: 19px" class="color-dark-grey font-12"><%= @subject.user.school_name %></p><!--+ @subject.user.identity-->
|
||||
</div>
|
||||
<input id="current_user_id" value="<%= User.current.id %>" type="hidden">
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<% subject_co_users(@subject).each do |user| %>
|
||||
<a style="display:block; position:relative;" href="<%= user_path(user) %>" target="_blank">
|
||||
<div class="pb40 team-append pl20 pr20">
|
||||
<div style="text-align: center">
|
||||
<p style="line-height: 15px;width:50%;margin:0px auto" class="bor-top-greyE pt40"><%= image_tag(url_to_avatar(user), :width =>"80", :height => "80", :class => "bor-radius-all", :alt=>"头像") %></p>
|
||||
<p><%= user.try(:show_name) %></p>
|
||||
<p style="line-height: 19px" class="color-dark-grey font-12"><%= user.school_name + user.identity %></p>
|
||||
</div>
|
||||
<!--<pre class="pre_word mb10 color-dark-grey produce justify clearfix font-15" style="color: #666;font-family: '微软雅黑','宋体';"><span class="color-black"><%#= user.try(:show_name) %>:</span><%#= user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没有留下" : user.user_extensions.brief_introduction %></pre>-->
|
||||
</div>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="edu-class-container" style="flex: 1 0 auto;">
|
||||
<p class="mb10">
|
||||
<i class="fa fa-map-marker mr5 color-grey"></i>
|
||||
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '在线课堂', courses_path %>
|
||||
<%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to '在线课堂', courses_path %> > <%= link_to '新建课程' %>
|
||||
</p>
|
||||
<div class="user_bg_shadow bor-grey-e">
|
||||
<div class="edu-con-top ">
|
||||
|
|
|
|||
|
|
@ -21,21 +21,24 @@
|
|||
<div class="color-grey school-name"><%= user.school_name.empty? ? "--" : user.school_name %></div>
|
||||
<div class="clearfix" style="line-height: 35px">
|
||||
<span class="font-12 color-grey">粉丝 <%= get_fans_users(user)[0] %></span>
|
||||
<!-- <a href="javascript:void(0);" class="btn-focus fr color-grey">已关注</a>-->
|
||||
<% if user.watched_by?(@user) %>
|
||||
<%= link_to "已关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => user.id, :user_watcher => action),
|
||||
:class => "btn-focus fr color-grey",
|
||||
:method => "delete",
|
||||
:remote => "true",
|
||||
:title => "取消关注" %>
|
||||
<% else %>
|
||||
<%= link_to "关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => user.id, :user_watcher => action),
|
||||
:class => "btn-focus fr color-grey",
|
||||
:method => "post",
|
||||
:remote => "true",
|
||||
:title => "关注" %>
|
||||
<% if @user == current_user %>
|
||||
<% if user.watched_by?(@user)%>
|
||||
<%= link_to "已关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => user.id, :user_watcher => action),
|
||||
:class => "btn-focus fr color-grey",
|
||||
:method => "delete",
|
||||
:remote => "true",
|
||||
:title => "取消关注" %>
|
||||
|
||||
<% else %>
|
||||
<%= link_to "关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => user.id, :user_watcher => action),
|
||||
:class => "btn-focus fr color-grey",
|
||||
:method => "post",
|
||||
:remote => "true",
|
||||
:title => "关注" %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,41 +9,48 @@
|
|||
<div class="content clearfix" id="intelligence_course_list">
|
||||
<% if !@course_result.blank? %>
|
||||
<div class="mh650">
|
||||
<% @course_result.each do | sy | %>
|
||||
<% sy_author = User.find(sy.tea_id) %>
|
||||
<div class="sub-con fl" style="cursor: default;">
|
||||
<div class="task-index-list-box-top">
|
||||
<a href="<%= course_path(sy) %>" title="<%= sy.name %>" target="_blank">
|
||||
<p class="font-14 task-index-list-title two_lines_show">
|
||||
<%= sy.name %>
|
||||
<% @course_result.each do |sy| %>
|
||||
<% sy_author = User.find(sy.tea_id) %>
|
||||
<div class="sub-con fl" style="cursor: default; position:relative">
|
||||
<% unless (sy.is_public == 1 || User.current.admin? || User.current.member_of_course?(sy)) %>
|
||||
<div class="black-half">
|
||||
<div class="black-half-lock"><i class="fa fa-lock" style="font-size: 50px"></i></div>
|
||||
<div class="black-half-info font-16">私有课堂,非成员不能访问</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="task-index-list-box-top">
|
||||
<a href="<%= course_path(sy) %>" title="<%= sy.name %>" target="_blank">
|
||||
<p class="font-14 task-index-list-title two_lines_show">
|
||||
<%= sy.name %>
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<div class="clearfix task-index-list-user">
|
||||
<%= link_to image_tag(url_to_avatar(sy_author), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "用户"), user_path(sy_author), :target => '_blank' %>
|
||||
<%= link_to sy_author.show_name, user_path(sy_author), :class => 'task-index-name task-hide fl', :target => '_blank' %>
|
||||
</div>
|
||||
<p class="color-grey">
|
||||
<% if !sy_author.user_extensions.school_id.blank? && sy_author.user_extensions.school %>
|
||||
<%= sy_author.user_extensions.school.name %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="bot" style="text-align: center;">
|
||||
<p class="color-grey pl15 pr15 clearfix">
|
||||
<% syMembers = sy.members.count %>
|
||||
<% syResource = visable_attachemnts_incourse(sy) %>
|
||||
<% syHome = visable_course_homework(sy) %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-users color-light-green pr10" aria-hidden="true" title="成员"></i><em><%= syMembers %></em></span>
|
||||
<% if syResource.count > 0 %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-cubes color-light-green pr10" aria-hidden="true" title="资源"></i><em><%= syResource.count %></em></span>
|
||||
<% end %>
|
||||
<% if syHome > 0 %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-map color-light-green pr10" aria-hidden="true" title="题库"></i><em><%= syHome %></em></span>
|
||||
<% end %>
|
||||
</p>
|
||||
</a>
|
||||
<div class="clearfix task-index-list-user">
|
||||
<%= link_to image_tag(url_to_avatar(sy_author), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "用户"), user_path(sy_author), :target => '_blank' %>
|
||||
<%= link_to sy_author.show_name, user_path(sy_author), :class => 'task-index-name task-hide fl', :target => '_blank' %>
|
||||
</div>
|
||||
<p class="color-grey">
|
||||
<% if !sy_author.user_extensions.school_id.blank? && sy_author.user_extensions.school %>
|
||||
<%= sy_author.user_extensions.school.name %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="bot" style="text-align: center;">
|
||||
<p class="color-grey pl15 pr15 clearfix">
|
||||
<% syMembers = sy.members.count %>
|
||||
<% syResource = visable_attachemnts_incourse(sy) %>
|
||||
<% syHome = visable_course_homework(sy) %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-users color-light-green pr10" aria-hidden="true" data-tip-down="成员"></i><em><%= syMembers %></em></span>
|
||||
<% if syResource.count > 0 %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-cubes color-light-green pr10" aria-hidden="true" data-tip-down="资源"></i><em><%= syResource.count %></em></span>
|
||||
<% end %>
|
||||
<% if syHome > 0 %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-map color-light-green pr10" aria-hidden="true" data-tip-down="题库"></i><em><%= syHome %></em></span>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
|
|
@ -55,37 +62,54 @@
|
|||
</div>
|
||||
</div>
|
||||
<% elsif !@shixuns_result.blank? %>
|
||||
<div class="mh650">
|
||||
<% @shixuns_result.each do |shixun| %>
|
||||
<div class="task-index-list-box fl">
|
||||
<div class="task-index-list-box fl" style="position: relative">
|
||||
<% if shixun.status == 2 %>
|
||||
<p class="triangle-topright font-12"></p>
|
||||
<span class="triangle-font">已发布</span>
|
||||
<% end %>
|
||||
<% if shixun.status < 2 && !User.current.manager_of_shixun?(shixun) %>
|
||||
<div class="black-half">
|
||||
<div class="black-half-lock"><i class="fa fa-lock" style="font-size: 50px"></i></div>
|
||||
<div class="black-half-info font-16">非试用内容,需要授权</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="task-index-list-box-top xy_box" onclick="shixun_link('<%= shixun.identifier %>')" style="cursor: pointer;">
|
||||
<p class="task-index-list-title two_lines_show">
|
||||
<a href="javascript:void(0);"><%= shixun.name %></a>
|
||||
</p>
|
||||
|
||||
<div class="clearfix task-index-list-user task_yx_bo">
|
||||
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(shixun.owner), :width =>"60", :height => "60", :class => "panel-warp-img mr10 fl", :alt=>"头像") %></a>
|
||||
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(shixun.owner), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "头像") %></a>
|
||||
<span class="task-index-name task-hide fl"><%= shixun.owner.try(:show_name) %></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="mt10 mb10"><%= shixun.language %></span>
|
||||
|
||||
<p class="xy_level"><%= shixun.shixun_trainee %></p>
|
||||
</div>
|
||||
<ul class="task-index-list-box-bottom clearfix">
|
||||
<li><i class="fa fa-gamepad mr5 color-light-green" data-tip-down="实训任务"></i><span><%= shixun.challenges.count %></span></li>
|
||||
<li><i class="fa fa-users mr5 color-light-green" data-tip-down="已开启实训"></i><span><%= shixun.myshixuns.count %></span></li>
|
||||
<li><i class="fa fa-viacoin mr5 color-light-green" data-tip-down="实训经验值"></i><span><%= shixun.shixun_score %></span></li>
|
||||
<li>
|
||||
<i class="fa fa-gamepad mr5 color-light-green" title="实训任务"></i><span><%= shixun.challenges.count %></span>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-users mr5 color-light-green" title="已开启实训"></i><span><%= shixun.myshixuns.count %></span>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-viacoin mr5 color-light-green" title="实训经验值"></i><span><%= shixun.shixun_score %></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @shixun_pages, @shixuns_result_count, :per_page_links => false, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="edu-tab-con-box">
|
||||
|
|
@ -93,11 +117,37 @@
|
|||
<p class="edu-nodata-p mb30">没有数据可以显示!</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function shixun_link(shixun){
|
||||
console.log(shixun);
|
||||
window.open('/shixuns/' + shixun);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function shixun_link(shixun){
|
||||
console.log(shixun);
|
||||
window.open('/shixuns/' + shixun);
|
||||
};
|
||||
|
||||
var timer="";
|
||||
$(".task-index-list-box").hover(function(ev){
|
||||
this.fn = function(){
|
||||
$(this).find(".black-half").show();
|
||||
}
|
||||
clearTimeout(timer);
|
||||
var item=$(this);
|
||||
timer=setTimeout(this.fn(),500);
|
||||
},function(){
|
||||
clearTimeout(timer);
|
||||
$(this).find(".black-half").hide();
|
||||
});
|
||||
|
||||
var timer="";
|
||||
$(".sub-con").hover(function(ev){
|
||||
this.fn = function(){
|
||||
$(this).find(".black-half").show();
|
||||
};
|
||||
clearTimeout(timer);
|
||||
var item=$(this);
|
||||
timer=setTimeout(this.fn(),500);
|
||||
},function(){
|
||||
clearTimeout(timer);
|
||||
$(this).find(".black-half").hide();
|
||||
})
|
||||
</script>
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<!--<%#= link_to '编辑我的资料', my_account_path %>-->
|
||||
<!--</p>-->
|
||||
|
||||
<p class="p2 font-12">
|
||||
<p class="p2 font-12 mt12">
|
||||
<i class="fa fa-eye font-12" aria-hidden="true"></i>
|
||||
<% update_visiti_count @user %>
|
||||
<span><%= @user.visits.to_i %></span> 次访问
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<div class="-task-con">
|
||||
<div class="-task-con-int">
|
||||
<div class="favour">
|
||||
<% str = current_user ? '我' : 'TA' %>
|
||||
<% str = (current_user == @user) ? '我' : 'TA' %>
|
||||
<ul id="edu-user-tab-nav">
|
||||
<li class=" new-tab-nav">
|
||||
<a href="<%= user_watchlist_user_path(@user) %>" class="font-16 tab_type" id="user_watcher_cout" ><%= str %>的关注 <%= @user_watchlist_count %></a>
|
||||
<a href="<%= user_watchlist_user_path(@user) %>" class="font-16 tab_type" id="user_watcher_cout" ><%= str %>的关注 <%= @user_watchlist_count %></a>
|
||||
</li>
|
||||
<li class="edu-user-tab-hover new-tab-nav">
|
||||
<a href="<%= user_fanslist_user_path(@user) %>" class="font-16 tab_type" id="user_fans_count"><%= str %>的粉丝 <%= @user_fanlist_count %></a>
|
||||
|
|
@ -29,4 +29,5 @@
|
|||
$(this).html() == "关注" ? $(this).html("关注") : $(this).html("已关注");
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -138,6 +138,7 @@ RedmineApp::Application.routes.draw do
|
|||
resources :games, :path => "stages" do
|
||||
member do
|
||||
match 'game_build', :via => [:get, :post]
|
||||
match 'get_waiting_time', :via => [:get, :post]
|
||||
match 'next_step', :via => [:get, :post]
|
||||
match 'reset_original_code', :via => [:get, :post]
|
||||
match 'reset_new_code', :via => [:get, :post]
|
||||
|
|
@ -158,7 +159,6 @@ RedmineApp::Application.routes.draw do
|
|||
|
||||
resources :iframes do
|
||||
collection do
|
||||
|
||||
match 'html_content', :via => [:get, :post]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
class AddWebhookToGitlab < ActiveRecord::Migration
|
||||
def change
|
||||
Shixun.where("gpid is not null").each do |shixun|
|
||||
puts(shixun.id)
|
||||
g = Gitlab.client
|
||||
hook_url = Setting.protocol + "://" + Setting.host_name + "/shixuns/#{shixun.identifier}" + "/ghook"
|
||||
g.add_project_hook(shixun.gpid, hook_url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class AddCertificationToUser < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :certification, :boolean, :default => 0
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
class UpdateApplyActionToUser < ActiveRecord::Migration
|
||||
def up
|
||||
apply_users = ApplyAction.where(:status => 1, :container_type => "TrialAuthorization")
|
||||
apply_users.each do |apply|
|
||||
User.where(:id => apply.user_id).first.update_column(:certification, 1)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class ModifyCertificationForUser < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :users, :certification, :integer, :default => 0
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
class UpdateRejectCerticationForUser < ActiveRecord::Migration
|
||||
def up
|
||||
apply_users = ApplyAction.where(:status => 2, :container_type => "TrialAuthorization")
|
||||
unless apply_users.blank?
|
||||
apply_users.each do |apply|
|
||||
User.where(:id => apply.user_id).first.update_column(:certification, 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
class CreateShixunPorts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :shixun_ports do |t|
|
||||
t.integer :shixun_id
|
||||
t.integer :port
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -12,20 +12,16 @@ $(function(){
|
|||
var wrapWidth;
|
||||
var wrapHeight;
|
||||
lab.live('mousedown',function(){
|
||||
|
||||
dragging = true;
|
||||
leftOffset = $(".labelN").offset().left;
|
||||
wrapWidth = $(".labelN").width();
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
cen.live('mousedown',function(){
|
||||
|
||||
flag = true;
|
||||
topOffset = $(".centerH").offset().top;
|
||||
wrapHeight = $(".centerH").height();
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
|
@ -40,9 +36,9 @@ $(function(){
|
|||
$("#game_left_contents").width( clickX-leftOffset + 'px');
|
||||
nextW2 = clickX-leftOffset;
|
||||
$("#game_right_contents").width( wrapWidth - nextW2 + 'px');
|
||||
//console.log(lab.next().width());
|
||||
} else {
|
||||
lab.css('left', '0px');
|
||||
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
|
|
@ -59,22 +55,19 @@ $(function(){
|
|||
var rows = parseInt(m / 18);
|
||||
$("#file_entry_content").find(".CodeMirror-scroll").css("min-height", h);
|
||||
$("#file_entry_content").find(".CodeMirror-scroll").css("max-height", h);
|
||||
|
||||
} else {
|
||||
cen.css('top', '0px');
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
doc.live("mouseup",function(e) {
|
||||
|
||||
doc.live("mouseup", function(e) {
|
||||
flag = false;
|
||||
dragging = false;
|
||||
e.cancelBubble = true;
|
||||
$(".-brother").hide(); // 代码行的遮罩隐藏
|
||||
|
||||
});
|
||||
|
||||
// end;
|
||||
//解決IE瀏覽器大小改變時webssh佈局變亂。
|
||||
window.onresize = function(){
|
||||
|
|
@ -93,17 +86,14 @@ $(function(){
|
|||
// 点击全部任务向右侧展开
|
||||
$("#all_task_show").on("click", function(e){
|
||||
c = 0;
|
||||
// if($("#all_task_index").css("left") == 0 +"px"){
|
||||
$("#all_task_tab").removeClass('leftnav-active');
|
||||
$("#all_task_show").css("background","rgba(0,0,0,0)");
|
||||
$("#all_task_index").css("left", 0).stop().animate({
|
||||
left: "-505px"
|
||||
}, 400, function(){
|
||||
$("#all_task_show").hide();
|
||||
fadein = 0;
|
||||
});
|
||||
// }
|
||||
|
||||
$("#all_task_tab").removeClass('leftnav-active');
|
||||
$("#all_task_show").css("background","rgba(0,0,0,0)");
|
||||
$("#all_task_index").css("left", 0).stop().animate({
|
||||
left: "-505px"
|
||||
}, 400, function(){
|
||||
$("#all_task_show").hide();
|
||||
fadein = 0;
|
||||
});
|
||||
});
|
||||
// end
|
||||
|
||||
|
|
@ -290,12 +280,12 @@ function game_praise(obj_id, obj_type){
|
|||
praiseStatus = true; //已赞
|
||||
praise_count.html(data.praise_tread_count);
|
||||
$("#game_praise_tread").children("i").addClass("color-light-green");
|
||||
$("#game_praise_tread").attr("data-tip-down", "取消点赞")
|
||||
$("#game_praise_tread").attr("title", "取消点赞")
|
||||
}else{
|
||||
praiseStatus = false; //取消赞
|
||||
praise_count.html(data.praise_tread_count);
|
||||
$("#game_praise_tread").children("i").removeClass("color-light-green");
|
||||
$("#game_praise_tread").attr("data-tip-down", "点赞")
|
||||
$("#game_praise_tread").attr("title", "点赞")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -316,12 +306,12 @@ function game_tread(obj_id){
|
|||
treadStatus = true; // 取消踩
|
||||
tread_count.html(data.praise_tread_count);
|
||||
$("#game_tread").children("i").addClass("color-orange");
|
||||
$("#game_tread").attr("data-tip-down", "取消踩")
|
||||
$("#game_tread").attr("title", "取消踩")
|
||||
}else{
|
||||
treadStatus = false; // 已踩
|
||||
tread_count.html(data.praise_tread_count);
|
||||
$("#game_tread").children("i").removeClass("color-orange");
|
||||
$("#game_tread").attr("data-tip-down", "踩");
|
||||
$("#game_tread").attr("title", "踩");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -386,7 +376,10 @@ function code_evaluation(test_sets,
|
|||
$b = "<div class=\"fit -scroll\">" +
|
||||
"<div class=\"-layout-v -fit\">" +
|
||||
"<div class=\"-flex -scroll task-padding16 loading-center undis\" id=\"html_ajax_loading\"></div>" +
|
||||
"<iframe frameborder=\"0\" name=\"i\" src=\"/iframes/html_content\" id=\"html_contents\" style='background: #fff;height: 100%;'>" +
|
||||
"<form id=\"html_form\" method=\"post\" target=\"myFrame\">" +
|
||||
"<input type=\"hidden\" name=\"contents\" id=\"data_param\" />" +
|
||||
"</form>" +
|
||||
"<iframe frameborder=\"0\" name=\"myFrame\" style='background: #fff;height: 100%;'>" +
|
||||
"</iframe>" +
|
||||
"</div>" +
|
||||
"</div>";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<style type="text/css">
|
||||
/*模拟实战---加载等待*/
|
||||
.loading_all{background:#ffffff;z-index: 100000;width: 100%;height: 100%;position: fixed;left: 0px;top:0px;text-align: center;}
|
||||
.loading_main img{border-radius: 4px;}
|
||||
.loading_main span{font-size: 44px;font-weight: bold;color: #ff7500;letter-spacing: 5px;margin-left: 5px;}
|
||||
.load{width: auto;top:50%;margin-top:-100px;position: relative;}
|
||||
.loading_seconde{color: #ff7500;letter-spacing: 3px;font-size: 16px;}
|
||||
</style>
|
||||
<div class="loading_all">
|
||||
<div class="load">
|
||||
<div class="loading_main"><img src="/images/../images/bigdata/bigdata-logo.png?1502328187" /><span>EDUCODER</span></div>
|
||||
<p class="loading_seconde">LOADING<img src="/images/../images/bigdata/shenglue-ring.gif" /></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -50,6 +50,7 @@ textarea{resize: none;}
|
|||
.color-orange04{color: #ee4a20!important;}/*温馨提示公用颜色*/
|
||||
.color-orange05{color: #FF9e6a!important;}
|
||||
a.color-orange05:hover,i.color-orange05:hover{color:#ff7500!important;}
|
||||
.color-orange06{color:#FF6610!important;}
|
||||
.color-yellow{color:#f0ad4e!important;}
|
||||
.color-yellow2{color:#ff9933!important;}
|
||||
|
||||
|
|
@ -97,10 +98,11 @@ a:hover.link-color-grey03{color:#3498db!important;}
|
|||
.mb5{ margin-bottom: 5px;}.mb10{ margin-bottom: 10px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px;}.mb40{ margin-bottom: 40px;}.mb50{ margin-bottom: 50px;}
|
||||
.ml-3{ margin-left: -3px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml50{ margin-left: 50px;}.ml75{ margin-left: 75px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml230{ margin-left: 230px;}
|
||||
.mr3{margin-right: 3px}.mr5{ margin-right: 5px;}.mr10{ margin-right: 10px;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr40{margin-right:40px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}
|
||||
.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}.pt30{ padding-top:30px;}
|
||||
.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}.pt30{ padding-top:30px;}.pt40{ padding-top:40px;}
|
||||
.pb5{ padding-bottom:5px;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb30{ padding-bottom:30px;}
|
||||
.pl5{ padding-left:5px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl30{ padding-left:30px;}.pl50{ padding-left:50px;}.pl35{ padding-left:35px;}
|
||||
.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}
|
||||
.pb40{ padding-bottom:40px;}
|
||||
.padding15{ padding:15px;}
|
||||
.h24{ height: 24px;}
|
||||
|
||||
|
|
@ -183,7 +185,7 @@ a.course-bth-blue{cursor: pointer;background-color:#199ed8 ;color: #ffffff !impo
|
|||
/*pre标签换行*/
|
||||
.break_word{word-break: break-all;word-wrap: break-word;}
|
||||
.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;}
|
||||
.pre_word{white-space: pre-wrap;word-wrap: break-word;}
|
||||
.pre_word{white-space: pre-wrap;word-wrap: break-word;word-break: normal;}
|
||||
.pr {position:relative;}
|
||||
.df {display:flex;}
|
||||
.w100{width: 100px;}
|
||||
|
|
@ -404,7 +406,7 @@ input::-ms-clear{display:none;}
|
|||
/*---------------边框-----------------*/
|
||||
.bor-gray-c{border:1px solid #ccc;}
|
||||
.bor-grey-e{border:1px solid #eee;}
|
||||
|
||||
.bor-grey01{border:1px solid #E6EAEB;}
|
||||
/*-------------------------tip样式-------------------------*/
|
||||
/*.-task-title{opacity:0;position:absolute;left:0;top:0;display:none;}*/
|
||||
/*.-task-desc-title{background:#000;color:#fff;box-shadow:0px 0px 8px #194a81;max-width:300px;word-wrap: break-word;text-align:center;border-radius:10px;padding:0 10px;}*/
|
||||
|
|
@ -438,13 +440,19 @@ input::-ms-clear{display:none;}
|
|||
|
||||
/*-------------------------圆角-------------------------*/
|
||||
.bor-radius-upper{border-radius: 4px 4px 0px 0px;}
|
||||
.bor-radius4{border-radius: 4px;}
|
||||
.bor-radius-all{border-radius: 50%;}
|
||||
|
||||
/*-------------------------旋转-------------------------*/
|
||||
.transform90{transform: rotate(90deg);}
|
||||
/*---------------------编辑器边框------------------------*/
|
||||
.kindeditor{background: #F0F0EE;height:22px;border:1px solid #CCCCCC;border-bottom: none}
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
/*两端对齐*/
|
||||
.justify{text-align: justify;}
|
||||
.justify{text-align: justify;}
|
||||
=======
|
||||
/**/
|
||||
#edu-tab-nav .edu-position-hidebox li a{font-size: 12px}
|
||||
>>>>>>> dev_xucheng
|
||||
|
|
|
|||
|
|
@ -283,6 +283,8 @@ a:hover.task-btn-line{ border:1px solid #3498db;background:#3498db;color: #fff;}
|
|||
/*阴影+边框*/
|
||||
.shadow_border{border:1px solid #eee;-webkit-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);box-shadow: 0 0 8px 0 rgba(142,142,142,.1);}
|
||||
.shadow_border_notop{border:1px solid #eee;-webkit-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);}
|
||||
.user_bg_shadow01{-webkit-box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);-moz-box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);}
|
||||
|
||||
|
||||
/*新增的公用样式*/
|
||||
.box-boxshadow{box-shadow: 3px 3px 10px rgba(146, 153, 169, 0.2);}
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@
|
|||
/*linear-gradient(to right, rgb(68, 190, 164) 0%, rgb(62, 158, 207) 100%)*/
|
||||
|
||||
.box_bg_shandow{box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);}
|
||||
.active-class .content .pre_sub-con{width:23.87%;margin: 0 1.5% 2.55% 0px;height: 269px;}
|
||||
.active-class .content .pre_sub-con:nth-child(4n+0){margin:0 0 2.55% 0;}
|
||||
.active-class .content .pre_sub-con{width:23.87%;margin: 0 1.5% 40px 0px;height: 298px;}
|
||||
.active-class .content .pre_sub-con:nth-child(4n+0){margin:0 0 40px 0;}
|
||||
.active-class .content .pre_sub-con:hover{cursor: pointer;-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1;}
|
||||
.pre-book{height: 100%;position:absolute;}
|
||||
.subject-box{padding: 20px;background: #fff;text-align: center;position: relative;}
|
||||
.unit-name{line-height: 17px;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;height: 32px; word-wrap: break-word;}
|
||||
.unit-name{line-height: 17px;height: 17px;width:196px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
||||
|
||||
.active-class .content .sub-con{width:23.69%;border:1px solid #eee;background:#fff;margin: 0 1.5% 1.5% 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);}
|
||||
.active-class .content .sub-con:nth-child(4n+0){margin:0 0 1.5% 0;}
|
||||
.active-class .content .sub-con{width:23.69%;border:1px solid #eee;background:#fff;margin: 0 1.5% 30px 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);}
|
||||
.active-class .content .sub-con:nth-child(4n+0){margin:0 0 30px 0;}
|
||||
.active-class .content .sub-con:hover{box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);cursor: pointer;-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1;}
|
||||
@-webkit-keyframes bounce-down {
|
||||
25% {margin-top:-10px;}
|
||||
|
|
@ -72,6 +72,7 @@ li.li-width7{width: 7%;text-align: left}
|
|||
.stage-name-label{width: 10%;text-align: center;line-height: 40px;}
|
||||
.add-sx{padding:0px 5px;width: 99%;height: 40px;line-height: 40px;border: 1px dashed #ffbfaa;display: inline-block;color: #cccccc;}
|
||||
.bewrite{width: 90%;margin-left: 10px;border-color: #eeeeee;padding: 5px;}
|
||||
.team-append:hover{background:#EFF9FD;cursor: pointer}
|
||||
|
||||
.box-border{border:1px solid #e1e1e1}
|
||||
.boxborder-dashed-orange{border: 1px dashed #ffbfaa;}
|
||||
|
|
|
|||
|
|
@ -229,6 +229,11 @@ input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f
|
|||
/*background: linear-gradient(to right, rgb(104, 177, 215) 0%, rgb(1,75,79) 100%);*/
|
||||
/*background: linear-gradient(to right,#5DDAE4,#23ADC9);*/
|
||||
.task-index-head-top{ padding:30px;background:#FCA24B;background: linear-gradient(to right, rgb(104, 177, 215) 0%, rgb(1,75,79) 100%);}
|
||||
|
||||
/*.task-index-head-top{ padding:30px;background:#FFA65E;}*/
|
||||
.top-xz{position: absolute;border:14px solid #FFFFFF;border-radius: 50%;box-shadow: 0px 2px 10px rgba(142,142,142,0.4);
|
||||
opacity: 0.4;}
|
||||
|
||||
.task-index-head-top-course{padding:30px;background:linear-gradient(to right, rgb(69, 191, 165) 0%, rgb(164, 175, 247) 100%);}
|
||||
/*linear-gradient(to right, rgb(69, 191, 165) 0%, rgb(164, 175, 247) 100%);*/
|
||||
.task-inde-head-title{ color:#fff; }
|
||||
|
|
@ -238,9 +243,9 @@ input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f
|
|||
.task-index-list{ width: 1200px;}
|
||||
|
||||
|
||||
.task-index-list-box{ width:23.69%;margin: 0 1.5% 1.5% 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; }
|
||||
.task-index-list-box{ width:23.69%;margin: 0 1.5% 30px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; }
|
||||
.task-index-list-box:hover{-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1; }
|
||||
.task-index-list-box:nth-child(4n+0) {margin: 0 0 1.5% 0;}
|
||||
.task-index-list-box:nth-child(4n+0) {margin: 0 0 30px 0;}
|
||||
.task-mg8{ margin:0 15px 15px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; }
|
||||
.task-index-list-box-top{padding:16px; padding-top:30px; background:#fff; text-align: center; position:relative; height: 160px;}
|
||||
.task-index-list-title{ max-width:80%; display: block; margin:10px auto 0px; font-size:14px; font-weight: bold;}
|
||||
|
|
@ -319,7 +324,7 @@ a.shixun-task-ban-btn{background-color: #c2c4c6;display: inline-block;font-weigh
|
|||
/* 实训首页的搜索 */
|
||||
.xy_box{padding:16px;height:180px}
|
||||
.task_yx_bo{margin: 0px auto 13px;}
|
||||
.course-nav-box{padding:0px 10px;margin:20px 0px}
|
||||
.course-nav-box{padding:0px 10px;margin:30px 0px}
|
||||
.xy_level{width: 80%;margin: 0px auto;border-top: 1px solid #eee;margin-top: 5px;line-height: 35px;}
|
||||
.course-nav-row{padding:7px 0px}
|
||||
.course-nav-row_item li{width:auto;height: 30px;line-height: 30px;margin: 5px;padding:0px 15px;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue