Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop
This commit is contained in:
commit
67d76ccd3a
|
|
@ -14,7 +14,7 @@ class ChallengesController < ApplicationController
|
|||
|
||||
def new
|
||||
# 顶部导航
|
||||
@st = params[:st]
|
||||
@st = params[:st].to_i
|
||||
@project_menu_type = 11
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base_shixun' }
|
||||
|
|
@ -29,17 +29,20 @@ class ChallengesController < ApplicationController
|
|||
@challenge.position = challenge_count + 1
|
||||
@challenge.shixun = @shixun
|
||||
@challenge.user = User.current
|
||||
# @challenge.st = params[:st]
|
||||
@challenge.st = params[:st].to_i
|
||||
if @challenge.save!
|
||||
# 创建选项
|
||||
# params[:question].each do |test|
|
||||
# ChallengeQuestion.where(:option_name => option_name,:challenges => challenge_id, :positon => 1, :right_key => true)
|
||||
# end
|
||||
if params[:st].to_i != 0
|
||||
#创建选项
|
||||
params[:question][:cnt].each_with_index do |test, index|
|
||||
answer = params[:choice][:answer][index] == "0" ? false : true
|
||||
ChallengeQuestion.create(:option_name => test, :challenge_id => @challenge.id, :position => index, :right_key => answer)
|
||||
end
|
||||
end
|
||||
end
|
||||
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun)
|
||||
rescue Exception => e
|
||||
flash[:error] = "#{e.message}"
|
||||
redirect_to new_shixun_challenge_path(:shixun_id => @shixun)
|
||||
redirect_to new_shixun_challenge_path(:shixun_id => @shixun, :st => params[:st].to_i)
|
||||
raise ActiveRecord::Rollback
|
||||
end
|
||||
end
|
||||
|
|
@ -103,6 +106,7 @@ class ChallengesController < ApplicationController
|
|||
end
|
||||
|
||||
def edit
|
||||
@st = @challenge.st
|
||||
challenge_num = Challenge.where(:shixun_id => @shixun).count
|
||||
challenge_pos = @challenge.position
|
||||
if challenge_pos < challenge_num
|
||||
|
|
@ -120,39 +124,25 @@ class ChallengesController < ApplicationController
|
|||
end
|
||||
|
||||
def update
|
||||
@challenge.update_attributes(params[:challenge])
|
||||
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
|
||||
=begin
|
||||
respond_to do |format|
|
||||
ActiveRecord::Base.transaction do
|
||||
@challenge.update_attributes(params[:challenge])
|
||||
begin
|
||||
@test_sets.delete_all unless @test_sets.blank?
|
||||
@challenge_tags.delete_all unless @challenge_tags.blank?
|
||||
if params[:test_set][:hidden].length > 0
|
||||
params[:test_set][:input].each_with_index do |input, index|
|
||||
unless (input[index] == params[:test_set][:output][index] && input[index].nil?)
|
||||
params[:test_set][:hidden][index].to_i == 0 ? open = 1 : open = 0
|
||||
TestSet.create(:challenge_id => @challenge.id, :input => input, :output => params[:test_set][:output][index], :is_public => open, :position => (index + 1))
|
||||
end
|
||||
if (params[:tab] == "1" || params[:tab].nil?) && @challenge.st != 0
|
||||
begin
|
||||
@challenge.challenge_questions.delete_all
|
||||
params[:question][:cnt].each_with_index do |test, index|
|
||||
answer = params[:choice][:answer][index] == "0" ? false : true
|
||||
ChallengeQuestion.create(:option_name => test, :challenge_id => @challenge.id, :position => index, :right_key => answer)
|
||||
end
|
||||
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
|
||||
rescue Exception => e
|
||||
flash[:error] = "#{e.message}"
|
||||
format.html{redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun)}
|
||||
raise ActiveRecord::Rollback
|
||||
end
|
||||
unless params[:knowledge].blank?
|
||||
params[:knowledge][:input].each do |input|
|
||||
ChallengeTag.create(:name => input, :challenge_id => @challenge.id)
|
||||
end
|
||||
end
|
||||
# 向jenkins端发送请求,构建公共测试用例
|
||||
add_shixun_modify_status(@shixun, 1)
|
||||
format.html {redirect_to shixun_challenge_path(@challenge, :shixun_id => @shixun), notice: '更新成功!'}
|
||||
rescue Exception => e
|
||||
flash[:error] = "#{e.message}"
|
||||
format.html{redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun)}
|
||||
raise ActiveRecord::Rollback
|
||||
else
|
||||
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
|
||||
end
|
||||
end
|
||||
end
|
||||
=end
|
||||
end
|
||||
|
||||
def update_evaluation
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class GamesController < ApplicationController
|
|||
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,
|
||||
:game_status, :change_status, :answer, :minus_score, :refresh_game_list, :reset_original_code, :reset_new_code]
|
||||
: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]
|
||||
before_filter :allowd_manager
|
||||
before_filter :allowd_view, :only => [:show]
|
||||
|
|
@ -26,6 +26,7 @@ class GamesController < ApplicationController
|
|||
# @praise 判断是否点赞
|
||||
# @tread 判断是否踩
|
||||
# git_repository_url @myshixun, "Myshixun"
|
||||
# @st 0 编程任务 1 多选任务 2 单选任务
|
||||
def show
|
||||
# 展示全部实训
|
||||
if @game.status == 1
|
||||
|
|
@ -38,12 +39,15 @@ class GamesController < ApplicationController
|
|||
@shixun = @myshixun.shixun
|
||||
# @games_count = @games.count
|
||||
@game_challenge = @game.challenge
|
||||
@st = @game_challenge.st
|
||||
@had_done = @game.had_done
|
||||
@praise = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?", @game_challenge.id, @game_challenge.class.to_s, User.current.id).first
|
||||
@tread = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?", @game_challenge.id, "ChallengeTread", User.current.id).first
|
||||
@rev = @rev.nil? ? "master" : @rev
|
||||
@type = params[:type]
|
||||
challenge_path = @game_challenge.path
|
||||
# 用户选项
|
||||
@user_answer = @game.outputs.first.actual_output.split("") unless @st == 0 || @game.outputs.blank?
|
||||
# 默认打开文件
|
||||
logger.info("repository id is #{@repository.try(:id)}, repository's shixun_id =#{@repository.try(:myshixun_id)} shixun_id =#{@repository.try(:shixun_id)}, project_id => #{@repository.try(:project_id)}")
|
||||
# 验证challenge文件名的合法性
|
||||
|
|
@ -262,6 +266,31 @@ class GamesController < ApplicationController
|
|||
had_done: had_done}
|
||||
end
|
||||
|
||||
# 选择题评测(选择题不需要重新评测)
|
||||
def evaluating_choice
|
||||
@game_challenge = @game.challenge
|
||||
user_answer = params[:answer]
|
||||
correct = true
|
||||
had_done = @game.had_done
|
||||
if !user_answer.blank?
|
||||
user_answer.split("").each do |answer|
|
||||
question = @game_challenge.challenge_questions.where(:position => answer.to_i).first
|
||||
unless question.right_key
|
||||
correct = false
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
correct = false
|
||||
end
|
||||
@game.update_attributes(:status => 2, :end_time => Time.now)
|
||||
if @game.outputs.blank?
|
||||
Output.create(:game_id => @game.id, :actual_output => user_answer, :result => correct)
|
||||
end
|
||||
render :json => {correct: correct, had_done: had_done}
|
||||
end
|
||||
|
||||
|
||||
def change_status
|
||||
@game.update_attribute(:status, 0)
|
||||
outputs = @game.outputs
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class MyshixunsController < ApplicationController
|
|||
jenkins_shixuns = Redmine::Configuration['jenkins_shixuns']
|
||||
uri = URI("#{jenkins_shixuns}/jenkins-exec/webssh/getConnectInfo")
|
||||
user_id = User.current.id
|
||||
params = {gameID:@myshixun.id}
|
||||
params = {gameID:@myshixun.id, operationEnvironment:@myshixun.shixun.try(:language)}
|
||||
res = uri_exec uri, params
|
||||
if res && res['code'].to_i != 0
|
||||
raise("实训云平台繁忙(繁忙等级:92)")
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ module ApplicationHelper
|
|||
|
||||
# 实训语言的种类
|
||||
def shixun_language
|
||||
["Java", "C", "C++", "Python", "MySQL/Java","JFinal","Docker","Ethoernet","Dynamips"]
|
||||
["Java", "C", "C++", "Python", "MySQL/Java","JFinal","Docker","Ethereum","Dynamips"]
|
||||
end
|
||||
|
||||
# 实训试用专业
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ class Challenge < ActiveRecord::Base
|
|||
has_many :test_sets, :dependent => :destroy
|
||||
has_many :challenge_tags, :dependent => :destroy
|
||||
has_many :games, :dependent => :destroy
|
||||
has_many :challenge_questions, :dependent => :destroy
|
||||
|
||||
validates_presence_of :subject
|
||||
# validates_presence_of :score
|
||||
|
|
@ -43,4 +44,15 @@ class Challenge < ActiveRecord::Base
|
|||
myshixun = Myshixun.where(:shixun_id => self.shixun.id, :user_id => User.current.id).first
|
||||
game = Game.where(:myshixun_id => myshixun.id, :challenge_id => self.id).first
|
||||
end
|
||||
|
||||
# 正确答案
|
||||
def right_answers
|
||||
answer = ""
|
||||
self.challenge_questions.each do |ans|
|
||||
if ans.right_key
|
||||
answer << (ans.position + 65).chr
|
||||
end
|
||||
end
|
||||
return answer
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
class ChallengeQuestion < ActiveRecord::Base
|
||||
attr_accessible :challenge_id, :option, :position, :right_key
|
||||
belongs_to :challenge
|
||||
attr_accessible :challenge_id, :option_name, :position, :right_key
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
class Output < ActiveRecord::Base
|
||||
# attr_accessible :title, :body
|
||||
# actual_output 编程题:实际输出, 选择题: 用户提交的答案(如: 014 对应用户选择为A B E)
|
||||
default_scope :order => 'test_set_position desc'
|
||||
belongs_to :game
|
||||
end
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
saveHTMLToTextarea : true,
|
||||
// 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标
|
||||
dialogMaskOpacity : 0.6,
|
||||
placeholder: "请输入完成当前任务依赖的知识点或者其它相关信息",
|
||||
placeholder: "<%= @st == 0 ? '' : "请输入各个选项的具体解析或其他相关信息" %>",
|
||||
imageUpload : true,
|
||||
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
|
||||
imageUploadURL : "<%= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>"//url
|
||||
|
|
|
|||
|
|
@ -5,23 +5,29 @@
|
|||
<span class="btn-cir btn-cir-grey ml10 mt12 fl"><%= @challenges.count %></span>
|
||||
<% end %>
|
||||
<% if User.current.manager_of_shixun?(@shixun) && @shixun.status == 0 %>
|
||||
<!-- <a href="<%#= new_shixun_challenge_path(@shixun, :st => 2) %>" class="shixun-task-btn task-btn-green fr mt5">+单选任务</a>
|
||||
<a href="<%#= new_shixun_challenge_path(@shixun, :st => 1) %>" class="shixun-task-btn task-btn-green fr mr10 mt5">+多选任务</a>
|
||||
<a href="<%#= new_shixun_challenge_path(@shixun, :st => 0) %>" class="shixun-task-btn task-btn-green fr mr10 mt5">+编程任务</a>-->
|
||||
<a href="<%= new_shixun_challenge_path(@shixun, :st => 0) %>" class="shixun-task-btn task-btn-green fr mr5" style="margin: 5px 0;">新建阶段</a>
|
||||
<a href="<%= new_shixun_challenge_path(@shixun, :st => 2) %>" class="shixun-task-btn task-btn-green fr mt5">+单选任务</a>
|
||||
<a href="<%= new_shixun_challenge_path(@shixun, :st => 1) %>" class="shixun-task-btn task-btn-green fr mr10 mt5">+多选任务</a>
|
||||
<a href="<%= new_shixun_challenge_path(@shixun, :st => 0) %>" class="shixun-task-btn task-btn-green fr mr10 mt5">+编程任务</a>
|
||||
<!--<a href="<%#= new_shixun_challenge_path(@shixun, :st => 0) %>" class="shixun-task-btn task-btn-green fr mr5" style="margin: 5px 0;">新建阶段</a>-->
|
||||
<% end %> </div>
|
||||
<div class="panel-list shixun-panel-list">
|
||||
<% @challenges.each_with_index do |challenge, index| -%>
|
||||
<div class="clearfix shixun-panel-inner" id="shixun_index_<%= index %>">
|
||||
<h4 class="fl panel-inner-title">
|
||||
<!--<span class="panel-inner-icon mr10 fl mt5"><i class="fa fa-code font-16 color_white"></i></span>
|
||||
<span class="panel-inner-icon mr10 fl mt5"><i class="fa fa-th-list color_white"></i></span>
|
||||
<span class="panel-inner-icon mr10 fl mt5"><img src="/images/bigdata/singel.png" style="margin-bottom: 3px"></span>-->
|
||||
<i class="fa fa-dot-circle-o font-18 color-green mr10"></i>
|
||||
<span class="panel-inner-icon mr10 fl mt5">
|
||||
<% if challenge.st == 0 %>
|
||||
<i class="fa fa-code font-16 color_white" title="编程任务"></i>
|
||||
<% elsif challenge.st == 1 %>
|
||||
<i class="fa fa-th-list color_white" title="多选任务"></i>
|
||||
<% elsif challenge.st == 2 %>
|
||||
<img src="/images/bigdata/singel.png" style="margin-bottom: 3px" title="单选任务">
|
||||
<% end%>
|
||||
</span>
|
||||
<!-- <i class="fa fa-dot-circle-o font-18 color-green mr10"></i>-->
|
||||
<span class="color-black mr10">第<%= challenge.position %>关</span>
|
||||
<%#= link_to challenge.subject, shixun_challenge_path(@shixun.id, challenge), :target => "_blank" %>
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<%= link_to challenge.subject, shixun_challenge_path(@shixun, challenge), :target => "_blank" %>
|
||||
<%= link_to challenge.subject, edit_shixun_challenge_path(challenge, :shixun_id => @shixun), :target => "_blank" %>
|
||||
<% else %>
|
||||
<% if allow_to_view_challenge(challenge, @shixun) %>
|
||||
<%= link_to challenge.subject, myshixun_game_path(challenge.current_user_game, :myshixun_id => challenge.current_user_game.try(:myshixun)), :target => "_blank" %>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div id="edit_answer_show">
|
||||
<div class="clearfix mb20">
|
||||
<p class="fr">
|
||||
<% if @shixun.status == 0 && User.current.manager_of_shixun?(@shixun) %>
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 3, :editor => 3) %>" class="shixun-task-btn task-btn-green fr">编辑</a>
|
||||
<% end %>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
<div class="panel-form">
|
||||
<% if @editor.blank? && !@challenge.ready_knowledge.blank? %>
|
||||
<div id="edit_answer_show">
|
||||
<div class="clearfix mb20">
|
||||
<p class="fr">
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 6, :editor => 6) %>" class="shixun-task-btn task-btn-green fr">编辑</a>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"> 预备知识:</label>
|
||||
<div class="fl task-bg-grey panel-box-sizing panel-form-width-690 new_li" id="challenge_editorMd_propaedeutics" style="width: 90%">
|
||||
<textarea style="display:none;"><%= @challenge.ready_knowledge.blank? ? "无" : (@challenge.ready_knowledge) %></textarea>
|
||||
</div>
|
||||
<!-- <div class="fl task-bg-grey panel-box-sizing panel-form-width-690 new_li" id="tpm_answer_show" style="width: 90%">
|
||||
<textarea style="display:none;"><%#= @challenge.answer.blank? ? "无" : (@challenge.answer) %></textarea>
|
||||
</div>-->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @challenge.ready_knowledge.blank? || !@editor.blank? %>
|
||||
<ul class="" id="answer_edit">
|
||||
<%= labelled_form_for @challenge, :url => shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 6), :html => {:id => "challenge_shixun_propaedeutics"} do |f| %>
|
||||
<%= render :partial => "propaedeutics_form", :locals => {:f => f} %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
editormd.loadKaTeX(function() {
|
||||
var answerMD = editormd.markdownToHTML("challenge_editorMd_propaedeutics", {
|
||||
htmlDecode: "style,script,iframe", // you can filter tags decode
|
||||
taskList: true,
|
||||
tex: true, // 默认不解析
|
||||
flowChart: true, // 默认不解析
|
||||
sequenceDiagram: true // 默认不解析
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<div id="scroe_show" class="<%= @challenge.score.blank? ? "undis" : "" %>">
|
||||
<div class="clearfix mb20">
|
||||
<p class="fr">
|
||||
<% if @shixun.status == 0 && User.current.manager_of_shixun?(@shixun) %>
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<a href="javascript:void(0);" class="shixun-task-btn task-btn-green fr" id="edit_score">编辑</a>
|
||||
<% end %>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div id="edit_skill_show" class="<%= @challenge_tags.blank? ? "undis" : "" %>">
|
||||
<div class="clearfix mb20">
|
||||
<p class="fr">
|
||||
<% if @shixun.status == 0 && User.current.manager_of_shixun?(@shixun) %>
|
||||
<% 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>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div id="task_pass_show">
|
||||
<div class="clearfix mb20">
|
||||
<p class="fr">
|
||||
<% if @shixun.status == 0 && User.current.manager_of_shixun?(@shixun) %>
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :editor => 1) %>" class="shixun-task-btn task-btn-green fr">编辑</a>
|
||||
<% end %>
|
||||
</p>
|
||||
|
|
@ -23,6 +23,31 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% if @challenge.st == 1 %>
|
||||
<ul id="select_more">
|
||||
<% @challenge.challenge_questions.each_with_index do |question, index| %>
|
||||
<li class="clearfix mb10">
|
||||
<label class="panel-form-label fl"><span class="mr10"><%= (question.position+ 65).chr %>.</span></label>
|
||||
<div class="fl panel-box-sizing panel-form-width-690 <%= question.right_key ? 'background-blue color_white' : 'task-bg-grey' %>">
|
||||
<!--<input type="checkbox" name="select_more[]" value="" class="ml-3 mr5 magic-checkbox" >-->
|
||||
<label><%= question.option_name %></label>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% elsif @challenge.st == 2 %>
|
||||
<ul id="select_single">
|
||||
<% @challenge.challenge_questions.each_with_index do |question, index| %>
|
||||
<li class="clearfix mb10">
|
||||
<label class="panel-form-label fl"><span class="mr10"><%= (question.position+ 65).chr %>.</span></label>
|
||||
<div class="fl panel-box-sizing panel-form-width-690 <%= question.right_key ? 'background-blue color_white' : 'task-bg-grey' %>">
|
||||
<!--<input name="select_single[]" value="" type="radio" class="ml-3 mr5 magic-radio" >-->
|
||||
<label><%= question.option_name %></label>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @challenge.subject.blank? || !@editor.blank? %>
|
||||
<ul class="" id="task_pass_edit">
|
||||
|
|
@ -31,42 +56,8 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
|
||||
<!--显示单项多项-->
|
||||
<!--<ul id="select_more">-->
|
||||
<!--<li class="clearfix mb10">-->
|
||||
<!--<label class="panel-form-label fl"><span class="mr10">A.</span></label>-->
|
||||
<!--<div class="fl task-bg-grey panel-box-sizing panel-form-width-690">-->
|
||||
<!--<input type="checkbox" name="select_more[]" value="" id="select_more_0" class="ml-3 mr5 magic-checkbox">-->
|
||||
<!--<label for="select_more_0" style="top:0px">网络层</label>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb10">-->
|
||||
<!--<label class="panel-form-label fl"><span class="mr10">B.</span></label>-->
|
||||
<!--<div class="fl task-bg-grey panel-box-sizing panel-form-width-690">-->
|
||||
<!--<input type="checkbox" name="select_more[]" value="" id="select_more_1" class="ml-3 mr5 magic-checkbox">-->
|
||||
<!--<label for="select_more_1" style="top:0px">网络层</label>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--<ul id="select_single">-->
|
||||
<!--<li class="clearfix mb10">-->
|
||||
<!--<label class="panel-form-label fl"><span class="mr10">A.</span></label>-->
|
||||
<!--<div class="fl task-bg-grey panel-box-sizing panel-form-width-690">-->
|
||||
<!--<input name="select_single[]" value="" type="radio" id="select_single_0" class="ml-3 mr5 magic-radio">-->
|
||||
<!--<label for="select_single_0" style="top:0px">网络层</label>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb10">-->
|
||||
<!--<label class="panel-form-label fl"><span class="mr10">B.</span></label>-->
|
||||
<!--<div class="fl task-bg-grey panel-box-sizing panel-form-width-690">-->
|
||||
<!--<input name="select_single[]" value="" type="radio" id="select_single_1" class="ml-3 mr5 magic-radio">-->
|
||||
<!--<label for="select_single_1" style="top:0px">网络层</label>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
</div>
|
||||
|
||||
<%# if @challenge.st == 1 %>
|
||||
|
||||
<%# end %>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
<%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min.css' %>
|
||||
<%= javascript_include_tag '/editormd/editormd.min.js','/editormd/examples/js/jquery.min.js' %>
|
||||
<style>
|
||||
.CodeMirror-scroll{
|
||||
overflow: auto !important;
|
||||
margin-bottom: -30px;
|
||||
margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
<div id="shixun_form">
|
||||
<li class="clearfix" style="line-height:1.9;">
|
||||
<label class="panel-form-label fl"> 预备知识:</label>
|
||||
<div id="shixuns_propaedeutics" class="new_li fl" style="margin-bottom: 0px">
|
||||
<textarea name="challenge[ready_knowledge]"><%= @challenge.ready_knowledge %></textarea>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-green fr" onclick="$('#challenge_shixun_propaedeutics').submit();">保存</a>
|
||||
<% if@challenge.ready_knowledge %>
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 6) %>" class="task-btn fr mr10" id="answer_cancel">取消</a>
|
||||
<% end %>
|
||||
</li>
|
||||
</div>
|
||||
<script>
|
||||
propaedeutics_editormd = editormd("shixuns_propaedeutics", {
|
||||
width : "89.6%",
|
||||
height : 600,
|
||||
syncScrolling : "single",
|
||||
//你的lib目录的路径,我这边用JSP做测试的
|
||||
path : "/editormd/lib/",
|
||||
tex : true,
|
||||
autoFocus: false,
|
||||
toolbarIcons : function() {
|
||||
// Or return editormd.toolbarModes[name]; // full, simple, mini
|
||||
// Using "||" set icons align right.
|
||||
return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear" ]
|
||||
},
|
||||
toolbarCustomIcons : {
|
||||
testIcon : "<a type=\"inline\" class=\"latex\" ><div class='zbg'></div></a>",
|
||||
testIcon1 : "<a type=\"latex\" class=\"latex\" ><div class='zbg_latex'></div></a>"
|
||||
},
|
||||
//这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。
|
||||
saveHTMLToTextarea : true,
|
||||
// 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标
|
||||
dialogMaskOpacity : 0.6,
|
||||
placeholder: "请输入完成当前任务依赖的知识点或者其它相关信息",
|
||||
imageUpload : true,
|
||||
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
|
||||
imageUploadURL : "<%= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>"//url
|
||||
});
|
||||
window.onload = function(){
|
||||
$("#shixuns_propaedeutics [type=\"latex\"]").bind("click", function(){
|
||||
propaedeutics_editormd.cm.replaceSelection("```latex");
|
||||
propaedeutics_editormd.cm.replaceSelection("\n");
|
||||
propaedeutics_editormd.cm.replaceSelection("\n");
|
||||
propaedeutics_editormd.cm.replaceSelection("```");
|
||||
var __Cursor = propaedeutics_editormd.cm.getDoc().getCursor();
|
||||
propaedeutics_editormd.cm.setCursor(__Cursor.line-1, 0);
|
||||
});
|
||||
|
||||
$("#shixuns_propaedeutics [type=\"inline\"]").bind("click", function(){
|
||||
propaedeutics_editormd.cm.replaceSelection("$$$$");
|
||||
var __Cursor = propaedeutics_editormd.cm.getDoc().getCursor();
|
||||
propaedeutics_editormd.cm.setCursor(__Cursor.line, __Cursor.ch-2);
|
||||
propaedeutics_editormd.cm.focus();
|
||||
});
|
||||
$("[type=\"inline\"]").attr("title", "行内公式");
|
||||
$("[type=\"latex\"]").attr("title", "多行公式");
|
||||
|
||||
};
|
||||
/* $("#answer_cancel").click(function(){
|
||||
$("#answer_edit").hide();
|
||||
$("#edit_answer_show").show();
|
||||
})*/
|
||||
</script>
|
||||
|
|
@ -29,8 +29,13 @@
|
|||
|
||||
<div class="prop-notice-info mb10 ml95">
|
||||
<ol>
|
||||
<li>如果学员查看了参考答案,则不能得到相应的经验值</li>
|
||||
<li>如果学员成功得到经验值,那么将同时获得等值的金币奖励,如:+100经验值、+100金币</li>
|
||||
<% if @st == 0 %>
|
||||
<li>如果学员查看了参考答案,则不能得到相应的经验值</li>
|
||||
<li>如果学员成功得到经验值,那么将同时获得等值的金币奖励,如:+100经验值、+100金币</li>
|
||||
<% else %>
|
||||
<li>如果学员答题错误,则不能得到相应的经验值</li>
|
||||
<li>如果学员成功得到经验值,那么将同时获得等值的金币奖励,如:+10经验值、+10金币</li>
|
||||
<% end %>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
|
@ -44,40 +49,41 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
// 根据难易程度设置不同的奖励经验值(适用新建与编辑模式)
|
||||
var list= $('input:radio[name="challenge[difficulty]"]:checked').val(); // 获取select的索引值
|
||||
var list = $('input:radio[name="challenge[difficulty]"]:checked').val(); // 获取select的索引值
|
||||
var index = parseInt(<%= @st == 0 ? 1 : 10 %>); // 单选 与 多选分数系数
|
||||
if(list == 1){
|
||||
$("#challenge_score").empty();
|
||||
for(var i= 100; i <= 200; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i + ">"+ i +"</option>");
|
||||
for(var i = 100; i <= 200; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i/index + ">"+ i/index +"</option>");
|
||||
}
|
||||
}else if(list == 2){
|
||||
$("#challenge_score").empty();
|
||||
for(var i= 300; i <= 600; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i + ">"+ i +"</option>");
|
||||
for(var i = 300; i <= 600; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i/index + ">"+ i/index +"</option>");
|
||||
}
|
||||
}else if(list == 3){
|
||||
$("#challenge_score").empty();
|
||||
for(var i= 700; i <= 1000; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i + ">"+ i +"</option>");
|
||||
$("#challenge_score").append("<option value="+ i/index + ">"+ i/index +"</option>");
|
||||
}
|
||||
}
|
||||
$("#challenge_score").find("option[value='<%= @challenge.score %>']").attr("selected",true); // 设置option默认值
|
||||
$("#challenge_difficulty_1").click(function(){
|
||||
$("#challenge_score").empty();
|
||||
for(var i= 100; i <= 200; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i + ">"+ i +"</option>");
|
||||
for(var i = 100; i <= 200; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i/index + ">"+ i/index +"</option>");
|
||||
}
|
||||
});
|
||||
$("#challenge_difficulty_2").click(function(){
|
||||
$("#challenge_score").empty();
|
||||
for(var i= 300; i <= 600; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i + ">"+ i +"</option>");
|
||||
for(var i = 300; i <= 600; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i/index + ">"+ i/index +"</option>");
|
||||
}
|
||||
});
|
||||
$("#challenge_difficulty_3").click(function(){
|
||||
$("#challenge_score").empty();
|
||||
for(var i= 700; i <= 1000; i += 100){
|
||||
$("#challenge_score").append("<option value="+ i + ">"+ i +"</option>");
|
||||
$("#challenge_score").append("<option value="+ i/index + ">"+ i/index +"</option>");
|
||||
}
|
||||
})
|
||||
function challenge_score_update(){
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@
|
|||
</style>
|
||||
<script id="t:set-option-list" type="text/html">
|
||||
<li class="clearfix pr">
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice" onclick="selectchoice(this);" name="option_span">A</span></label>
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="option_inputs_label" placeholder="请输入选项内容"></textarea>
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice" onclick="selectchoice(this, <%= @st %>);" name="option_span" title="点击设置答案">A</span></label>
|
||||
<input type="hidden" name="choice[answer][]">
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="question[cnt][]" placeholder="请输入选项内容"></textarea>
|
||||
<a title="移除" class="position-delete option_icon_remove"><i class="fa fa-times-circle color-orange font-16 fl"></i></a>
|
||||
</li>
|
||||
</script>
|
||||
|
|
@ -31,16 +32,66 @@
|
|||
</div>
|
||||
<span style="display: none" class="c_red ml95" id="new_shixun_pass">过关任务不能为空</span>
|
||||
</li>
|
||||
|
||||
<!--<ul>
|
||||
<li class="clearfix mb10" >
|
||||
<label class="panel-form-label fl"><span class="add-option-item fr mr10 color-grey" name="option_span">A</span></label>
|
||||
<div class="fl panel-box-sizing add-option-input"><a title="新增" class="option_icon_add">新增选项</a></div>
|
||||
</li>
|
||||
<li class="clearfix" ><label class="fl" style="margin-left: 46px">温馨提示:点击选项,可以直接设置答案</label><label class="fr">标准答案:<span id="current-option" class="color-orange">请点击正确选项</span></label></li>
|
||||
</ul>-->
|
||||
<% if @st != 0 %>
|
||||
<% if params[:action] == "edit" && @challenge.challenge_questions.count > 0 %>
|
||||
<% @challenge.challenge_questions.each_with_index do |question, index| %>
|
||||
<li class="clearfix pr">
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice <%= question.right_key ? "check-option-bg" : "" %>" onclick="selectchoice(this, <%= @st %>);" name="option_span" title="点击设置答案"><%= (question.position+ 65).chr %></span></label>
|
||||
<input type="hidden" name="choice[answer][]">
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="question[cnt][]" placeholder="请输入选项内容"><%= question.option_name %></textarea>
|
||||
<a title="移除" class="position-delete option_icon_remove"><i class="fa fa-times-circle color-orange font-16 fl"></i></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% elsif @st == 2 %>
|
||||
<li class="clearfix pr">
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice" onclick="selectchoice(this, <%= @st %>);" name="option_span" title="点击设置答案">A</span></label>
|
||||
<input type="hidden" name="choice[answer][]">
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="question[cnt][]" placeholder="请输入选项内容"></textarea>
|
||||
<a title="移除" class="position-delete option_icon_remove"><i class="fa fa-times-circle color-orange font-16 fl"></i></a>
|
||||
</li>
|
||||
<li class="clearfix pr">
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice" onclick="selectchoice(this, <%= @st %>);" name="option_span" title="点击设置答案">B</span></label>
|
||||
<input type="hidden" name="choice[answer][]">
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="question[cnt][]" placeholder="请输入选项内容"></textarea>
|
||||
<a title="移除" class="position-delete option_icon_remove"><i class="fa fa-times-circle color-orange font-16 fl"></i></a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="clearfix pr">
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice" onclick="selectchoice(this, <%= @st %>);" name="option_span" title="点击设置答案">A</span></label>
|
||||
<input type="hidden" name="choice[answer][]">
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="question[cnt][]" placeholder="请输入选项内容"></textarea>
|
||||
<a title="移除" class="position-delete option_icon_remove"><i class="fa fa-times-circle color-orange font-16 fl"></i></a>
|
||||
</li>
|
||||
<li class="clearfix pr">
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice" onclick="selectchoice(this, <%= @st %>);" name="option_span" title="点击设置答案">B</span></label>
|
||||
<input type="hidden" name="choice[answer][]">
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="question[cnt][]" placeholder="请输入选项内容"></textarea>
|
||||
<a title="移除" class="position-delete option_icon_remove"><i class="fa fa-times-circle color-orange font-16 fl"></i></a>
|
||||
</li>
|
||||
<li class="clearfix pr">
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice" onclick="selectchoice(this, <%= @st %>);" name="option_span" title="点击设置答案">C</span></label>
|
||||
<input type="hidden" name="choice[answer][]">
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="question[cnt][]" placeholder="请输入选项内容"></textarea>
|
||||
<a title="移除" class="position-delete option_icon_remove"><i class="fa fa-times-circle color-orange font-16 fl"></i></a>
|
||||
</li>
|
||||
<li class="clearfix pr">
|
||||
<label class="panel-form-label fl"><span class="option-item fr mr10 color-grey select-choice" onclick="selectchoice(this, <%= @st %>);" name="option_span" title="点击设置答案">D</span></label>
|
||||
<input type="hidden" name="choice[answer][]">
|
||||
<textarea class="panel-form-width2-690 fl panel-box-sizing" name="question[cnt][]" placeholder="请输入选项内容"></textarea>
|
||||
<a title="移除" class="position-delete option_icon_remove"><i class="fa fa-times-circle color-orange font-16 fl"></i></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<ul>
|
||||
<li class="clearfix mb10" >
|
||||
<label class="panel-form-label fl"><span class="add-option-item fr mr10 color-grey border-dash-orange" name="option_span"><%= params[:action] == "edit" ? (@challenge.challenge_questions.count + 65).chr : (@st == 1 ? "E" : "C") %></span></label>
|
||||
<div class="fl panel-box-sizing add-option-input border-dash-orange"><a title="新增" class="option_icon_add">新增选项</a></div>
|
||||
</li>
|
||||
<span style="display: none" class="c_red ml95" id="choice_error_tip"></span>
|
||||
<li class="clearfix" ><label class="fl" style="margin-left: 46px">温馨提示:点击选项,可以直接设置答案</label><label class="fr">标准答案:<span id="current-option" class="color-orange"><%= @challenge.right_answers.blank? ? "请点击正确选项" : @challenge.right_answers %></span></label></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-green fr" onclick="challenge_update()">保存</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-green fr" onclick="challenge_update(<%= @st %>)">保存</a>
|
||||
<% if params[:action] == "new" %>
|
||||
<a href="<%= shixun_challenges_url(@shixun) %>" class="task-btn fr mr10" id="task_pass_cancel">取消</a>
|
||||
<% else %>
|
||||
|
|
@ -72,7 +123,7 @@
|
|||
saveHTMLToTextarea : true,
|
||||
// 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标
|
||||
dialogMaskOpacity : 0.6,
|
||||
placeholder: "请输入完成当前任务依赖的知识点或者其它相关信息",
|
||||
placeholder: "<%= @st == 0 ? "请输入完成当前任务依赖的知识点或者其它相关信息" : "请输入选择题的题干内容" %>",
|
||||
imageUpload : true,
|
||||
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
|
||||
imageUploadURL : "<%= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>"//url
|
||||
|
|
@ -85,7 +136,7 @@
|
|||
$("#shixun_form").on('click', 'a.option_icon_add', function () {
|
||||
var html = bt('t:set-option-list', null);
|
||||
$(this).parent().parent('.clearfix').before(html);
|
||||
var inputs = document.getElementsByName("option_inputs_label");
|
||||
var inputs = document.getElementsByName("question[cnt][]");
|
||||
var inputs_spans = document.getElementsByName("option_span");
|
||||
for (var j = 0; j < inputs_spans.length; j++) {
|
||||
if(j >= 0 && j <= 26){
|
||||
|
|
@ -107,15 +158,23 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
$("#current-option").html("");
|
||||
if($(".check-option-bg").length>0){
|
||||
for(var i=0;i<$(".check-option-bg").length;i++){
|
||||
$("#current-option").html($("#current-option").html()+$(".check-option-bg").eq(i).html());
|
||||
}
|
||||
}else{
|
||||
$("#current-option").html("请点击正确选项");
|
||||
}
|
||||
});
|
||||
});
|
||||
//设置选项答案
|
||||
function selectchoice(item){
|
||||
function selectchoice(item, st){
|
||||
//判断是否选中,如果选中,再次点击的时候取消选中
|
||||
if($(item).hasClass('check-option-bg')){
|
||||
$(item).removeClass('check-option-bg');
|
||||
}else{
|
||||
if(true){
|
||||
if(st == 2){
|
||||
//单选
|
||||
$(".select-choice").removeClass('check-option-bg');
|
||||
$(item).addClass('check-option-bg');
|
||||
|
|
@ -133,6 +192,52 @@
|
|||
$("#current-option").html("请点击正确选项");
|
||||
}
|
||||
}
|
||||
// 判断选择题的答案
|
||||
function set_choice_answer(){
|
||||
var answer = document.getElementsByName("choice[answer][]");
|
||||
var choice = document.getElementsByName("option_span");
|
||||
for(var o = 0; o < choice.length; o++){
|
||||
if($(choice[o]).hasClass("check-option-bg")){
|
||||
$(answer[o]).val(String.fromCharCode(65 + o));
|
||||
}else{
|
||||
$(answer[o]).val(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 判断选择题内容是否为空
|
||||
function judge_choice_contents(){
|
||||
var answer = document.getElementsByName("choice[answer][]");
|
||||
var contents = document.getElementsByName("question[cnt][]");
|
||||
var lens = contents.length;
|
||||
for(var i = 0; i < lens; i++){
|
||||
if($(contents[i]).val().trim() == ""){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 判断选择题选择答案的个数
|
||||
function judge_choice_answer(){
|
||||
var answer = document.getElementsByName("choice[answer][]");
|
||||
var lens = answer.length;
|
||||
var num = 0;
|
||||
for(var i= 0; i < lens; i++){
|
||||
if($(answer[i]).val() != "0"){
|
||||
num += 1;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// 选择题选项的个数
|
||||
function choice_num(){
|
||||
var answer = document.getElementsByName("choice[answer][]");
|
||||
var lens = answer.length;
|
||||
return lens;
|
||||
}
|
||||
|
||||
window.onload = function(){
|
||||
$("#challenge_task_pass [type=\"latex\"]").bind("click", function(){
|
||||
taskpass_editormd.cm.replaceSelection("```latex");
|
||||
|
|
@ -164,15 +269,41 @@
|
|||
$("#task_pass_show").show();
|
||||
$("#task_pass_edit").hide();
|
||||
});
|
||||
function challenge_update(){
|
||||
function challenge_update(st){
|
||||
set_choice_answer();
|
||||
var error = $("#choice_error_tip");
|
||||
if($('#challenge_subject').val().trim() == ""){
|
||||
$("#challenge_subject").focus();
|
||||
$("#new_shixun_name").show();
|
||||
}else if($("#challenge_task_pass textarea").val().trim() == ""){
|
||||
$("#challenge_task_pass textarea").focus();
|
||||
$("#new_shixun_pass").show();
|
||||
}else if(judge_choice_contents()){
|
||||
error.html("选项不能为空").show();
|
||||
}else{
|
||||
$('#challenge_shixun_update').submit();
|
||||
if(st == "2"){
|
||||
if(judge_choice_contents()) {
|
||||
error.html("选项内容不能为空").show();
|
||||
}else if(choice_num() < 2){
|
||||
error.html("单选题选项不能少于2个").show();
|
||||
}else if(judge_choice_answer() == 0){
|
||||
error.html("请设置答案").show();
|
||||
}else{
|
||||
$('#challenge_shixun_update').submit();
|
||||
}
|
||||
}else if(st == "1"){
|
||||
if(judge_choice_contents()) {
|
||||
error.html("选项内容不能为空").show();
|
||||
}else if(choice_num() < 3){
|
||||
error.html("多选题选项不能少于3个").show();
|
||||
}else if(judge_choice_answer() < 2){
|
||||
error.html("答案不能少于2个").show();
|
||||
}else{
|
||||
$('#challenge_shixun_update').submit();
|
||||
}
|
||||
}else{
|
||||
$('#challenge_shixun_update').submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,13 +17,29 @@
|
|||
|
||||
<div class="task-pm-content mb20">
|
||||
<div class="task-pm-box mt20">
|
||||
<div class="panel-header clearfix user_bg_shadow">
|
||||
<div class="panel-header clearfix user_bg_shadow" style="height: 40px;border-bottom:0px;padding:10px 15px 0px 15px;">
|
||||
<% if @st == 0 %>
|
||||
<span class="panel-inner-icon mr10 fl mt5">
|
||||
<i class="fa fa-code font-16 color_white" title="编程任务"></i>
|
||||
</span>
|
||||
<% elsif @st == 1 %>
|
||||
<span class="panel-inner-icon mr10 fl mt5">
|
||||
<i class="fa fa-th-list color_white" title="多选任务"></i>
|
||||
</span>
|
||||
<% elsif @st == 2%>
|
||||
<span class="panel-inner-icon mr10 fl mt5">
|
||||
<img src="/images/bigdata/singel.png" style="margin-bottom: 3px" title="单选任务">
|
||||
</span>
|
||||
<% end %>
|
||||
<h3 class="fl mt3">阶段详情(第<%= @challenge.position %>关)</h3>
|
||||
<% unless @next_challenge.blank? %>
|
||||
<a href="<%= edit_shixun_challenge_path(@next_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>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -31,14 +47,17 @@
|
|||
<li class="fl <%= @tab == 1 ? "check_nav" : "" %>">
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 1) %>" class="color-black">本关任务</a>
|
||||
</li>
|
||||
<%# if @challenge.st == 0 %>
|
||||
<% if @challenge.st == 0 %>
|
||||
<li class="fl <%= @tab == 2 ? "check_nav" : "" %>">
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 2) %>" class="color-black">评测设置</a>
|
||||
</li>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
<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" : "" %>">
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 6) %>" class="color-black">预备知识</a>
|
||||
</li>
|
||||
<li class="fl <%= @tab == 4 ? "check_nav" : "" %>">
|
||||
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 4) %>" class="color-black">评分设置</a>
|
||||
</li>
|
||||
|
|
@ -57,6 +76,8 @@
|
|||
<%= render :partial => "edit_scoring" %>
|
||||
<% elsif @tab == 5 %>
|
||||
<%= render :partial => "edit_skill" %>
|
||||
<% elsif @tab == 6 %>
|
||||
<%= render :partial => "edit_propaedeutics" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@
|
|||
<a href="<%= shixun_challenge_path(@shixun, @next_challenge) %>" 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 => 2) %>" 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 => 0) %>" class="shixun-task-btn task-btn-green fr mr10">+编程任务</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="panel-form ">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
<div class="-layout -stretch -fit -vertical centerH">
|
||||
<div class="split-panel--second -layout -vertical -flex -relative -bg-black -flex-basic40" id="answer">
|
||||
<ul id="blacktab_nav">
|
||||
<li id="codetab_nav_1" class="blacktab_hover" onclick="HoverLi_new(1);">
|
||||
<a href="javascript:void(0);" class="tab_type tab_color" >答题选项</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div id="codotab_con_1">
|
||||
<div class="panel-header clearfix" id="top_repository" style="border-bottom:0">
|
||||
<p class="mb10 color-light-green font-16 <%= @game.outputs.blank? || !@game.outputs.first.result ? "undis" : "" %>" id="correct_tip">
|
||||
<i class="fa fa-check-circle font-16"></i> 正确
|
||||
</p>
|
||||
<p class="mb10 color-red font-16 <%= @game.outputs.blank? || @game.outputs.first.result ? "undis" : "" %>" id="error_tip">
|
||||
<i class="fa fa-exclamation-circle font-16"></i> 错误
|
||||
</p>
|
||||
<% @game_challenge.challenge_questions.each_with_index do |question, i| %>
|
||||
<div class="card quiz-task-options -elevation-1 mb20 color_white <%= (@user_answer.nil? || @user_answer.index(i.to_s).nil?) ? "" : "card-check" %>" onclick="choice_answer('<%= @st %>', this)">
|
||||
<input type="hidden" name="answer" value="<%= question.position %>">
|
||||
<div class="-layout-h -center">
|
||||
<span class="mr10"><%= (question.position + 65).chr %>.</span>
|
||||
<div class="markdown">
|
||||
<p><code class="font-16"><%= question.option_name %></code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<h3 id="save_status" class="ml15 fl" style="font-weight: normal"></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function choice_answer(st, nThis){
|
||||
if(st == "1"){
|
||||
//$(nThis).hasClass("card-check") ? $(nThis).removeClass("card-check") : $(nThis).addClass("card-check");
|
||||
$(nThis).toggleClass("card-check");
|
||||
} else if (st == "2"){
|
||||
var choice = $(".color_white");
|
||||
choice.removeClass("card-check");
|
||||
$(nThis).addClass("card-check");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,9 +1,15 @@
|
|||
<span class="mt10 -flex c_grey ml15" id="time-consuming"></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>
|
||||
<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>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="code_test">
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-blue mr15 mt8" onclick="training_task_submmit();">评测</a>
|
||||
<% if @st == 0 %>
|
||||
<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 %>
|
||||
</div>
|
||||
<div id="code_estimate">
|
||||
<% if @game.status == 1 %>
|
||||
|
|
@ -11,11 +17,11 @@
|
|||
<% elsif @game.status == 2 %>
|
||||
<% 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 %>
|
||||
: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) %>" class="shixun-task-btn task-btn-blue mt8 mr15">退出实训</a>
|
||||
|
|
@ -23,13 +29,13 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<script>
|
||||
/* -------------- 点击加载上次通过的代码----------------*/
|
||||
$("#task_popup_confirm").live("click", function(){
|
||||
$("#coding_area").hide();
|
||||
$("#coding_ajax_loading").css("display", "flex");
|
||||
});
|
||||
/* -------------- 点击加载上次通过的代码----------------*/
|
||||
$("#task_popup_confirm").live("click", function(){
|
||||
$("#coding_area").hide();
|
||||
$("#coding_ajax_loading").css("display", "flex");
|
||||
});
|
||||
|
||||
/* ------------------耗时------------------------- */
|
||||
/* ------------------耗时------------------------- */
|
||||
var cTime = 1; // 时间累加参数
|
||||
var cm = setInterval(setTime, 1000);
|
||||
function setTime(){
|
||||
|
|
@ -37,14 +43,14 @@
|
|||
var endTime = 0; // 结束时间
|
||||
var consumeTime = 0; // 耗时
|
||||
<% if @game.status == 2 %>
|
||||
startTime = (new Date("<%= consume_time(@game.open_time) %>")).getTime();
|
||||
endTime = (new Date("<%= consume_time(@game.end_time) %>")).getTime();
|
||||
consumeTime = parseInt(endTime - startTime);
|
||||
startTime = (new Date("<%= consume_time(@game.open_time) %>")).getTime();
|
||||
endTime = (new Date("<%= consume_time(@game.end_time) %>")).getTime();
|
||||
consumeTime = parseInt(endTime - startTime);
|
||||
<% else %>
|
||||
startTime = (new Date("<%= consume_time(@game.open_time) %>")).getTime();
|
||||
endTime = (new Date("<%= consume_time(Time.now) %>")).getTime();
|
||||
consumeTime = parseInt(endTime - startTime) + cTime * 1000;
|
||||
cTime++;
|
||||
startTime = (new Date("<%= consume_time(@game.open_time) %>")).getTime();
|
||||
endTime = (new Date("<%= consume_time(Time.now) %>")).getTime();
|
||||
consumeTime = parseInt(endTime - startTime) + cTime * 1000;
|
||||
cTime++;
|
||||
<% end %>
|
||||
formatDuring(consumeTime);
|
||||
}
|
||||
|
|
@ -57,14 +63,55 @@
|
|||
$("#time-consuming").html("耗时:" + days + " 天 " + hours + " 小时 " + minutes + " 分钟 " + seconds + " 秒 ");
|
||||
}
|
||||
|
||||
/* -----------------下一关增加loading效果--------------------- */
|
||||
/* -----------------下一关增加loading效果--------------------- */
|
||||
$("#next_step").live("click", function(){
|
||||
nNext = $("#code_estimate");
|
||||
html = "<a href='javascript:void(0);' class='task-btn mr15 mt8'>下一关<img src='/images/bigdata/loading2.svg' style='width:25px;float:left;margin-top: 3px' /></a>";
|
||||
nNext.html(html);
|
||||
});
|
||||
|
||||
/* ----------------- 评测 -------------------- */
|
||||
// 选择题提交评测
|
||||
// answer 选择的答案
|
||||
function choice_submmit(){
|
||||
var answer = "";
|
||||
var nBtn = $(".card-check");
|
||||
var choice = nBtn.find("input[name='answer']");
|
||||
for(var i = 0; i < choice.length; i++){
|
||||
answer += $(choice[i]).val();
|
||||
}
|
||||
$("#code_test").html("<a class='task-btn mt8 mr15'>评测中..</a>");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: '<%= evaluating_choice_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
data: {answer: answer},
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
console.log(data);
|
||||
$("#code_test").remove();
|
||||
if(data.correct){
|
||||
$("#correct_tip").show();
|
||||
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);
|
||||
}else{
|
||||
$("#error_tip").show();
|
||||
$("#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>");
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
alert("错了");
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/* ----------------- 评测 -------------------- */
|
||||
function training_task_submmit(){
|
||||
// 加载页面
|
||||
nEvalContent = $("#evaluating_contents");
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
<%= javascript_include_tag 'baiduTemplate', 'jquery.datetimepicker.js' %>
|
||||
<% end %>
|
||||
<ul id="blacktab_nav">
|
||||
<li id="blacktab_nav_1" class="blacktab_hover" onclick="HoverLi(1);">
|
||||
<li class="blacktab_con blacktab_hover" onclick="check_tab('blacktab_con','blacktab_hover',this);">
|
||||
<a href="javascript:void(0);" class="tab_type tab_color">测试结果</a>
|
||||
</li>
|
||||
<li id="blacktab_nav_2" onclick="HoverLi(2);">
|
||||
<li class="blacktab_con" onclick="check_tab('blacktab_con','blacktab_hover',this);">
|
||||
<a href="javascript:void(0);" class="tab_type tab_color" >评测信息</a>
|
||||
</li>
|
||||
<a href="javascript:void(0);" onclick="valuation_extend_and_zoom();" id="valuation_extend_and_zoom"><i class="fa fa-expand font-16 color-grey fr mt10 mr15" ></i></a>
|
||||
|
|
@ -97,6 +97,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
|
@ -141,11 +142,26 @@
|
|||
}
|
||||
function g_new(o){return document.getElementById(o);}
|
||||
function HoverLi(n){
|
||||
for(var i=1;i<=2;i++){
|
||||
for(var i=1;i<=3;i++){
|
||||
g_new('blacktab_nav_'+i).className='blacktab_nomal';
|
||||
g_new('blacktab_con_'+i).className='undis';
|
||||
}
|
||||
g_new('blacktab_con_'+n).className='dis';
|
||||
g_new('blacktab_nav_'+n).className='blacktab_hover';
|
||||
}
|
||||
|
||||
/*allClassName---------------同一块tab共有的类名(同时对应的显示块ID要等于类名加上"_"在加上块的位置)
|
||||
* addClassName---------------点击tab需要添加的样式类
|
||||
* item-----------------------点击的当前tab元素
|
||||
* */
|
||||
function check_tab(allClassName,addClassName,item){
|
||||
//点击tab添加样式
|
||||
$("."+allClassName).removeClass(addClassName);
|
||||
$(item).addClass(addClassName);
|
||||
//获取当前点击的tab的索引位置
|
||||
var index=$(item).index()+1;
|
||||
//显示或隐藏对应的内容块
|
||||
$("#"+allClassName+"_"+index).siblings().addClass("undis");
|
||||
$("#"+allClassName+"_"+index).removeClass("undis");
|
||||
}
|
||||
</script>
|
||||
|
|
@ -19,9 +19,11 @@
|
|||
<li id="tab_nav_2" onclick="HoverLi1(2);">
|
||||
<a href="javascript:void(0);" class="tab_type" style="font-size: 16px">预备知识</a>
|
||||
</li>
|
||||
<li id="tab_nav_3">
|
||||
<a href="javascript:void(0);" class="tab_type" style="font-size: 16px">参考答案</a>
|
||||
</li>
|
||||
<% unless @game_challenge.answer.blank? %>
|
||||
<li id="tab_nav_3">
|
||||
<a href="javascript:void(0);" class="tab_type" style="font-size: 16px">参考答案</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<li id="tab_nav_4">
|
||||
<%= link_to '评论', shixun_discuss_shixun_path(@shixun), :class => "tab_type", :style => "font-size: 16px", :remote => true %>
|
||||
</li>
|
||||
|
|
@ -42,7 +44,7 @@
|
|||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll task-padding16 panel-box-sizing new_li read_only" unselectable="on" id="game_ready_knowledge">
|
||||
<textarea style="display:none;"><%= @shixun.propaedeutics %></textarea>
|
||||
<textarea style="display:none;"><%= @game_challenge.ready_knowledge %></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -61,8 +63,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="-layout-h -center -padding-h-16 -horizontal -footer-left">
|
||||
<ul class="-layout -task-ml80 pr">
|
||||
<div class="-layout-h -center -padding-h-16 -horizontal -footer-left pr">
|
||||
<ul class="-layout -task-ml80">
|
||||
<%= render :partial => "games/shixun_comment_block" %>
|
||||
<li class="comment_position" style="right: 70px"><a href="javascript:void(0);" onclick="send_dis_to_shixun()" class="course-bth-blue color_white">发送</a></li>
|
||||
<li title="<%= @praise.nil? ? "点赞" : "取消点赞" %>" onclick="game_praise()" id="game_praise_tread" class="comment_position pt5" style="right: 40px">
|
||||
|
|
@ -85,19 +87,25 @@
|
|||
<div class="-layout-v -flex">
|
||||
<div class="-flex -relative">
|
||||
<div class="split-panel -fit -vertical">
|
||||
<div class="-layout -stretch -fit -vertical centerH">
|
||||
<div class="-layout -vertical -flex -relative -bg-black -flex-basic70" id="games_repository_contents" style="overflow:hidden;">
|
||||
<%= render :partial => 'games/repository' %>
|
||||
</div>
|
||||
<!--拖拽增加结构---------------------------------------->
|
||||
<div class="h-center">
|
||||
<div class="-changebg -bg-black" id="-bg-change-color"></div>
|
||||
</div>
|
||||
<!------------------------------------------------------>
|
||||
<div class="split-panel--second -layout -vertical -flex -relative -bg-black -flex-basic40" id="games_valuation_contents">
|
||||
<%= render :partial => 'games/game_results' %>
|
||||
</div>
|
||||
</div>
|
||||
<% if @st != 0 %>
|
||||
<!-- 单选多选题 -->
|
||||
<%= render :partial => "games/choice_question" %>
|
||||
<% else %>
|
||||
<!-- 编程题 -->
|
||||
<div class="-layout -stretch -fit -vertical centerH">
|
||||
<div class="-layout -vertical -flex -relative -bg-black -flex-basic70" id="games_repository_contents" style="overflow:hidden;">
|
||||
<%= render :partial => 'games/repository' %>
|
||||
</div>
|
||||
<!--拖拽增加结构---------------------------------------->
|
||||
<div class="h-center">
|
||||
<div class="-changebg -bg-black" id="-bg-change-color"></div>
|
||||
</div>
|
||||
<!------------------------------------------------------>
|
||||
<div class="split-panel--second -layout -vertical -flex -relative -bg-black -flex-basic60" id="games_valuation_contents">
|
||||
<%= render :partial => 'games/game_results' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<!--按钮的操作-->
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@
|
|||
|
||||
}
|
||||
if(n==2){
|
||||
$("#games_repository_contents").removeClass("-bg-black -flex-basic70").addClass("-bg-weightblack -flex-basic60");
|
||||
$("#games_repository_contents").removeClass("-bg-black ").addClass("-bg-weightblack ");
|
||||
$("#-bg-change-color").removeClass("-bg-black").addClass("-bg-weightblack");
|
||||
}else{
|
||||
$("#games_repository_contents").removeClass("-bg-weightblack -flex-basic60").addClass("-bg-black -flex-basic70");
|
||||
$("#games_repository_contents").removeClass("-bg-weightblack ").addClass("-bg-black ");
|
||||
$("#-bg-change-color").removeClass("-bg-weightblack").addClass("-bg-black");
|
||||
}
|
||||
g_l('codotab_con_'+n).className='dis -relative';
|
||||
|
|
|
|||
|
|
@ -7,19 +7,19 @@
|
|||
<% else %>
|
||||
<% @discusses.each do |dis| %>
|
||||
<div class="comments_item_content comment_item_bottom clearfix mt5" onmouseover="$('#discuss_opr_<%= dis.id %>').show();$('#child_discuss_opr_<%= dis.id %>').show();" onmouseout="$('#discuss_opr_<%= dis.id %>').hide();$('#child_discuss_opr_<%= dis.id %>').hide();">
|
||||
<%= link_to image_tag(url_to_avatar(dis.user), :alt => "头像", :width => 60, :height => 60), user_path(dis.user), :target => '_blank' %>
|
||||
<div class="fr comment_item_one">
|
||||
<p class="clearfix pl8">
|
||||
<%= link_to image_tag(url_to_avatar(dis.user), :alt => "头像", :width => 60, :height => 60), user_path(dis.user),:class => "fl mt5", :target => '_blank' %>
|
||||
<div class="fl comment_item_one ml10">
|
||||
<p class="clearfix">
|
||||
<%= link_to dis.user.show_name, user_path(dis.user), :class => "fl link-color-grey" %>
|
||||
<span class="fr color-grey font-12 color_Purple_grey" style="padding-top: 2px;" id="dis_praise_<%= dis.id %>">
|
||||
<%= render :partial => "discusses/dis_praise", :locals => {:discuss => dis} %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="pl8"><%= dis.content %></p>
|
||||
<p class="pl8 fl">
|
||||
<p><%= dis.content %></p>
|
||||
<p class="fl">
|
||||
<span class="fl color-grey"><%= time_from_now dis.created_at %></span>
|
||||
</p>
|
||||
<p class="pl8 fr none" id="discuss_opr_<%= dis.id %>">
|
||||
<p class="fr none" id="discuss_opr_<%= dis.id %>">
|
||||
<% if User.current.manager_of_shixun?(@shixun) && dis.children.count == 0 %>
|
||||
<a href="javascript:void(0);" onclick="reply_to_dis('<%= dis.id %>', '<%= dis.user.show_name %>')" class="fr ml10 font-12 link-color-green">回复</a>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<% not_allow_select = edit_mode && @homework.student_works.has_committed.count != 0 %>
|
||||
|
||||
<div class="edu-con-top">
|
||||
<div class="edu-con-top user_bg_shadow">
|
||||
<p class="ml15 color-grey"><%= edit_mode ? '编辑' : '新建' %>分组作业</p>
|
||||
</div>
|
||||
<div class="alert alert-red mt15 none" id="new_homework_notice">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="edu-con-top">
|
||||
<div class="edu-con-top user_bg_shadow">
|
||||
<p class="ml15 color-grey"><%= edit_mode ? '编辑' : '新建' %>编程作业</p>
|
||||
</div>
|
||||
<div class="alert alert-red mt15 none" id="new_homework_notice">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
<% if homework_commons.count != 0 %>
|
||||
<% homework_commons.each_with_index do |homework_common, index|%>
|
||||
<div class="clearfix edu-class-con-list">
|
||||
<div class="clearfix edu-class-con-list pr">
|
||||
<% unless homework_common.is_public %>
|
||||
<div id="homework_public_<%= homework_common.id %>" >
|
||||
<i class="fa fa-lock color-grey" style="position: absolute;left: 5px;top:23px"></i>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="fl ml15 task-form-90 ">
|
||||
<% homework_curr_status = homework_curr_time(homework_common) %>
|
||||
<%= link_to homework_common.name.to_s, student_work_index_path(:homework => homework_common.id,:host=> Setting.host_course), :class => "edu-class-inner-list fl"%>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="edu-con-top">
|
||||
<div class="edu-con-top user_bg_shadow">
|
||||
<p class="ml15 color-grey"><%= edit_mode ? '编辑' : '新建' %>普通作业</p>
|
||||
</div>
|
||||
<div class="alert alert-red mt15 none" id="new_homework_notice">
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="edu-con-bg01 mt15" style="padding:30px 0;">
|
||||
<div class="edu-con-bg01 mt15 user_bg_shadow" style="padding:30px 0;">
|
||||
<div class="ml30 mr30">
|
||||
<div class="">
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<%= render :partial => 'homework_search_form', :locals => {:course => @course} %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="homework_index_list">
|
||||
<div id="homework_index_list" class="mh400">
|
||||
<%= render :partial => 'homework_common/homework_index_list', :locals => {:homework_commons => @homeworks,:course_id => @course.id} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
hideModal();
|
||||
$("#set_homework_public_<%= @homework.id %>").remove();
|
||||
$("#set_homework_public_<%= @homework.id %>").remove();
|
||||
$("#homework_public_<%= @homework.id %>").remove();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="task-header-nav">
|
||||
<ul class="task-header-navs clearfix">
|
||||
<li><a href="<%= shixun_challenges_url(@shixun) %>" class="<%= params[:action] == "index" ? "active" : "" %>" >实训</a></li>
|
||||
<li><a href="<%= propaedeutics_shixun_path(@shixun) %>" class="<%= params[:action] == "propaedeutics" ? "active" : "" %>" >预备知识</a></li>
|
||||
<!--<li><a href="<%#= propaedeutics_shixun_path(@shixun) %>" class="<%#= params[:action] == "propaedeutics" ? "active" : "" %>" >预备知识</a></li>-->
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<li>
|
||||
<%= link_to l(:project_module_repository),
|
||||
|
|
|
|||
|
|
@ -28,15 +28,15 @@
|
|||
<p id="e_tip_in" style="margin-left: 10%" class="c_grey"></p>
|
||||
<p id="e_tips_in" style="margin-left: 10%" class="c_grey"></p>
|
||||
</li>
|
||||
<li class="clearfix mb15">
|
||||
<!-- <li class="clearfix mb15">
|
||||
<label class="panel-form-label fl">预备知识 </label>
|
||||
<div id="shixun_propaedeutics" class="new_li fl" style="margin-left: 0px;">
|
||||
<textarea name="shixun[propaedeutics]"><%= @shixun.propaedeutics %></textarea>
|
||||
<textarea name="shixun[propaedeutics]"><%#= @shixun.propaedeutics %></textarea>
|
||||
</div>
|
||||
<p id="e_tip_pr" style="margin-left: 10%" class="c_grey"></p>
|
||||
<p id="e_tips_pr" style="margin-left: 10%" class="c_grey"></p>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</li>-->
|
||||
<li class="clearfix mb15">
|
||||
<label class="panel-form-label fl"><span class="color-orange mr5">*</span>适用专业 </label>
|
||||
<%= select_tag :major_id, options_for_select(shixun_major_option, 0), :id => 'shixun_major', :class => "fl task-form-30 task-height-40"%>
|
||||
|
|
@ -72,6 +72,92 @@
|
|||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
// 实训简介自动保存
|
||||
md_elocalStorage(shixun_editormd, "shixun_in_<%= User.current.id %>","in");
|
||||
//md_elocalStorage(shixun_propaedeutics,"shixun_pr_<%#= User.current.id %>","pr");
|
||||
//$("textarea[name='shixun[description]']").md_elocalStorage();
|
||||
|
||||
// 防止刷新页面后适用课程的下拉列表为空
|
||||
$("#shixun_major").val("0");
|
||||
$(".lesson_content").val("");
|
||||
|
||||
//多选适用课程
|
||||
$("body").click(function(event){
|
||||
$(".lesson_checkbox").hide();
|
||||
$(".lesson_checkbox").attr("showul","0");
|
||||
event.stopPropagation();
|
||||
});
|
||||
$(".lesson").click(function(event){
|
||||
if($("#shixun_major").val() == "0") {
|
||||
$("#shixun_major_course_notice").html("请先选择适用专业").show();
|
||||
} else{
|
||||
var showul=$(this).find("ul").attr("showul");
|
||||
if(showul=="0"){
|
||||
$(this).find("ul").show();
|
||||
$(this).find("ul").attr("showul","1");
|
||||
if($(this).find("ul input").length>5){
|
||||
$(this).find("ul").css("overflow-y","scroll");
|
||||
}
|
||||
event.stopPropagation();
|
||||
}else{
|
||||
$(this).find("ul").hide();
|
||||
$(this).find("ul").attr("showul","0");
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(".lesson_checkbox").on('click', 'label', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
$(".lesson_checkbox").on('click', 'input',function(event) {
|
||||
if ($(this).is(':checked')) {
|
||||
if ($(".lesson_content").val() == "") {
|
||||
$(".lesson_content").val($(this).attr("data-val"));
|
||||
} else {
|
||||
$(".lesson_content").val($(".lesson_content").val() + "," + $(this).attr("data-val"));
|
||||
}
|
||||
$("#shixun_major_course_notice").hide();
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
var valueCon = $(".lesson_content").val().split(",");
|
||||
var list = [];
|
||||
for (var i = 0; i < valueCon.length; i++) {
|
||||
if (valueCon[i] != $(this).attr("data-val")) {
|
||||
list.push(valueCon[i]);
|
||||
}
|
||||
}
|
||||
$(".lesson_content").val(list);
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#shixun_major").on("change", function(){
|
||||
if($("#shixun_major").val() != "0"){
|
||||
$.ajax({
|
||||
url: '/shixuns/shixun_courses',
|
||||
type: 'get',
|
||||
data: {major_id:$("#shixun_major").val()},
|
||||
success: function(data){
|
||||
if (data.result == 1){
|
||||
$(".lesson_content").val("");
|
||||
$(".lesson_checkbox").html("");
|
||||
for(var i=0; i<data.options.length; i++){
|
||||
$(".lesson_checkbox").append('<li><input type="checkbox" name="course_id[]" data-val="'+ data.options[i][0] +'" value="'+ data.options[i][1] +'" id="join_course_role_'+ i +'" class="ml-3 mr5 magic-checkbox"><label for="join_course_role_'+ i +'">'+ data.options[i][0] +'</label></li>');
|
||||
}
|
||||
$("#shixun_major_notice").hide();
|
||||
}
|
||||
else{
|
||||
$(".lesson_content").val("");
|
||||
$(".lesson_checkbox").html("");
|
||||
}
|
||||
}
|
||||
});
|
||||
} else{
|
||||
$(".lesson_content").val("");
|
||||
$(".lesson_checkbox").html("");
|
||||
}
|
||||
});
|
||||
/* ------------------------------- 简介md ------------------------------*/
|
||||
var shixun_editormd = editormd("shixun_introduction", {
|
||||
width : "89.7%",
|
||||
|
|
@ -102,7 +188,7 @@
|
|||
});
|
||||
|
||||
/* --------------------------------- 预备知识 -------------------------------------- */
|
||||
var shixun_propaedeutics = editormd("shixun_propaedeutics", {
|
||||
/* var shixun_propaedeutics = editormd("shixun_propaedeutics", {
|
||||
width : "89.7%",
|
||||
height : 300,
|
||||
syncScrolling : "single",
|
||||
|
|
@ -126,8 +212,8 @@
|
|||
placeholder: "请输入完成当前任务依赖的知识点或者其它相关信息",
|
||||
imageUpload : true,
|
||||
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
|
||||
imageUploadURL : "<%= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>" //url
|
||||
});
|
||||
imageUploadURL : "<%#= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>" //url
|
||||
});*/
|
||||
//////////////////////////////////////////////////////////////
|
||||
//提交新建项目
|
||||
function submit_new_project()
|
||||
|
|
@ -176,91 +262,6 @@
|
|||
$("[type=\"latex\"]").attr("title", "多行公式");
|
||||
|
||||
};
|
||||
$(function(){
|
||||
md_elocalStorage(shixun_editormd,"shixun_in_<%= User.current.id %>","in");
|
||||
md_elocalStorage(shixun_propaedeutics,"shixun_pr_<%= User.current.id %>","pr");
|
||||
//$("textarea[name='shixun[description]']").md_elocalStorage();
|
||||
|
||||
// 防止刷新页面后适用课程的下拉列表为空
|
||||
$("#shixun_major").val("0");
|
||||
$(".lesson_content").val("");
|
||||
|
||||
//多选适用课程
|
||||
$("body").click(function(event){
|
||||
$(".lesson_checkbox").hide();
|
||||
$(".lesson_checkbox").attr("showul","0");
|
||||
event.stopPropagation();
|
||||
});
|
||||
$(".lesson").click(function(event){
|
||||
if($("#shixun_major").val() == "0") {
|
||||
$("#shixun_major_course_notice").html("请先选择适用专业").show();
|
||||
} else{
|
||||
var showul=$(this).find("ul").attr("showul");
|
||||
if(showul=="0"){
|
||||
$(this).find("ul").show();
|
||||
$(this).find("ul").attr("showul","1");
|
||||
if($(this).find("ul input").length>5){
|
||||
$(this).find("ul").css("overflow-y","scroll");
|
||||
}
|
||||
event.stopPropagation();
|
||||
}else{
|
||||
$(this).find("ul").hide();
|
||||
$(this).find("ul").attr("showul","0");
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(".lesson_checkbox").on('click', 'label', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
$(".lesson_checkbox").on('click', 'input',function(event) {
|
||||
if ($(this).is(':checked')) {
|
||||
if ($(".lesson_content").val() == "") {
|
||||
$(".lesson_content").val($(this).attr("data-val"));
|
||||
} else {
|
||||
$(".lesson_content").val($(".lesson_content").val() + "," + $(this).attr("data-val"));
|
||||
}
|
||||
$("#shixun_major_course_notice").hide();
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
var valueCon = $(".lesson_content").val().split(",");
|
||||
var list = [];
|
||||
for (var i = 0; i < valueCon.length; i++) {
|
||||
if (valueCon[i] != $(this).attr("data-val")) {
|
||||
list.push(valueCon[i]);
|
||||
}
|
||||
}
|
||||
$(".lesson_content").val(list);
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#shixun_major").on("change", function(){
|
||||
if($("#shixun_major").val() != "0"){
|
||||
$.ajax({
|
||||
url: '/shixuns/shixun_courses',
|
||||
type: 'get',
|
||||
data: {major_id:$("#shixun_major").val()},
|
||||
success: function(data){
|
||||
if (data.result == 1){
|
||||
$(".lesson_content").val("");
|
||||
$(".lesson_checkbox").html("");
|
||||
for(var i=0; i<data.options.length; i++){
|
||||
$(".lesson_checkbox").append('<li><input type="checkbox" name="course_id[]" data-val="'+ data.options[i][0] +'" value="'+ data.options[i][1] +'" id="join_course_role_'+ i +'" class="ml-3 mr5 magic-checkbox"><label for="join_course_role_'+ i +'">'+ data.options[i][0] +'</label></li>');
|
||||
}
|
||||
$("#shixun_major_notice").hide();
|
||||
}
|
||||
else{
|
||||
$(".lesson_content").val("");
|
||||
$(".lesson_checkbox").html("");
|
||||
}
|
||||
}
|
||||
});
|
||||
} else{
|
||||
$(".lesson_content").val("");
|
||||
$(".lesson_checkbox").html("");
|
||||
}
|
||||
});
|
||||
|
||||
function md_rec_data(k,mdu,id){
|
||||
if(window.sessionStorage.getItem(k+mdu) !== null){
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<ul class="nav_check_item clearfix">
|
||||
<li class="fl <%= @order == 'created_at' ? 'check_nav' : "" %>">
|
||||
<%= link_to "最新", search_shixuns_path(:order => "created_at", :shixun_status => @shixun_status, :status => @status, :language => @language, :search => @search, :trainee => @trainee, :major =>@major, :course => @course, :sort => @sort), :remote => true %>
|
||||
|
|
@ -33,9 +34,9 @@
|
|||
<p class="xy_level"><%= shixun.shixun_trainee %></p>
|
||||
</div>
|
||||
<ul class="task-index-list-box-bottom clearfix">
|
||||
<li><i class="fa fa-tasks 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>
|
||||
<li><i class="fa fa-tasks color-light-green mr5 btn" data-tip="实训任务"></i><span><%= shixun.challenges.count %></span></li>
|
||||
<li><i class="fa fa-users color-light-green mr5 btn" data-tip="已开启实训"></i><span><%= shixun.myshixuns.count %></span></li>
|
||||
<li><i class="fa fa-viacoin color-light-green mr5 btn" data-tip="实训经验值"></i><span><%= shixun.shixun_score %></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
@ -51,6 +52,32 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
var $desc = $("<div class=\"-task-desc-title\"></div>"+"<div class=\"-title-directing\">"+"<i class=\"fa fa-sort-up\"></i>"+"</div>").appendTo("body");
|
||||
var $desc1 = $(".-task-desc-title");
|
||||
var $desc2 = $(".-title-directing");
|
||||
$(".task-index-list-box-bottom li i").hover(function(){
|
||||
var $tool = $(this).attr("data-tip");
|
||||
$desc1.html($tool);
|
||||
$desc1.css({
|
||||
left:$(this).offset().left -($desc1.width()-$(this).width())/2 - 10 ,
|
||||
opacity:0.7,
|
||||
top:$(this).offset().top+20
|
||||
});
|
||||
$desc2.css({
|
||||
left:$(this).offset().left -($desc2.width()-$(this).width())/2 ,
|
||||
opacity:0.7,
|
||||
top:$(this).offset().top+7
|
||||
});
|
||||
},function(){
|
||||
$desc1.css({
|
||||
opacity:0
|
||||
});
|
||||
$desc2.css({
|
||||
opacity:0
|
||||
})
|
||||
});
|
||||
});
|
||||
var timer="";
|
||||
$(".task-index-list-box").hover(function(ev){
|
||||
this.fn = function(){
|
||||
|
|
|
|||
|
|
@ -63,6 +63,22 @@
|
|||
<input type="radio" class="undis" name="language" id="language_Mysql" value="Mysql/Java">
|
||||
<label for="language_Mysql">Mysql/Java</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" class="undis" name="language" id="language_JFinal" value="JFinal">
|
||||
<label for="language_JFinal">JFinal</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" class="undis" name="language" id="language_Docker" value="Docker">
|
||||
<label for="language_Docker">Docker</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" class="undis" name="language" id="language_Ethoernet" value="Ethoernet">
|
||||
<label for="language_Ethoernet">Ethoernet</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" class="undis" name="language" id="language_Dynamips" value="Dynamips">
|
||||
<label for="language_Dynamips">Dynamips</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<p class="mb10">
|
||||
<i class="fa fa-map-marker mr5 color-grey" ></i>
|
||||
<%= link_to @course.name, course_path(@course) %> > <%= link_to '作业列表', homework_common_index_path(:course => @course, :homework_type => @homework.homework_type) %> > #<%= link_to (get_hw_index(@homework, @is_teacher, @homework.homework_type) + 1), student_work_index_path(:homework => @homework.id) %></p>
|
||||
<div class="edu-con-top clearfix mb15">
|
||||
<div class="edu-con-top clearfix mb15 user_bg_shadow">
|
||||
<p class="ml15 fl color-grey"><i class="fa fa-lock mr5" ></i><%= @homework.name %></p>
|
||||
<%= link_to '返回', homework_common_index_path(:course => @homework.course_id, :homework_type => @homework.homework_type), :class => 'fr font-12 mr15 mt3 link-color-grey' %>
|
||||
</div>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
:id => @work.id
|
||||
}) do |f| %>
|
||||
<% if @homework.homework_type != 2 %>
|
||||
<div class="edu-con-bg01" style="padding:30px 0;">
|
||||
<div class="edu-con-bg01 user_bg_shadow" style="padding:30px 0;">
|
||||
<div class="ml30 mr30">
|
||||
<div class="">
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<p class="mb10">
|
||||
<i class="fa fa-map-marker mr5 color-grey" ></i>
|
||||
<%= link_to @course.name, course_path(@course) %> > <%= link_to '作业列表', homework_common_index_path(:course => @course, :homework_type => @homework.homework_type) %> > #<%= link_to (get_hw_index(@homework, @is_teacher, @homework.homework_type) + 1), student_work_index_path(:homework => @homework.id) %></p>
|
||||
<div class="edu-con-top clearfix mb15">
|
||||
<div class="edu-con-top clearfix mb15 user_bg_shadow">
|
||||
<p class="ml15 fl color-grey"><i class="fa fa-lock mr5" ></i><%= @homework.name %></p>
|
||||
<%= link_to '返回', homework_common_index_path(:course => @homework.course_id, :homework_type => @homework.homework_type), :class => 'fr font-12 mr15 mt3 link-color-grey' %>
|
||||
</div>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<% if @homework.homework_type == 2 %>
|
||||
<%= render :partial => 'new_pro_student_work', :locals => {:student_work => @student_work, :f => f} %>
|
||||
<% else %>
|
||||
<div class="edu-con-bg01" style="padding:30px 0;">
|
||||
<div class="edu-con-bg01 user_bg_shadow" style="padding:30px 0;">
|
||||
<div class="ml30 mr30">
|
||||
<div class="">
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
匿名
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="edu-con-top clearfix ">
|
||||
<div class="edu-con-top clearfix user_bg_shadow">
|
||||
<p class="ml15 fl color-grey"><i class="fa fa-lock mr5" ></i><%= @work.name %></p>
|
||||
<a href="<%= student_work_index_path(:homework => @work.homework_common_id, :tab => 2) %>" class="fr font-12 mr15 mt3 color-grey">返回</a>
|
||||
</div>
|
||||
|
|
@ -170,7 +170,7 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="edu-con-bg01 mt15" id="student_work_score_div">
|
||||
<div class="edu-con-bg01 mt15 user_bg_shadow" id="student_work_score_div">
|
||||
<%= render :partial => 'student_work_score_div' %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<% if @shixuns.count > 0 %>
|
||||
<div class="mh390">
|
||||
<% if @shixuns.count > 0 %>
|
||||
<table class="edu-pop-table edu-txt-center mb10" style="table-layout: fixed; border: none;" cellspacing="0" cellpadding="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -26,6 +27,7 @@
|
|||
<p>没有实训可选择</p>
|
||||
<% end %>
|
||||
<p id="lessong_nonechecked_tip" class="color-red none f12">请至少选择一个实训</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="pages_user_show fl">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "users/homework_base_info", :locals =>{:activity => activity, :user_activity_id =>user_activity_id, :is_teacher => is_teacher, :hw_status => hw_status} %>
|
||||
<%= render :partial => "users/homework_base_info", :locals =>{:activity => activity, :user_activity_id => user_activity_id, :is_teacher => is_teacher, :hw_status => hw_status} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,62 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="edu-tab-con-1" class="user_bg_shadow">
|
||||
<div id="edu-tab-con-1 clearfix" class="user_bg_shadow">
|
||||
<!--<a class="font-12 color-grey fr mr20 mt5" style="cursor: pointer">查看全部</a>
|
||||
<div class="clearfix">
|
||||
<div class="fens-table-list fl">
|
||||
<img src="/images/avatars/User/22151?1501146849" class="fl touxiang" width="50" height="50"/>
|
||||
<div class="fl ml10" style="flex: 1">
|
||||
<div class="clearfix">
|
||||
<a class="mr15 fl">蔡世</a>
|
||||
<li class="fl white-icon-ring mr5"><i class="fa fa-user u-color-light-grey" title="还未实名认证"></i></li>
|
||||
<li class="fl white-icon-ring mr5"><i class="fa fa-list-alt u-color-light-grey" title="还未职业认证"></i></li>
|
||||
</div>
|
||||
<div class="color-grey">副教授</div>
|
||||
<div class="color-grey">国防科技大学</div>
|
||||
<div class="clearfix" style="line-height: 35px"><span class="font-12 color-grey">粉丝 1290</span><a class="btn-focus fr color-grey">已关注</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fens-table-list fl">
|
||||
<img src="/images/avatars/User/22151?1501146849" class="fl touxiang" width="50" height="50"/>
|
||||
<div class="fl ml10" style="flex: 1">
|
||||
<div class="clearfix">
|
||||
<a class="mr15 fl">蔡世</a>
|
||||
<li class="fl white-icon-ring mr5"><i class="fa fa-user color-light-green" title="已实名认证"></i></li>
|
||||
<li class="fl white-icon-ring mr5"><i class="fa fa-list-alt u-color-light-grey" title="还未职业认证"></i></li>
|
||||
</div>
|
||||
<div class="color-grey">副教授</div>
|
||||
<div class="color-grey">国防科技大学</div>
|
||||
<div class="clearfix" style="line-height: 35px"><span class="font-12 color-grey">粉丝 1290</span><a class="btn-focus fr color-grey">关注</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fens-table-list fl">
|
||||
<img src="/images/avatars/User/22151?1501146849" class="fl touxiang" width="50" height="50"/>
|
||||
<div class="fl ml10" style="flex: 1">
|
||||
<div class="clearfix">
|
||||
<a class="mr15 fl">蔡世</a>
|
||||
<li class="fl white-icon-ring mr5"><i class="fa fa-user color-light-green" title="已实名认证"></i></li>
|
||||
<li class="fl white-icon-ring mr5"><i class="fa fa-list-alt u-color-light-red" title="职业认证中"></i></li>
|
||||
</div>
|
||||
<div class="color-grey">副教授</div>
|
||||
<div class="color-grey">国防科技大学</div>
|
||||
<div class="clearfix" style="line-height: 35px"><span class="font-12 color-grey">粉丝 1290</span><a class="btn-focus fr color-grey">已关注</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fens-table-list fl">
|
||||
<img src="/images/avatars/User/22151?1501146849" class="fl touxiang" width="50" height="50"/>
|
||||
<div class="fl ml10" style="flex: 1">
|
||||
<div class="clearfix">
|
||||
<a class="mr15 fl">蔡世</a>
|
||||
<li class="fl white-icon-ring mr5"><i class="fa fa-user u-color-light-red" title="实名认证中"></i></li>
|
||||
<li class="fl white-icon-ring mr5"><i class="fa fa-list-alt u-color-light-grey" title="还未职业认证"></i></li>
|
||||
</div>
|
||||
<div class="color-grey">副教授</div>
|
||||
<div class="color-grey">国防科技大学</div>
|
||||
<div class="clearfix" style="line-height: 35px"><span class="font-12 color-grey">粉丝 1290</span><a class="btn-focus fr color-grey">关注</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<% if @user_watchlist_count == 0 %>
|
||||
<p class="p2 font-16">
|
||||
<% if current_user %>
|
||||
|
|
@ -33,7 +88,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="edu-tab-con-2" class="undis user_bg_shadow" >
|
||||
<div id="edu-tab-con-2 pr" class="undis user_bg_shadow" >
|
||||
<% if @user_fanlist_count == 0 %>
|
||||
<p class="p2 font-16">
|
||||
<% if current_user %>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,17 @@
|
|||
<p class="color-grey font-12">
|
||||
<span class="w100 fl"><%= (User.find shixun.user_id).show_name %></span>
|
||||
<span class="w100 fl"><%= shixun.language %></span>
|
||||
<span class="w150 fl"><%= had_passed_changllenge_count shixun, User.current %> / <%= shixun.challenges.count %> 任务完成 </span>
|
||||
<span class="w200 fl">
|
||||
<% if had_passed_changllenge_count(shixun, User.current) == 0 %>
|
||||
尚未挑战
|
||||
<% elsif had_passed_changllenge_count(shixun, User.current) == -1 %>
|
||||
已挑战至 第1关 / 共<i><%= shixun.challenges.count %></i>关
|
||||
<% elsif (had_passed_changllenge_count(shixun, User.current).class == Array) %>
|
||||
已挑战至 第<%= had_passed_changllenge_count(shixun, User.current)[0].to_i %>关 / 共<i><%= shixun.challenges.count %></i>关
|
||||
<% else %>
|
||||
已完成至 第<i><%= had_passed_changllenge_count(shixun, User.current) %></i>关 / 共<i><%= shixun.challenges.count %></i>关
|
||||
<% end %>
|
||||
</span>
|
||||
<!--<span class=" ml30">No.501 排名 </span>-->
|
||||
<span class="w150 fl"><%= format_time(shixun.updated_at) %> 开启 </span>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<span class="reply_praise_count_<%= comment.id %>">
|
||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
||||
</span>
|
||||
<% if type == 'HomeworkCommon' || type == 'Work' %>
|
||||
<% if type == 'HomeworkCommon' || type == 'Work' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
|
|
@ -44,9 +44,10 @@
|
|||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id},
|
||||
<%#= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id},
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<a href="javascript:void(0);" class="fr mr20 undis" id="delete_reply_<%= activity_id %>_<%= comment.id %>" onclick="delete_confirm_box_2('<%= words_destroy_path(:object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id) %>', '您确定要删除吗?')" >删除</a>
|
||||
<% end %>
|
||||
<% elsif type == 'News' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
|
|
@ -59,7 +60,7 @@
|
|||
</span>
|
||||
<% news = News.find(activity_id) %>
|
||||
<%= link_to('删除', {:controller => 'comments', :action => 'destroy', :id => activity_id, :comment_id => comment, :user_activity_id => user_activity_id},
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) if (User.current.allowed_to?(:manage_news, news.course) || User.current.allowed_to?(:manage_news, news.project) || User.current == comment.author || User.current.admin_of_contest?(news.contest)) %>
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) if (User.current.allowed_to?(:manage_news, news.course) || User.current.allowed_to?(:manage_news, news.project) || User.current == comment.author || User.current.admin_of_contest?(news.contest)) %>
|
||||
<% elsif type == 'Issue' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
<div class="mh440">
|
||||
<% if @homeworks.blank? %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% else %>
|
||||
<table class="edu-pop-table color-grey edu-txt-center" cellspacing="0" cellpadding="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -5,17 +9,19 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @homeworks.each do |homework| %>
|
||||
<tr>
|
||||
<td class="clearfix">
|
||||
<input type="checkbox" name="checkMenu[]" value="<%= homework.id%>" id="homework_bank_<%= homework.id %>" class="fl magic-checkbox">
|
||||
<label class="fl mt-5 ml5" for="homework_bank_<%= homework.id %>"></label>
|
||||
<%= link_to homework.name, homework_bank_path(homework), :target => '_blank', :title => "#{homework.name}", :style => "max-width: 445px;", :class => 'edu-info-dark task-hide fl ml30' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @homeworks.each do |homework| %>
|
||||
<tr>
|
||||
<td class="clearfix">
|
||||
<input type="checkbox" name="checkMenu[]" value="<%= homework.id%>" id="homework_bank_<%= homework.id %>" class="fl magic-checkbox">
|
||||
<label class="fl mt-5 ml5" for="homework_bank_<%= homework.id %>"></label>
|
||||
<%= link_to homework.name, homework_bank_path(homework), :target => '_blank', :title => "#{homework.name}", :style => "max-width: 445px;", :class => 'edu-info-dark task-hide fl ml30' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="mb5"><span id="choose_courses_notice" class="c_red"></span></div>
|
||||
<div class="clearfix">
|
||||
<div class="clearfix fr mt10">
|
||||
|
|
|
|||
|
|
@ -49,10 +49,11 @@
|
|||
<li class="<%= activity.private == 1 ? 'whiteSettingIcon' : 'homepagePostSettingIcon' %>">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
<%#= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => activity, :user_id => activity.user,:user_activity_id => user_activity_id, :activity_id => activity.id},
|
||||
:confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "postOptionLink", :title => l(:button_delete)) %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="delete_confirm_box_3('<%= words_destroy_path(:object_id => activity, :user_id => activity.user, :user_activity_id => user_activity_id, :activity_id => activity.id )%>', '您确定要删除吗?')">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -105,20 +105,20 @@
|
|||
<span class="color-grey-6">金币<span class="ml5 color-orange02"><%= @user.grade %></span></span>
|
||||
</p>
|
||||
<!-- <p class="p3">帐户安全:
|
||||
<a class="<%= @user.phone.blank? ? 'color-grey' : 'color-green' %>" href="<%= security_settings_path %>">
|
||||
<% if @user.phone.blank? %>
|
||||
<a class="<%#= @user.phone.blank? ? 'color-grey' : 'color-green' %>" href="<%#= security_settings_path %>">
|
||||
<%# if @user.phone.blank? %>
|
||||
<img class="tubiao1" src="../images/edu_user/edu-cons1.png"/>
|
||||
<% else %>
|
||||
<%# else %>
|
||||
<img src="../images/edu_user/edu-cons1.png"/>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
</a>
|
||||
|
||||
<a class="<%= @user.mail.blank? ? 'color-grey' : 'color-green' %>" href="<%= security_settings_path %>">
|
||||
<% if @user.mail.blank? %>
|
||||
<a class="<%#= @user.mail.blank? ? 'color-grey' : 'color-green' %>" href="<%#= security_settings_path %>">
|
||||
<%# if @user.mail.blank? %>
|
||||
<img class="tubiao2" src="../images/edu_user/edu-cons1.png"/>
|
||||
<% else %>
|
||||
<%# else %>
|
||||
<img class="tubiao3" src="../images/edu_user/edu-cons1.png"/>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
</a>
|
||||
</p>-->
|
||||
|
||||
|
|
@ -224,7 +224,7 @@
|
|||
<p><%#= link_to '发起求助', new_forum_memo_path(:forum_id => Forum.first.id, :forum_index => true), :target => "_blank" %></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div> -->
|
||||
<div class="hascon">
|
||||
<% str = current_user ? '我' : 'TA' %>
|
||||
<ul id="edu-user-tab-nav">
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%=render :partial => "users/user_jours_list", :locals => {:jours =>@jour, :page => 0, :type => @type, :count => @jour_count} %>
|
||||
<%= render :partial => "users/user_jours_list", :locals => {:jours =>@jour, :page => 0, :type => @type, :count => @jour_count} %>
|
||||
<div class="cl"></div>
|
||||
</div><!--message_box end-->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'game_status'
|
||||
get 'change_status'
|
||||
post 'file_update'
|
||||
post 'evaluating_choice'
|
||||
get 'file_edit'
|
||||
get 'answer'
|
||||
get 'minus_score'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
class ModifiedYubeiForChallenge < ActiveRecord::Migration
|
||||
def up
|
||||
Shixun.includes(:challenges).each do |shixun|
|
||||
shixun.challenges.each do |challenge|
|
||||
challenge.update_column(:ready_knowledge, shixun.try(:propaedeutics))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
|
|
@ -225,7 +225,7 @@ function delete_confirm_box_2(url, str){
|
|||
function delete_confirm_box_3(url, str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-submit clearfix"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-blue fr" data-method="delete" onclick="hideModal();">确定</a></div></div>';
|
||||
'<a href="'+ url +'" class="task-btn task-btn-blue fr pop_close" data-method="delete" onclick="hideModal();">确定</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 140);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ a.course-bth-blue{cursor: pointer;background-color:#199ed8 ;color: #ffffff;displ
|
|||
.pr {position:relative;}
|
||||
.w100{width: 100px;}
|
||||
.w150{width: 150px;}
|
||||
.w200{width: 200px;}
|
||||
.w850{width: 850px;}
|
||||
.with10{ width: 10%;}.with15{ width: 15%;}
|
||||
.with20{ width: 20%;}.with25{ width: 25%;}
|
||||
|
|
@ -297,18 +298,18 @@ html>body #ajax-indicator { position: fixed; }
|
|||
.user_course_filtrate:hover .user_filtrate_span2{background: #FF7500!important;}
|
||||
|
||||
/*课堂*/
|
||||
.course_filtrate{width: auto;padding:0px 10px;text-align: center;background: #fff;border-radius: 10px;margin-right: 20px; border:1px solid #ccc;line-height: 26px;}
|
||||
/*.course_filtrate:hover{background: #FF7500; color: #ffffff; border:1px solid #FF7500;}
|
||||
.course_filtrate_bg{background: #FF7500; color: #ffffff!important;border:1px solid #FF7500;}*/
|
||||
.course_filtrate:hover{color: #FF7500!important;border: 1px solid #FF7500;}
|
||||
.course_filtrate_bg{color: #FF7500!important;border: 1px solid #FF7500;}
|
||||
.course_filtrate{width: auto;padding:0px 10px;text-align: center;background: #fff;border-radius: 10px;margin-right: 20px;line-height: 26px;}
|
||||
.course_filtrate:hover{background: #FF7500; color: #ffffff; }
|
||||
.course_filtrate_bg{background: #FF7500; color: #ffffff!important;}
|
||||
/*.course_filtrate:hover{color: #FF7500!important;border: 1px solid #FF7500;}
|
||||
.course_filtrate_bg{color: #FF7500!important;border: 1px solid #FF7500;}*/
|
||||
|
||||
/*最新和最热导航条的公用样式*/
|
||||
|
||||
.nav_check_item{margin-bottom:13px;border-bottom: 2px solid #FF6610;}
|
||||
.nav_check_item{margin-bottom:13px;border-bottom: 2px solid #FC7033;}
|
||||
.nav_check_item li{width:auto;padding: 5px 0px;width: 80px;text-align: center;cursor: pointer;}
|
||||
|
||||
.check_nav{background: #FF6610;color: #ffffff;}
|
||||
.check_nav{background: #FC7033;color: #ffffff;}
|
||||
.check_nav a{color: #ffffff !important;}
|
||||
.check_on{background:#FF7500;color: #ffffff!important;border-radius: 4px;}
|
||||
|
||||
|
|
@ -334,4 +335,13 @@ input::-ms-clear{display:none;}
|
|||
.border-error-result{border:1px dashed #ff5252}
|
||||
|
||||
/*最小高度*/
|
||||
.mh550{min-height: 550px}
|
||||
.mh550{min-height: 550px}
|
||||
.mh510{min-height: 510px}
|
||||
.mh440{min-height: 440px}
|
||||
.mh400{min-height: 400px}
|
||||
.mh390{min-height: 390px}
|
||||
|
||||
/*---------------橙色虚线边框-----------------*/
|
||||
.border-dash-orange{border: 1px dashed #ffbfaa}
|
||||
/*---------------蓝色背景-----------------*/
|
||||
.background-blue{background:#5ECFBA!important;}
|
||||
|
|
@ -264,11 +264,11 @@ img.edu-nodata-img{ width:200px; margin:50px auto 20px; display: block;}
|
|||
#edu-tab-nav,#edu-tab-nav-auth{height:47px;background: #fff; border-bottom:2px solid #5faee3;}
|
||||
#edu-tab-nav li.new-tab-nav,#edu-tab-nav-auth li.new-tab-nav {float:left; width: 150px; text-align:center;height:48px;line-height:48px; }
|
||||
#edu-tab-nav li a{font-size:14px; }
|
||||
#edu-user-tab-nav{height:40px;background: #f5f5f5; border-bottom:2px solid #FF6610;}
|
||||
#edu-user-tab-nav{height:40px;background: #f5f5f5; border-bottom:2px solid #FC7033;}
|
||||
#edu-user-tab-nav li.new-tab-nav {float:left; width: 120px; text-align:center;height:42px;line-height:42px; }
|
||||
#edu-user-tab-nav li a{font-size:14px; }
|
||||
.edu-new-tab-hover { background:#5faee3; }
|
||||
.edu-user-tab-hover{background:#FF6610;}
|
||||
.edu-user-tab-hover{background:#FC7033;}
|
||||
.edu-user-tab-hover a{color:#fff!important;}
|
||||
.edu-new-tab-hover a{color:#fff!important;}
|
||||
.edu-class-con-list:hover{ background:#fbfbfb;}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,13 @@
|
|||
.-task-con-int .favour .p1 span em{font-size:12px;font-style:normal;padding:0 5px;border-radius:8px;background:#e9e9eb;line-height:14px;color:#666;}
|
||||
.new-tab-nav em{font-size:12px;font-style:normal;padding:0 5px;border-radius:8px;background:#e9e9eb;line-height:14px;color:#666;}
|
||||
|
||||
/*-------------------个人主页关注和粉丝列表改版-------------------------*/
|
||||
.-task-con-int .favour .fens-table-list{display: flex;width:21.29%;margin:0px 1.5% 1.5% 0px;height: 125px;border: 1px solid #EEEEEE;padding: 10px;background: #f9fbfd}
|
||||
.-task-con-int .favour .fens-table-list:nth-child(4n+1){margin:0px 1.5% 1.5% 1.5%;}
|
||||
.-task-con-int .favour .fens-table-list .touxiang{border-radius: 50%;overflow: hidden;}
|
||||
.white-icon-ring{width: 25px;height: 25px;background: #ffffff;border-radius: 50%;text-align: center;line-height: 25px;}
|
||||
a.btn-focus{display: block;width:80px;height: 35px;line-height: 35px;border-radius: 4px;border:1px solid #EEEEEE;text-align: center;cursor: pointer;background: #ffffff}
|
||||
a.btn-focus:hover{color: #FFFFFF!important;background:#FC7033;border: 1px solid #FC7033 }
|
||||
|
||||
.-task-con-int .favour .p2{line-height:90px;text-align:center;}
|
||||
.-task-con-int .favour .p2:hover .changecolor{color:#5faee3;}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top:
|
|||
/* 弹框 */
|
||||
.task-popup-text-center{ text-align: center; color: #666;}
|
||||
.task-popup-title{ border-bottom: 1px solid #eee; padding:10px 15px; }
|
||||
.task-popup-content{ padding:15px;}
|
||||
.task-popup-content{ padding:0px 15px 15px 15px;}
|
||||
.task-popup-submit{ margin: 0 auto 15px; width: 120px;}
|
||||
/* TPM */
|
||||
.task-header{ width: 100%;min-width:1200px; background:url("/images/task/task-bg-header.png") 0 0 repeat-x; height: 100px;}
|
||||
|
|
@ -130,6 +130,7 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f
|
|||
.page--body { position: relative;}
|
||||
.-margin-t-64 { margin-top: 64px;}
|
||||
.-flex { flex: 1;}
|
||||
/*.-flex-auto{flex-basis:100%;}*/
|
||||
.split-panel.-fit {position: absolute;}
|
||||
.split-panel { position: relative; overflow: hidden; min-height: 200px; height: 100%;}
|
||||
.-stretch { align-items: stretch;}
|
||||
|
|
@ -147,16 +148,18 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f
|
|||
.-scroll{ overflow:auto;}
|
||||
.-flex-basic0{flex-basis: 0%!important; display: none}
|
||||
/*王昌------------拖拽增加样式---------------修改*/
|
||||
.-flex-basic40{flex-basis:auto;}
|
||||
.-flex-basic50{flex-basis:auto;}
|
||||
.-flex-basic40{flex:auto;width:50%}
|
||||
.-flex-basic50{flex:auto;width:50%}
|
||||
.b-label{width:4px;cursor:ew-resize;background:#2b2b2b;}
|
||||
.h-center{height:4px;cursor:ns-resize;background:#33485F;}
|
||||
.-changebg{height:3px;}
|
||||
.-brother{width:100%;height:100%;position:absolute;left:0;top:0;z-index:999;}
|
||||
.-bg-weightblack{background:#000;}
|
||||
.-flex-basic70{flex:4 9 auto;}
|
||||
.-flex-basic70{height:70%;flex:4 9 auto;}
|
||||
.-task-desc-title{border-radius:10px;background:#000;opacity:0;color:#fff;max-width:300px;text-align:center;padding:5px 10px;position:absolute;line-height:20px;word-wrap: break-word;box-shadow:0px 0px 8px #194a81;}
|
||||
.-title-directing{opacity:0;color:#000;position:absolute;}
|
||||
/*---------------------------------------------*/
|
||||
.-flex-basic60{flex:none;}
|
||||
.-flex-basic60{height:30%;flex:none;}
|
||||
.-flex-basic100{flex-basis: 100%!important;}
|
||||
.-header-title{ max-width:500px; font-weight: normal;}
|
||||
.-header-right{ background:#333;border-radius:25px; padding:5px 15px; height: 30px; position: absolute; right:10px;line-height: 30px;}
|
||||
|
|
@ -176,7 +179,7 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f
|
|||
.-task-widht-90{ width: 90%;}
|
||||
.-task-widht-100{ width: 100%;}
|
||||
.-footer-left{min-height:48px;background:#f5f5f5;}
|
||||
.-footer-left ul { margin-top:10px;width: 100%}
|
||||
.-footer-left ul {width: 100%}
|
||||
.-footer-left ul li{ cursor: pointer; color:#666;}
|
||||
.-footer-left ul li:hover{ color:#888;}
|
||||
.-bg-black{ background:#2b2b2b; color:#f4f1ed;}
|
||||
|
|
@ -260,7 +263,7 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f
|
|||
.search-wrapper.active .input-holder { width:320px; border:none; border-bottom:2px solid #ccc; }
|
||||
.search-wrapper .input-holder .search-input { width:100%; height: 30px; font-size:14px; position: absolute; top:0px; left:0; border:none; opacity: 0; }
|
||||
.search-wrapper.active .input-holder .search-input { opacity: 1; outline:none; background: none;}
|
||||
.search-wrapper .input-holder .search-icon { width:20px; height:20px; border:none; padding:0px; outline:none; position: relative; z-index: 2; float:right; cursor: pointer; background: none; color: #666; top:2px;}
|
||||
.search-wrapper .search-icon { width:20px; height:20px; border:none; padding:0px; outline:none; position: relative; z-index: 2; float:right; cursor: pointer; background: none; color: #666; top:2px;}
|
||||
.search-wrapper .close { position: absolute; z-index: 1; top:2px; right:20px; width:25px; height:25px; cursor: pointer; opacity: 0;color: #666;}
|
||||
.search-wrapper.active .close {right:-35px; opacity: 1;}
|
||||
a.sortArrowActiveD {background:url(../images/post_image_list.png) -0px -20px no-repeat; width:7px; height:9px; float:left; margin-top: 10px;margin-left: 5px;}
|
||||
|
|
@ -326,21 +329,58 @@ a.shixun-task-ban-btn{background-color: #c2c4c6;display: inline-block;font-weigh
|
|||
.tab_color{color: #bfbfbf!important;}
|
||||
|
||||
/*_game_show.html.erb页面新增的一个tab*/
|
||||
.comments_item_content img{width: 9%;border-radius: 50%;margin-right: 5px}
|
||||
.comment_item_one{width: 90%}
|
||||
.comments_item_content img{border-radius: 50%;margin-right: 5px}
|
||||
.comment_item_one{width: 87%}
|
||||
.comment_item_bottom{border-bottom: 1px solid #efefef}
|
||||
.comment_item_top{border-top: 1px solid #efefef}
|
||||
.comment_item_left_green{border-left: 3px solid #29bd8b}
|
||||
.return_item{height: 20px;line-height: 20px;margin-top: 5px;}
|
||||
.comment-input{width: 90%;padding: 0px 10px;}
|
||||
.comment-input{left:90px;position: absolute;right: 50px;top:10px}
|
||||
.comment-input textarea{border: none !important;width:86%; outline: none;height: 30px;border-radius: 4px;margin-right: 10px;padding-left: 5px;float:left}
|
||||
.comment_position{ position: absolute;bottom: 8px;}
|
||||
|
||||
/*-------新建阶段添加选项部分----------*/
|
||||
.option-item{border:1px solid #e2e2e2;}
|
||||
.add-option-item{border:1px dashed #e2e2e2;}
|
||||
.option-item,.add-option-item{display: block;width: 38px;height: 38px;text-align: center;line-height: 38px;border-radius: 4px}
|
||||
.check-option-bg{background: #ee4a1f;color: #ffffff!important;border: 1px solid #ee4a1f}
|
||||
.add-option-input{padding: 5px;width: 90%;height: 40px;min-width: 700px;border: 1px dashed #e2e2e2;}
|
||||
.check-option-bg{background: #FF7500;color: #ffffff!important;border: 1px solid #FF7500}
|
||||
.add-option-input{padding: 5px;width: 90%;height: 40px;min-width: 700px;}
|
||||
.add-option-input a{display: block;width: 100%;height: 100%;cursor: pointer}
|
||||
.position-delete{position: absolute;right: -17px;top: 12px;cursor: pointer}
|
||||
.position-delete{position: absolute;right: -22px;top: 12px;cursor: pointer}
|
||||
|
||||
/*--------TPI的答案选项卡------*/
|
||||
.quiz-task-options:not(.-compact) {
|
||||
padding:30px 10px;
|
||||
}
|
||||
.card {
|
||||
position: relative;
|
||||
background: #515151;
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.card:hover{
|
||||
background: #3f3f3f;
|
||||
}
|
||||
.card-check{background: #3498db!important;}
|
||||
.-justify {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.-center {
|
||||
align-items: center;
|
||||
}
|
||||
.markdown {
|
||||
letter-spacing: 0;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
}
|
||||
.markdown code {
|
||||
padding: 0.2em 0;
|
||||
margin: 0;
|
||||
font-family: "微软雅黑","宋体";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue