Merge branch 'develop' into dev_xucheng
This commit is contained in:
commit
70351781bf
|
|
@ -3,7 +3,7 @@ class GamesController < ApplicationController
|
|||
layout "base_myshixun"
|
||||
skip_before_filter :verify_authenticity_token, :only => [:file_update]
|
||||
before_filter :find_myshixun, :only => [:index]
|
||||
before_filter :find_game, :only => [:show, :game_build, :entry,:next_step, :prev_step,:outputs_show, :file_edit, :file_update, :get_waiting_time,
|
||||
before_filter :find_game, :only => [:show, :game_build, :entry,:next_step, :prev_step,:outputs_show, :file_edit, :file_update, :get_waiting_time, :web_display,
|
||||
:game_status, :change_status, :answer, :minus_score, :refresh_game_list, :reset_original_code, :reset_new_code, :evaluating_choice, :sync_codes]
|
||||
before_filter :find_repository, :only => [:show, :entry, :file_edit, :file_update, :reset_original_code, :reset_new_code, :html_show]
|
||||
before_filter :allowd_manager
|
||||
|
|
@ -496,6 +496,20 @@ class GamesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# web渲染
|
||||
def web_display
|
||||
path = @game.challenge.path.strip
|
||||
port = (50000 + @game.myshixun_id).to_s
|
||||
# 测试
|
||||
#path = "src/step1/Helloworld.php"
|
||||
#port = (50000+4116).to_s
|
||||
@url = "http://106.75.96.108:" + port + '/' + path
|
||||
|
||||
respond_to do |format|
|
||||
format.html{render :layout => false}
|
||||
end
|
||||
end
|
||||
|
||||
def minus_score
|
||||
@game_challenge = @game.challenge
|
||||
user = User.current
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ class MyshixunsController < ApplicationController
|
|||
# resubmit 1:表示已通关后重新评测;0:表示非重新评测
|
||||
# retry_status 0:初始值;1:重新评测失败;2:重新评测成功
|
||||
def training_task_status
|
||||
#params[:jsonTestDetails] = '{"buildID":"1","compileSuccess":"1","msg":[{"caseId":"1","expectedOutput":"56ysMOS9jeWQjOWtpueahOaAu+WIhuS4ujoyNDcK56ysMeS9jeWQjOWtpueahOaAu+WIhuS4ujoz MjIK","input":"Mg0KMjMsNTYsNzgsOTANCjIxLDU2LDc4LDc2LDkx","output":"56ysMOS9jeWQjOWtpueahOaAu+WIhuS4ujoyNDcK56ysMeS9jeWQjOWtpueahOaAu+WIhuS4ujoz MjIK","passed":"1"},{"caseId":"2","expectedOutput":"56ysMOS9jeWQjOWtpueahOaAu+WIhuS4ujoyMjgK56ysMeS9jeWQjOWtpueahOaAu+WIhuS4ujoy MzUK56ysMuS9jeWQjOWtpueahOaAu+WIhuS4ujoyMDYK","input":"Mw0KOTgsNzYsNTQNCjkwLDU0LDg3LDQNCjc4LDI2LDEyLDkw","output":"56ysMOS9jeWQjOWtpueahOaAu+WIhuS4ujoyMjgK56ysMeS9jeWQjOWtpueahOaAu+WIhuS4ujoy MzUK56ysMuS9jeWQjOWtpueahOaAu+WIhuS4ujoyMDYK","passed":"1"}],"outPut":"Y29tcGlsZSBzdWNjZXNzZnVsbHk","resubmit":"57D9COBR_5806","status":"0"}'
|
||||
jsonTestDetails = JSON.parse(params[:jsonTestDetails])
|
||||
status = jsonTestDetails['status']
|
||||
game_id = jsonTestDetails['buildID']
|
||||
|
|
@ -131,7 +132,9 @@ class MyshixunsController < ApplicationController
|
|||
challenge = game.challenge
|
||||
unless jenkins_testsets.blank?
|
||||
jenkins_testsets.each do |j_test_set|
|
||||
logger.info("j_test_set: ############## #{j_test_set['output']}")
|
||||
actual_output = tran_base64_decode64(j_test_set['output'])
|
||||
logger.info "actual_output:################################################# #{actual_output}"
|
||||
game_outputs = Output.create(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'],
|
||||
:actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => game.query_index, :compile_success => compile_success.to_i)
|
||||
# output = Output.where(:game_id => game.id, :test_set_position => j_test_set['caseId'].to_i).first
|
||||
|
|
|
|||
|
|
@ -4845,7 +4845,7 @@ def get_hw_index(hw,is_teacher,type=0)
|
|||
end
|
||||
end
|
||||
hw_ids = homeworks.map{|hw| hw.id} if !homeworks.blank?
|
||||
index = hw_ids.index(hw.id)
|
||||
index = hw_ids.length - 1 - hw_ids.index(hw.id)
|
||||
return index
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Memo < ActiveRecord::Base
|
|||
# 若是主题帖,则内容可以是空
|
||||
#validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? }
|
||||
validates_length_of :subject, maximum: 50
|
||||
validates_length_of :content, maximum: 30000
|
||||
|
||||
validate :cannot_reply_to_locked_topic, :on => :create
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@
|
|||
</li>
|
||||
<% if @no_group_count > 0 %>
|
||||
<li data-option="noclass" data-course-id="<%= @course.id %>">
|
||||
<p class="p1"><span>未分班</span><em class="setting_noGroup_student_count"><%= @no_group_count %></em></p>
|
||||
<p class="p1"><span class = "ml15">未分班</span><em class="setting_noGroup_student_count"><%= @no_group_count %></em></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% @course.course_groups.each do |group| %>
|
||||
<li data-option="hasclass" data-group-id="<%= group.id %>" data-course-id="<%= @course.id %>" class="setting_group_<%= group.id %>">
|
||||
<p class="p1">
|
||||
<span><%= group.name %></span>
|
||||
<span class = "ml15"><%= group.name %></span>
|
||||
<em><%= group.members.count %></em>
|
||||
<!--<i class="fa fa-bars" aria-hidden="true"></i>-->
|
||||
</p>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<script>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% @course.course_groups.each do |group| %>
|
||||
if($(".setting_group_<%= group.id %> span").width() == 115){
|
||||
if($(".setting_group_<%= group.id %> span").width() == 96){
|
||||
$(".setting_group_<%= group.id %> p").attr("data-tip-left","<%= group.name %>");
|
||||
}
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
</li>
|
||||
<% if @no_group_count > 0 %>
|
||||
<li data-option="noclass" data-course-id="<%= @course.id %>">
|
||||
<p class="p1"><span>未分班</span><em class="setting_noGroup_student_count"><%= @no_group_count %></em></p>
|
||||
<p class="p1"><span class = "ml15">未分班</span><em class="setting_noGroup_student_count"><%= @no_group_count %></em></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% @course.course_groups.each do |group| %>
|
||||
<li data-option="hasclass" data-group-id="<%= group.id %>" data-course-id="<%= @course.id %>" class="setting_group_<%= group.id %>">
|
||||
<p class="p1">
|
||||
<span><%= group.name %></span>
|
||||
<span class = "ml15"><%= group.name %></span>
|
||||
<em><%= group.members.count %></em>
|
||||
</p>
|
||||
</li>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<script>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% @course.course_groups.each do |group| %>
|
||||
if($(".setting_group_<%= group.id %> span").width() == 115){
|
||||
if($(".setting_group_<%= group.id %> span").width() == 96){
|
||||
$(".setting_group_<%= group.id %> p").attr("data-tip-left","<%= group.name %>");
|
||||
}
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@
|
|||
</li>
|
||||
<% if @no_group_count > 0 %>
|
||||
<li data-option="noclass" data-course-id="<%= @course.id %>">
|
||||
<p class="p1"><span>未分班</span><em class="setting_noGroup_student_count"><%= @no_group_count %></em></p>
|
||||
<p class="p1"><span class = "ml15">未分班</span><em class="setting_noGroup_student_count"><%= @no_group_count %></em></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% @course.course_groups.each do |group| %>
|
||||
<li class="<%= @group.id == group.id ? 'sheet' : '' %>" data-option="hasclass" data-group-id="<%= group.id %>" data-course-id="<%= @course.id %>" class="setting_group_<%= group.id %>" id = "setting_group_<%= group.id %>" >
|
||||
<p class="p1">
|
||||
<span><%= group.name %></span>
|
||||
<span class = "ml15"><%= group.name %></span>
|
||||
<em><%= group.members.count %></em>
|
||||
<!--<i class="fa fa-bars" aria-hidden="true"></i>-->
|
||||
</p>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<script>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% @course.course_groups.each do |group| %>
|
||||
if($("#setting_group_<%= group.id %> span").width() == 115){
|
||||
if($("#setting_group_<%= group.id %> span").width() == 96){
|
||||
$("#setting_group_<%= group.id %> p").attr("data-tip-left","<%= group.name %>");
|
||||
}
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
<p class="p1"><span>全部学生</span><em class="setting_all_student_count"><%= @student_count %></em></p>
|
||||
</li>
|
||||
<li class="sheet" data-option="noclass" data-course-id="<%= @course.id %>">
|
||||
<p class="p1"><span>未分班</span><em class="setting_noGroup_student_count"><%= @no_group_count %></em></p>
|
||||
<p class="p1" ><span class = "ml15">未分班</span><em class="setting_noGroup_student_count"><%= @no_group_count %></em></p>
|
||||
</li>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% @course.course_groups.each do |group| %>
|
||||
<li data-option="hasclass" data-group-id="<%= group.id %>" data-course-id="<%= @course.id %>" class="setting_group_<%= group.id %>">
|
||||
<p class="p1">
|
||||
<span><%= group.name %></span>
|
||||
<span class = "ml15"><%= group.name %></span>
|
||||
<em><%= group.members.count %></em>
|
||||
<!--<i class="fa fa-bars" aria-hidden="true"></i>-->
|
||||
</p>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<script>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% @course.course_groups.each do |group| %>
|
||||
if($(".setting_group_<%= group.id %> span").width() == 115){
|
||||
if($(".setting_group_<%= group.id %> span").width() == 96){
|
||||
$(".setting_group_<%= group.id %> p").attr("data-tip-left","<%= group.name %>");
|
||||
}
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
//div_form = $("div[nhname='new_exercise_mc_q']");
|
||||
//$(".ke-edit", div_form).css("height","48px");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<a href="javascript:void(0)" onclick="exQuestionEdit(<%= exercise_question.id%>);"><i data-tip-down="编辑" class="fa fa-pencil color-orange05"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="pl15 pr15 justify"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 mb10">
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<a href="javascript:void(0)" onclick="exQuestionEdit(<%= exercise_question.id%>);"><i data-tip-down="编辑" class="fa fa-pencil color-orange05"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<div style="text-align: justify;" class="pl15 pr15"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 mb10">
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<a href="javascript:void(0)" onclick="exQuestionEdit(<%= exercise_question.id%>);"><i data-tip-down="编辑" class="fa fa-pencil color-orange05"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<div style="text-align: justify;" class="pl15 pr15"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="clearfix bor-top-greyE padding15 answer_con">
|
||||
<p>参考答案:</p>
|
||||
<pre class="exercise_que_title" style="text-align:justify;"><%= exercise_question.exercise_standard_answers.count > 0 ? exercise_question.exercise_standard_answers.first.answer_text : "无"%></pre>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<a href="javascript:void(0)" onclick="exQuestionEdit(<%= exercise_question.id%>);"><i data-tip-down="编辑" class="fa fa-pencil color-orange05"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<div style="text-align: justify;" class="pl15 pr15"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 pt10 pb10 bor-top-greyE">
|
||||
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
||||
<p>候选答案<%= convert_to_chi_num(index+1) %>:<%= exercise_choice.answer_text%></p>
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@
|
|||
<div class="clearfix pl15 pr15">
|
||||
<p class="fl font-15" id="mao<%= exercise_question.question_number %>">第<%= exercise_question.question_number %>题:<span class="color-orange03 ml10">[<%= exercise_question.question_type_name %>]</span><span class="ml10"><%= exercise_question.question_score %>分</span></p>
|
||||
</div>
|
||||
<div class="pl15 pr15 justify"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<% case exercise_question.question_type %>
|
||||
<% when 1 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
|
|
@ -193,21 +193,15 @@
|
|||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
</div>
|
||||
<% when 3 %>
|
||||
<div class="pl15 pr15">
|
||||
<textarea placeholder="在此填入答案" class="task-height-40 with100"></textarea>
|
||||
</div>
|
||||
<div class="pl15 pr15 pt10 pb10 bor-top-greyE">
|
||||
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
||||
<p>候选答案<%= convert_to_chi_num(index+1) %>:<%= exercise_choice.answer_text%></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% when 4 %>
|
||||
<div class="pl15 pr15">
|
||||
<textarea class="task-height-150 with100" name="exercise_choice" placeholder="在此填入答案"><%= get_anwser_vote_text(exercise_question.id,User.current.id).html_safe %></textarea>
|
||||
</div>
|
||||
<div class="clearfix bor-top-greyE padding15 answer_con">
|
||||
<p>参考答案</p>
|
||||
<pre class="exercise_que_title"><%= exercise_question.exercise_standard_answers.first.answer_text%></pre>
|
||||
<pre class="exercise_que_title"><%= exercise_question.exercise_standard_answers.count > 0 ? exercise_question.exercise_standard_answers.first.answer_text : "无"%></pre>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<td class="text_c"><%= history.try(:quotes).to_i %></td>
|
||||
<td class="text_c"><%= format_time(history.created_on) %></td>
|
||||
<td class="text_c">
|
||||
<%= link_to( '<i class="fa fa-trash color-grey"></i>'.html_safe, attachment_path(history.attachment, :history_id => history, :type => "history_delete"),
|
||||
<%= link_to( '<i class="fa fa-trash color-grey" data-tip-down = "删除该版本资源"></i>'.html_safe, attachment_path(history.attachment, :history_id => history, :type => "history_delete"),
|
||||
:remote => true,
|
||||
:method => :delete,:class => "mr5") if allow_to_delete_attachment(history) %>
|
||||
</td>
|
||||
|
|
@ -34,8 +34,9 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="color-orange">只删除资源的历史版本,请点击相应版本的删除按钮</p>
|
||||
<div>
|
||||
|
||||
<div class = "clearfix">
|
||||
<p class="color-orange fl">只删除资源的历史版本,请点击相应版本的删除按钮</p>
|
||||
<% if @attachment.container_type == "Project" %>
|
||||
<%#= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (is_project_manager?(User.current.id, @attachment.container_id) || User.current.id == @attachment.author_id || User.current.admin?) %>
|
||||
<% if (is_project_manager?(User.current.id, @attachment.container_id) || User.current.id == @attachment.author_id || User.current.admin?) %>
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@
|
|||
<% if file.attachment_histories.count == 0 %>
|
||||
<%= link_to truncate(file.filename,length: 40, omission: '...'),
|
||||
download_named_attachment_path(file.id, file.filename),
|
||||
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %>
|
||||
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "color-grey3 f_14" %>
|
||||
<% else %>
|
||||
<%= link_to truncate(file.filename,length: 40, omission: '...'), attachment_history_download_path(file.id),
|
||||
:title => file.filename+"\n"+file.description.to_s,
|
||||
:class => "linkGrey3 f_14",
|
||||
:class => "color-grey3 f_14",
|
||||
:style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :remote=>true %>
|
||||
<% end %>
|
||||
<%#= file_preview_eye(file, class: 'preview') %>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<span class="mt10 -flex c_grey ml15" id="time-consuming"></span>
|
||||
<!--<span class="mt10 mr15" style="color: #2dad96;" id="game_wating_time"></span>-->
|
||||
<% if @myshixun.shixun.try(:language) == "PHP/Web" %>
|
||||
<a href="<%= web_display_myshixun_game_path(@game, :myshixun_id => @myshixun) %>" target="_blank" class="shixun-task-btn task-btn-orange mr15 mt8">查看网页效果</a>
|
||||
<% end %>
|
||||
<% 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>
|
||||
|
|
@ -146,16 +149,16 @@
|
|||
$.ajax({
|
||||
url: '<%= game_build_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
success: function (data){
|
||||
timeID = setInterval(function(){
|
||||
/* timeID = setInterval(function(){
|
||||
$.ajax({
|
||||
url: '<%= get_waiting_time_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
url: '<%#= get_waiting_time_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
data:{resubmit:data.resubmit},
|
||||
async: false,
|
||||
success: function(data){
|
||||
console.log(data);
|
||||
if(data.onRun == 1){
|
||||
clearInterval(timeID);
|
||||
$("#game_wating_time").html("");
|
||||
$("#game_wating_time").html("");*/
|
||||
// 每2s匹配一次状态,成功2 评测中1 评测 0
|
||||
var intId = setInterval(function(){
|
||||
var ajaxTimeoutTest = $.ajax({
|
||||
|
|
@ -271,7 +274,7 @@
|
|||
}}
|
||||
});
|
||||
}, 2000);
|
||||
}else if(data.onRun == 0){
|
||||
/*}else if(data.onRun == 0){
|
||||
mintes = parseInt(data.waitingTime / 60);
|
||||
if(mintes > 1){
|
||||
$("#game_wating_time").html("目前正有" + data.waitNum + "个任务正在等待,大约需要等待" + mintes + "分钟")
|
||||
|
|
@ -281,7 +284,7 @@
|
|||
}
|
||||
}
|
||||
})
|
||||
}, 2000);
|
||||
}, 2000);*/
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -54,11 +54,6 @@
|
|||
<div id="codetab_con_2" class="undis -relative"></div>
|
||||
<div id="current_repository_path" class="undis"><%= file_update_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %></div>
|
||||
<script>
|
||||
$(function(){
|
||||
<% if @myshixun.shixun.try(:webssh) %>
|
||||
LoadingWebssh();
|
||||
<% end %>
|
||||
});
|
||||
var H = 2;
|
||||
function g_l(o){return document.getElementById(o);}
|
||||
function HoverLi_new(n){
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
<iframe src='<%= @url %>' style='width:100%;border:0;' scrolling='no' class='game_webssh'>
|
||||
</iframe>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<div class="mh440">
|
||||
<table class="edu-pop-table color-grey edu-txt-center table-pa5" cellspacing="0" cellpadding="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -21,7 +22,7 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="clearfix fr mt15">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="new_shixun_homework_bank();">选择</a>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/structure','css/edu-common', 'css/edu-public','css/taskstyle', 'css/font-awesome', 'css/edu-class', 'css/edu-popup', 'css/ketang','css/edu-subject', 'css/magic-check', "css/edu-admin", "bootstrap/bootstrap-min.css" %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/structure','css/edu-common', 'css/edu-public','css/taskstyle', 'css/font-awesome', 'css/edu-class', 'css/edu-popup', 'css/ketang','css/edu-subject', 'css/magic-check', "css/edu-admin", "bootstrap/bootstrap-min.css", 'prettify.css' %>
|
||||
<%= javascript_include_tag "edu/application",'edu/base_edu','baiduTemplate','jquery.datetimepicker.js','edu/course','attachments' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="task-popup" style="width: 563px;">
|
||||
<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>
|
||||
<!--<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">
|
||||
|
|
|
|||
|
|
@ -54,4 +54,19 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var timer="";
|
||||
$(".task-index-list-box").hover(function(ev){
|
||||
this.fn = function(){
|
||||
$(this).find(".black-half").show();
|
||||
}
|
||||
clearTimeout(timer);
|
||||
var item=$(this);
|
||||
timer=setTimeout(this.fn(),500);
|
||||
},function(){
|
||||
clearTimeout(timer);
|
||||
$(this).find(".black-half").hide();
|
||||
})
|
||||
</script>
|
||||
|
|
@ -94,6 +94,14 @@
|
|||
<input type="radio" class="undis" name="language" id="language_verilog" value="verilog">
|
||||
<label for="language_verilog">verilog</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" class="undis" name="language" id="language_PHP" value="PHP">
|
||||
<label for="language_PHP">PHP</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" class="undis" name="language" id="language_PHP/Web" value="PHP/Web">
|
||||
<label for="language_PHP/Web">PHP/Web</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to @homework.homework_detail_manual.comment_status == 3 ? '评阅' : '查看', student_work_path(student_work), :class => 'link-color-blue', :target => "_blank" %>
|
||||
<%= link_to @homework.homework_detail_manual.comment_status == 3 ? '评阅' : '查看', student_work_path(student_work), :class => '', :target => "_blank" %>
|
||||
</td>
|
||||
<% end%>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -10,16 +10,16 @@
|
|||
});
|
||||
</script>
|
||||
<div class="fl" style="flex:1" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
|
||||
<div class="orig_right" style="width: 96%">
|
||||
<div class="orig_content clearfix" id="reply_content_<%= comment.id %>">
|
||||
<div class="orig_right" style="width: 99%">
|
||||
<div class="orig_content clearfix justify" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.content_detail.html_safe %>
|
||||
</div>
|
||||
|
||||
<%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "content-username hide fl" %>
|
||||
<span class="t_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||
<div class="fr pr mr10 orig_reply h24" style="width: 110px">
|
||||
<div class="fr pr orig_reply h24" style="width: 110px">
|
||||
<div class="reply clearfix">
|
||||
<div class="reply-right none" style="position: absolute; right: -35px;">
|
||||
<div class="reply-right none" style="position: absolute; right: -0px;">
|
||||
<%= link_to('<i class="fa fa-mail-reply mr5"></i>回复'.html_safe,
|
||||
{:controller => 'users',
|
||||
:action => 'reply_to_comment',
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@
|
|||
<div class="comment_orig_content">
|
||||
<div class="orig_cont-red clearfix">
|
||||
<div class="orig_user fl">
|
||||
<%= link_to image_tag(url_to_avatar(show_real_name_for_appeal ? score.student_works_scores_appeal.user : ""), :width => "32", :height => "32"), show_real_name_for_appeal ? user_path(score.student_works_scores_appeal.user) : "javascript:void(0)", :target => "_blank" %>
|
||||
<%= link_to image_tag(url_to_avatar(show_real_name_for_appeal ? score.student_works_scores_appeal.user : ""), :width => "32", :height => "32"), show_real_name_for_appeal ? user_path(score.student_works_scores_appeal.user) : "javascript:void(0)", :style => "cursor: text",:target => "_blank" %>
|
||||
</div>
|
||||
<div class="orig_right fl">
|
||||
<%= link_to show_real_name_for_appeal ? score.student_works_scores_appeal.user.show_real_name : "匿名", show_real_name_for_appeal ? user_path(score.student_works_scores_appeal.user.show_real_name) : "javascript:void(0)", :title => show_real_name ? score.student_works_scores_appeal.user.show_real_name : "匿评用户", :class => "content-username" %>
|
||||
<%= link_to show_real_name_for_appeal ? score.student_works_scores_appeal.user.show_real_name : "匿名", show_real_name_for_appeal ? user_path(score.student_works_scores_appeal.user.show_real_name) : "javascript:void(0)", :style => "cursor: text", :class => "content-username color-grey-no-a" %>
|
||||
<span class="orig_area"><%=format_time score.student_works_scores_appeal.updated_at %></span>
|
||||
<div class="orig_content "><%= score.student_works_scores_appeal.comment%></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTitle break_word" >
|
||||
<%= link_to activity.filename, course_files_path(activity.course), :class => "color-dark" %>
|
||||
<%= link_to activity.filename, course_files_path(activity.course), :class => "color-grey3" %>
|
||||
</div>
|
||||
<div class="homepagePostTo break_word fl" style="margin:0px">
|
||||
<% if activity.try(:author).show_real_name == ' ' %>
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'prev_step', :via => [:get, :post]
|
||||
match 'reset_original_code', :via => [:get, :post]
|
||||
match 'reset_new_code', :via => [:get, :post]
|
||||
match 'web_display', :via => [:get, :post]
|
||||
get 'entry'
|
||||
get 'outputs_show'
|
||||
get 'game_status'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
class MigrateExerciseQuestionNum < ActiveRecord::Migration
|
||||
def up
|
||||
count = Exercise.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... count do i
|
||||
Exercise.page(i).per(30).each do |exercise|
|
||||
exercise.exercise_questions.reorder("created_at asc").each_with_index do |question, j|
|
||||
question.update_column('question_number', j + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
|
|
@ -2517,6 +2517,7 @@ function init_exercise_quetison_editor(params){
|
|||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(48);
|
||||
//this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight+30 : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight+30)), 48));
|
||||
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+30, 48));
|
||||
},
|
||||
afterBlur:function(){
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ em{font-style:normal;}
|
|||
.stud-class-set .news .container .member .people .left li:hover{background:#EFF9FD;border-left:3px solid #ff7500;color:#ff7500;}
|
||||
.stud-class-set .news .container .member .people .left li:hover .p1 em{color: #FFFFFF;background: #FF7500!important;}
|
||||
.stud-class-set .news .container .member .people .left li .p1{position:relative;}
|
||||
.stud-class-set .news .container .member .people .left li .p1 span{max-width:115px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display:inline-block;float:left}
|
||||
.stud-class-set .news .container .member .people .left li .p1 span{max-width:96px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display:inline-block;float:left}
|
||||
.edu-break-out{max-width:115px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display:inline-block;float:left}
|
||||
.edu-break-outshort{max-width:96px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display:inline-block;float:left}
|
||||
.stud-class-set .news .container .member .people .left li .p1 em{margin-left:10px;font-size:12px;background:#e9e9e9;border-radius:8px;padding:2px 5px;}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ a.panel-name-small{ display: inline-block; max-width:100px; color:#29bd8b; font-
|
|||
.comment_item_cont .J_Comment_Face img{ width:50px; height:50px; border-radius:100px; }
|
||||
.panel-comment_item .t_content{ width:93%; margin-left:15px;}
|
||||
.panel-comment_item a.content-username {font-size:14px; margin-right:15px; display:inline-block; max-width:100px;color: #888888}
|
||||
.panel-comment_item a:hover.content-username{color:#FF7500;}
|
||||
/*.panel-comment_item a:hover.content-username{color:#FF7500;}*/
|
||||
.panel-comment_item .orig_user img{width:40px; height:40px;border-radius:100px; }
|
||||
.panel-comment_item .reply-right{ float:right; position:relative;}
|
||||
.panel-comment_item .reply_iconup02{ position:absolute; top:22px; left:14px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
|
||||
|
|
@ -253,6 +253,7 @@ a.task-index-name{ display: inline-block; max-width:80px;}
|
|||
|
||||
/*作业描述、帖子内容*/
|
||||
.upload_img img{max-width: 100%;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.list_style ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.list_style ul li{list-style-type: disc;margin-left: 40px;}
|
||||
|
||||
|
|
@ -399,5 +400,4 @@ input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;}
|
|||
/*评阅状态*/
|
||||
.checkstatus_box_small{width: 10px;height: 10px;display: block;float: left;margin-right: 3px;}
|
||||
.checkstatus_box_big{cursor: default;width: 30px;height: 30px;line-height: 30px;text-align: center;margin-right: 10px;border:1px solid #CCCCCC;display: block;float: left;}
|
||||
.checkstatus_box_big i{position: absolute;top:18px;left: 10px;}
|
||||
|
||||
.checkstatus_box_big i{position: absolute;top:18px;left: 10px;}
|
||||
|
|
@ -247,7 +247,7 @@ input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f
|
|||
.task-index-list-title{ max-width:80%; display: block; margin:10px auto 0px; font-size:14px; font-weight: bold;}
|
||||
.task-index-list-user{padding:5px 10px; border-radius:25px;background: #F5F6F7; margin:0px auto 20px; display: inline-block;}
|
||||
.task-index-list-box-bottom{ background: #F5F6F7; color:#666; padding:10px 10%; text-align: center;}
|
||||
.task-index-list-box-bottom li{ display: inline; margin: 0 15px;}
|
||||
.task-index-list-box-bottom li{ display: inline; margin: 0 5px;}
|
||||
.task-vip{ position: absolute; right:15px; top:15px;}
|
||||
@-webkit-keyframes bounce-down {
|
||||
25% {-webkit-transform: translateY(-10px);}
|
||||
|
|
|
|||
Loading…
Reference in New Issue