Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
8f9ead0a12
|
@ -3237,6 +3237,7 @@ def strip_html(text,len=0,endss="...")
|
|||
ss = ""
|
||||
if text.length>0
|
||||
ss=text.gsub(/<\/?.*?>/, '').strip
|
||||
ss = ss.gsub(/ /, ' ')
|
||||
|
||||
if len > 0 && ss.length > len
|
||||
ss = ss[0, len] + endss
|
||||
|
|
|
@ -239,8 +239,10 @@ class Journal < ActiveRecord::Base
|
|||
|
||||
#缺陷回复微信模板消息
|
||||
def issue_wechat_message
|
||||
ws = WechatService.new
|
||||
content = strip_html self.notes.html_safe, 200
|
||||
ws.comment_template self.issue.author_id, "issues", self.journalized_id, "#{l(:label_issue_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
|
||||
if !self.notes.nil? && self.notes.gsub(' ','') != ''
|
||||
ws = WechatService.new
|
||||
content = strip_html self.notes.html_safe, 200
|
||||
ws.comment_template self.issue.author_id, "issues", self.journalized_id, "#{l(:label_issue_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -259,19 +259,26 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
if self.m_parent_id.nil?
|
||||
if self.user_id != self.jour.user_id
|
||||
self.course_messages << CourseMessage.new(:user_id => self.jour.user_id,:course_id => self.jour.course.id, :viewed => false)
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.jour.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count
|
||||
if count == 0
|
||||
ws = WechatService.new
|
||||
#content = truncate(strip_tags(self.notes.to_s), length: 200)
|
||||
content = strip_html self.notes.html_safe, 200
|
||||
ws.comment_template self.jour.user_id, "homework", self.jour_id, "#{l(:label_homework_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
|
||||
end
|
||||
end
|
||||
else
|
||||
if self.user_id != self.parent.user_id
|
||||
self.course_messages << CourseMessage.new(:user_id => self.parent.user_id,:course_id => self.jour.course.id, :viewed => false)
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.parent.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count
|
||||
if count == 0
|
||||
ws = WechatService.new
|
||||
#content = truncate(strip_tags(self.notes.to_s), length: 200)
|
||||
content = strip_html self.notes.html_safe, 200
|
||||
ws.comment_template self.parent.user_id, "homework", self.jour_id, "#{l(:label_new_second_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
|
||||
end
|
||||
end
|
||||
end
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.jour.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count
|
||||
if count == 0
|
||||
ws = WechatService.new
|
||||
#content = truncate(strip_tags(self.notes.to_s), length: 200)
|
||||
content = strip_html self.notes.html_safe, 200
|
||||
ws.comment_template self.jour.user_id, "homework", self.jour_id, "#{l(:label_homework_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -141,6 +141,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
|
@ -215,5 +216,6 @@
|
|||
var postContent = $("#message_description_<%= @article.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @article.id %>").html(postContent);
|
||||
autoUrl('message_description_<%= @article.id %>');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -120,6 +120,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
|
@ -214,5 +215,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('message_description_<%= @article.id %>');
|
||||
});
|
||||
</script>
|
|
@ -22,60 +22,6 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<div class="fl">
|
||||
<%= render :partial => "student_table"%>
|
||||
<%= render :partial => "student_table" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% @exercise_users_list.each do |exercise|%>
|
||||
<script type="text/javascript">
|
||||
$(".student_work_<%= exercise.id%>").mouseenter(function(){
|
||||
$("#work_click_<%= exercise.id%>").show();
|
||||
}).mouseleave(function(){
|
||||
$("#work_click_<%= exercise.id%>").hide();
|
||||
});
|
||||
$(function(){
|
||||
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
|
||||
$("#show_student_result_div_<%= exercise.id%>").on('click',function() {
|
||||
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
|
||||
});
|
||||
<% else %>
|
||||
$("#show_student_result_div_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
<% end %>
|
||||
});
|
||||
/*function show_result(id) {
|
||||
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
|
||||
}*/
|
||||
</script>
|
||||
<ul class="hworkListRow" id="student_work_<%= exercise.id%>">
|
||||
<li class="ml5 mr5" style="width:28px; text-align:center;">1</li>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(exercise.user)) %>
|
||||
</li>
|
||||
<li class="hworkStName" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
|
||||
<%=exercise.user.show_name %>
|
||||
</li><li class="hworkStID pl15 pr10" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
|
||||
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
|
||||
</li>
|
||||
<li class="hworkStID" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
|
||||
--
|
||||
</li>
|
||||
<li class="hworkList130 ml200 c_grey student_work_<%= exercise.id%>">
|
||||
<% if exercise.created_at%>
|
||||
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if @exercise.end_time <= exercise.created_at %>
|
||||
<span class="c_red">[未答]</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li class="hworkList50 <%= score_color exercise.score%> student_final_scor_info">
|
||||
<%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
</ul>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
|
@ -0,0 +1,81 @@
|
|||
<div class="fl" style="padding-bottom:10px; width:720px;">
|
||||
<span class="c_dark f14 fb fl mr30">
|
||||
测验
|
||||
<font class="f12 c_red">
|
||||
(<%= @exercise_count%>人已交)
|
||||
</font>
|
||||
<% if !@is_teacher && @exercise_users_list.empty?%>
|
||||
<span class="f12 c_red">您尚未提交</span>
|
||||
<% elsif !@is_teacher && !@exercise_users_list.empty?%>
|
||||
<span class="f12 c_red">您已提交</span>
|
||||
<% end %>
|
||||
</span>
|
||||
<%#if @is_teacher || @exercise.exercise_status == 3%>
|
||||
<!--<div class="hworkSearchBox">
|
||||
<input type="text" id="course_student_name" value="<%#= @name%>" placeholder="姓名、学号、邮箱" class="hworkSearchInput" onkeypress="SearchByName('<%#= student_work_index_path(:homework => @homework.id)%>',event);"/>
|
||||
<a class="hworkSearchIcon" id="search_in_student_work" onclick="SearchByName_1('<%#= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
|
||||
</div>-->
|
||||
<%#= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %>
|
||||
<%# end%>
|
||||
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" style="display: none">[ 显示测验信息 ]</a> </span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="fl">
|
||||
<%= render :partial => "student_table"%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% @exercise_users_list.each do |exercise|%>
|
||||
<script type="text/javascript">
|
||||
$(".student_work_<%= exercise.id%>").mouseenter(function(){
|
||||
$("#work_click_<%= exercise.id%>").show();
|
||||
}).mouseleave(function(){
|
||||
$("#work_click_<%= exercise.id%>").hide();
|
||||
});
|
||||
$(function(){
|
||||
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
|
||||
$("#show_student_result_div_<%= exercise.id%>").on('click',function() {
|
||||
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
|
||||
});
|
||||
<% else %>
|
||||
$("#show_student_result_div_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
<% end %>
|
||||
});
|
||||
/*function show_result(id) {
|
||||
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
|
||||
}*/
|
||||
</script>
|
||||
<ul class="hworkListRow" id="student_work_<%= exercise.id%>">
|
||||
<li class="ml5 mr5" style="width:28px; text-align:center;">1</li>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(exercise.user)) %>
|
||||
</li>
|
||||
<li class="hworkStName" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
|
||||
<%=exercise.user.show_name %>
|
||||
</li><li class="hworkStID pl15 pr10" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
|
||||
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
|
||||
</li>
|
||||
<li class="hworkStID" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
|
||||
--
|
||||
</li>
|
||||
<li class="hworkList130 ml200 c_grey student_work_<%= exercise.id%>">
|
||||
<% if exercise.created_at%>
|
||||
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if @exercise.end_time <= exercise.created_at %>
|
||||
<span class="c_red">[未答]</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li class="hworkList50 <%= score_color exercise.score%> student_final_scor_info">
|
||||
<%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
</ul>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
|
@ -1,23 +1,71 @@
|
|||
<ul class="hworkUl">
|
||||
<li class="hworkList340 hworkH30 width530">
|
||||
<span class="c_dark f14 fb fl mr5">序号</span>
|
||||
<span class="c_dark f14 fb fl mr55"> </span>
|
||||
<span class="c_dark f14 fb fl mr60">姓名</span>
|
||||
<span class="c_dark f14 fb fl mr60">学号</span>
|
||||
<span class="c_dark f14 fb fl">班级</span>
|
||||
</li>
|
||||
<table class="hwork-table-wrap">
|
||||
<tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
|
||||
<th class="hworkList340 width530" colspan="6">
|
||||
<span class="c_dark f14 fb fl mr5">序号</span>
|
||||
<span class="c_dark f14 fb fl mr55"> </span>
|
||||
<span class="c_dark f14 fb fl mr60">姓名</span>
|
||||
<span class="c_dark f14 fb fl mr60">学号</span>
|
||||
<span class="c_dark f14 fb fl">班级</span>
|
||||
</th>
|
||||
<th class="hworkList130">
|
||||
<%= link_to "时间",'',:class => "c_dark f14 fb fl ml50" ,:remote => true%>
|
||||
</th>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "成绩",'',:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<li class="hworkList130 hworkH30">
|
||||
<%= link_to "时间",'',:class => "c_dark f14 fb fl ml50" ,:remote => true%>
|
||||
<%# if @show_all && @order == "created_at"%>
|
||||
<%#= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%# end%>
|
||||
</li>
|
||||
<% @exercise_users_list.each do |exercise|%>
|
||||
<script type="text/javascript">
|
||||
$(".student_work_<%= exercise.id%>").mouseenter(function(){
|
||||
$("#work_click_<%= exercise.id%>").show();
|
||||
}).mouseleave(function(){
|
||||
$("#work_click_<%= exercise.id%>").hide();
|
||||
});
|
||||
$(function(){
|
||||
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
|
||||
$("#show_student_result_div_<%= exercise.id%>").on('click',function() {
|
||||
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
|
||||
});
|
||||
<% else %>
|
||||
$("#show_student_result_div_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
<% end %>
|
||||
});
|
||||
/*function show_result(id) {
|
||||
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
|
||||
}*/
|
||||
</script>
|
||||
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "成绩",'',:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<%# if @show_all && @order == "score"%>
|
||||
<%#= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%# end%>
|
||||
</li>
|
||||
</ul>
|
||||
<tr class="hworkListRow" id="student_work_<%= exercise.id%>">
|
||||
<td class="pl5 pr5" style="width:28px; text-align:center;">1</td>
|
||||
<td class="hworkPortrait pr10 float-none">
|
||||
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %>
|
||||
</td>
|
||||
<td class="hworkStName" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
|
||||
<%=exercise.user.show_name %>
|
||||
</td>
|
||||
<td class="hworkStID pl15 pr10 float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
|
||||
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
|
||||
</td>
|
||||
<td class="hworkStID float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
|
||||
--
|
||||
</td>
|
||||
<td width="200"> </td>
|
||||
<td class="hworkList130 c_grey student_work_<%= exercise.id%>">
|
||||
<% if exercise.created_at%>
|
||||
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if @exercise.end_time <= exercise.created_at %>
|
||||
<span class="c_red">[未答]</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="hworkList50 <%= score_color exercise.score%> student_final_scor_info">
|
||||
<%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%>
|
||||
</td>
|
||||
<td class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></td>
|
||||
</tr>
|
||||
<% end%>
|
||||
</table>
|
|
@ -0,0 +1,23 @@
|
|||
<ul class="hworkUl">
|
||||
<li class="hworkList340 hworkH30 width530">
|
||||
<span class="c_dark f14 fb fl mr5">序号</span>
|
||||
<span class="c_dark f14 fb fl mr55"> </span>
|
||||
<span class="c_dark f14 fb fl mr60">姓名</span>
|
||||
<span class="c_dark f14 fb fl mr60">学号</span>
|
||||
<span class="c_dark f14 fb fl">班级</span>
|
||||
</li>
|
||||
|
||||
<li class="hworkList130 hworkH30">
|
||||
<%= link_to "时间",'',:class => "c_dark f14 fb fl ml50" ,:remote => true%>
|
||||
<%# if @show_all && @order == "created_at"%>
|
||||
<%#= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%# end%>
|
||||
</li>
|
||||
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "成绩",'',:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<%# if @show_all && @order == "score"%>
|
||||
<%#= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%# end%>
|
||||
</li>
|
||||
</ul>
|
|
@ -1,6 +1,12 @@
|
|||
<div style="padding-top: 10px">
|
||||
<% if memos.any? %>
|
||||
<% memos.each do |topic| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('postDetailDes_<%= topic.id %>');
|
||||
autoUrl('postDetailDes_<%= topic.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="postDetailRow">
|
||||
<div class="postDetailPortrait">
|
||||
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="贴吧图片" /></a>-->
|
||||
|
@ -16,7 +22,7 @@
|
|||
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10 mt20" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
|
||||
</div>
|
||||
|
||||
<div class="postDetailDes"><%= topic.content.html_safe%>
|
||||
<div class="postDetailDes" id = "postDetailDes_<%= topic.id %>"><%= topic.content.html_safe%>
|
||||
<!--<a href="javascript:void(0);" class="linkBlue2 underline ml8">显示全部</a>-->
|
||||
</div>
|
||||
<% author = topic.last_reply.try(:author)%>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<%= render :partial => 'action_menu' %>
|
||||
<div class="cl"></div>
|
||||
<% if @issue.description? || @issue.attachments.any? -%>
|
||||
<div class="talk_info mb10 issue_desc" style="word-break:break-all;">
|
||||
<div class="talk_info mb10 issue_desc" id="issue_desc_<%= @issue.id %>" style="word-break:break-all;">
|
||||
<% if @issue.description? %>
|
||||
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
|
||||
|
@ -43,4 +43,11 @@
|
|||
<!--属性-->
|
||||
<%= render :partial => 'issues/attributes_show' %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('issue_desc_<%= @issue.id %>');
|
||||
autoUrl('issue_desc_<%= @issue.id %>');
|
||||
});
|
||||
</script>
|
|
@ -3,6 +3,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i + 1 %>
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#activity_description_<%= reply.id %> p,#activity_description__<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
|
||||
$("#activity_description_<%= reply.id %> p,#activity_description_<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
|
||||
var postContent = $(this).html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
postContent= postContent.replace(/ {2}/g," ");
|
||||
|
@ -107,6 +107,7 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('activity_description_<%= reply.id %>');
|
||||
description_show_hide(<%= reply.id %>);
|
||||
});
|
||||
</script>
|
||||
|
@ -147,6 +148,7 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('activity_description_<%= @memo.id %>');
|
||||
description_show_hide(<%= @memo.id %>);
|
||||
});
|
||||
</script>
|
|
@ -109,6 +109,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
|
@ -188,5 +189,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('message_description_<%= @topic.id %>');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
|
@ -210,5 +211,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('message_description_<%= @topic.id %>');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -165,6 +165,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
|
@ -245,5 +246,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('message_description_<%= @topic.id %>');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
|
@ -210,5 +211,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('message_description_<%= @news.id %>');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
|
@ -185,5 +186,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('message_description_<%= @news.id %>');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -107,6 +107,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
|
@ -195,5 +196,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('message_description_<%= @news.id %>');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -84,6 +84,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% user = User.find(reply.creator_id) %>
|
||||
|
@ -158,6 +159,7 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('intro_content_<%= @document.id %>');
|
||||
});
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
|
|
|
@ -315,6 +315,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i + 1 %>
|
||||
|
|
|
@ -105,6 +105,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('intro_content_<%= @document.id %>');
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
|
|
|
@ -88,6 +88,12 @@
|
|||
<ul>
|
||||
<% reply_id = 0 %>
|
||||
<% comments_for_doc.each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% reply_id += 1 %>
|
||||
<li style="display:<%= reply_id > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait"><%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_id) %></div>
|
||||
|
@ -104,7 +110,7 @@
|
|||
</span>
|
||||
</div>
|
||||
<% unless comment.content.blank? %>
|
||||
<div class="homepagePostReplyContent"><%= comment.content.html_safe %></div>
|
||||
<div class="homepagePostReplyContent" id="reply_content_<%= comment.id %>"><%= comment.content.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
@ -125,4 +126,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -1,27 +1,39 @@
|
|||
<ul class="hworkUl">
|
||||
<li class="hworkList30 hworkH30 ml5 mr5"><span class="c_dark f14 fb fl">序号</span></li>
|
||||
<li class="hworkList50 hworkH30"> </li>
|
||||
<li class="hworkList260 hworkH30">
|
||||
<span class="f14 fb fl">作品名称</span>
|
||||
</li>
|
||||
<table class="hwork-table-wrap">
|
||||
<tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
|
||||
<th class="hworkList30 hworkH30 pl5 pr5">序号</th>
|
||||
<th class="hworkList50"> </th>
|
||||
<th class="hworkList260" style="text-align:left;">作品名称</th>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<li class="hworkList80 hworkH30"><span class="HomeworkStuTitle f14 fb fl">姓名</span></li>
|
||||
<li class="hworkList80 hworkH30"><span class="HomeworkStuTitle f14 fb fl">学号</span></li>
|
||||
<th class="hworkList80">
|
||||
<span class="HomeworkStuTitle f14 fb fl">姓名</span>
|
||||
</th>
|
||||
<th class="hworkList80">
|
||||
<span class="HomeworkStuTitle f14 fb fl">学号</span>
|
||||
</th>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li class="hworkList160 hworkH30"><span class="HomeworkStuTitle f14 fb fl">关联项目</span></li>
|
||||
<th class="hworkList160">
|
||||
<span class="HomeworkStuTitle f14 fb fl">关联项目</span>
|
||||
</th>
|
||||
<% end %>
|
||||
|
||||
<li class="hworkList130 hworkH30 fb ml10">
|
||||
时间
|
||||
</li>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<li class="hworkList50 hworkH30 fb">
|
||||
系统
|
||||
</li>
|
||||
<th class="hworkList130 pl10">
|
||||
时间
|
||||
</th>
|
||||
<% if @homework.homework_type == 2%>
|
||||
<th class="hworkList50">
|
||||
系统
|
||||
</th>
|
||||
<% end%>
|
||||
<th class="hworkList50 pr10 pl10">
|
||||
我的评分
|
||||
</th>
|
||||
</tr>
|
||||
<% @stundet_works.each_with_index do |student_work, i|%>
|
||||
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i}%>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
<div id="about_hwork_<%= student_work.id%>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% end%>
|
||||
|
||||
<li class="hworkList50 hworkH30 fb mr10 ml10">
|
||||
我的评分
|
||||
</li>
|
||||
</ul>
|
||||
</table>
|
|
@ -0,0 +1,27 @@
|
|||
<ul class="hworkUl">
|
||||
<li class="hworkList30 hworkH30 ml5 mr5"><span class="c_dark f14 fb fl">序号</span></li>
|
||||
<li class="hworkList50 hworkH30"> </li>
|
||||
<li class="hworkList260 hworkH30">
|
||||
<span class="f14 fb fl">作品名称</span>
|
||||
</li>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<li class="hworkList80 hworkH30"><span class="HomeworkStuTitle f14 fb fl">姓名</span></li>
|
||||
<li class="hworkList80 hworkH30"><span class="HomeworkStuTitle f14 fb fl">学号</span></li>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li class="hworkList160 hworkH30"><span class="HomeworkStuTitle f14 fb fl">关联项目</span></li>
|
||||
<% end %>
|
||||
|
||||
<li class="hworkList130 hworkH30 fb ml10">
|
||||
时间
|
||||
</li>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<li class="hworkList50 hworkH30 fb">
|
||||
系统
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
<li class="hworkList50 hworkH30 fb mr10 ml10">
|
||||
我的评分
|
||||
</li>
|
||||
</ul>
|
|
@ -1,73 +1,74 @@
|
|||
<ul class="hworkUl">
|
||||
<li class="hworkList30 hworkH30 ml5 mr5"><span class="c_dark f14 fb fl">序号</span></li>
|
||||
<li class="hworkList50"> </li>
|
||||
<li class="<%= @homework.homework_type == 2 ? 'hworkList80 mr10' : 'hworkList130 mr10'%> hworkH30">
|
||||
<span class="c_dark f14 fb fl <%#= @homework.homework_type == 2 ? 'mr90 ml50' : 'mr150 ml50'%>">作品名称</span>
|
||||
</li>
|
||||
<table class="hwork-table-wrap">
|
||||
<tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
|
||||
<th class="hworkList30 hworkH30 pl5 pr5">序号</th>
|
||||
<th class="hworkList50"> </th>
|
||||
<th class="<%= @homework.homework_type == 2 ? 'hworkList80 pr10' : 'hworkList130 pr10'%>" style="text-align:left;">作品名称</th>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<!--<span class="c_dark f14 fb fl mr50">姓名</span>-->
|
||||
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> hworkH30 mr10">
|
||||
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%>
|
||||
<% if @show_all && @order == "lastname"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkList90' : 'hworkList80'%> hworkH30 mr10">
|
||||
<!--<span class="c_dark f14 fb fl">学号</span>-->
|
||||
<%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%>
|
||||
<% if @show_all && @order == "student_id"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> pr10">
|
||||
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%>
|
||||
<% if @show_all && @order == "lastname"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList90' : 'hworkList80'%> pr10">
|
||||
<%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%>
|
||||
<% if @show_all && @order == "student_id"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li class="hworkList160 hworkH30">
|
||||
<span class="c_dark f14 fb">关联项目</span>
|
||||
</li>
|
||||
<th class="hworkList160">
|
||||
<span class="c_dark f14 fb">关联项目</span>
|
||||
</th>
|
||||
<% end %>
|
||||
|
||||
<li class="hworkList130 hworkH30">
|
||||
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>
|
||||
<% if @show_all && @order == "created_at"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<th class="hworkList130">
|
||||
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>
|
||||
<% if @show_all && @order == "created_at"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10" ,:remote => true%>
|
||||
<% if @show_all && @order == "teacher_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "teaching_asistant_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<% if @homework.homework_type == 2%>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "system_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<% end%>
|
||||
</li>
|
||||
|
||||
<li class="hworkList50 hworkH30" >
|
||||
<%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10" ,:remote => true%>
|
||||
<% if @show_all && @order == "teacher_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "teaching_asistant_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "system_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "student_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<% end %>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
</tr>
|
||||
<% @stundet_works.each_with_index do |student_work, i|%>
|
||||
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i}%>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
<div id="about_hwork_<%= student_work.id%>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% end%>
|
||||
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "student_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
</ul>
|
||||
</table>
|
|
@ -0,0 +1,73 @@
|
|||
<ul class="hworkUl">
|
||||
<li class="hworkList30 hworkH30 ml5 mr5"><span class="c_dark f14 fb fl">序号</span></li>
|
||||
<li class="hworkList50"> </li>
|
||||
<li class="<%= @homework.homework_type == 2 ? 'hworkList80 mr10' : 'hworkList130 mr10'%> hworkH30">
|
||||
<span class="c_dark f14 fb fl <%#= @homework.homework_type == 2 ? 'mr90 ml50' : 'mr150 ml50'%>">作品名称</span>
|
||||
</li>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<!--<span class="c_dark f14 fb fl mr50">姓名</span>-->
|
||||
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> hworkH30 mr10">
|
||||
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%>
|
||||
<% if @show_all && @order == "lastname"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkList90' : 'hworkList80'%> hworkH30 mr10">
|
||||
<!--<span class="c_dark f14 fb fl">学号</span>-->
|
||||
<%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%>
|
||||
<% if @show_all && @order == "student_id"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li class="hworkList160 hworkH30">
|
||||
<span class="c_dark f14 fb">关联项目</span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li class="hworkList130 hworkH30">
|
||||
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>
|
||||
<% if @show_all && @order == "created_at"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
|
||||
<li class="hworkList50 hworkH30" >
|
||||
<%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10" ,:remote => true%>
|
||||
<% if @show_all && @order == "teacher_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "teaching_asistant_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "system_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "student_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li class="hworkList50 hworkH30">
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<% if @show_all && @order == "score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<% end%>
|
||||
</li>
|
||||
</ul>
|
|
@ -1,60 +1,58 @@
|
|||
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
||||
<a name="<%= student_work.id%>"></a>
|
||||
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<tr class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<td class="hworkList30 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>
|
||||
<td class="hworkPortrait pr10 float-none">
|
||||
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(student_work.user)) %>
|
||||
</li>
|
||||
<div class="student_work_<%= student_work.id%>">
|
||||
<li class="hworkName mt12 pr10 <%= @homework.homework_type == 2 ? '' : 'width130'%>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
|
||||
</td>
|
||||
<td class="hworkName float-none pr10 student_work_<%= student_work.id%> <%= @homework.homework_type == 2 ? '' : 'width130'%>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
|
||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
||||
<div>
|
||||
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
||||
</div>
|
||||
</li>
|
||||
</td>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10 student_work_<%= student_work.id%>" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<%= student_work.user.show_name%>
|
||||
</li>
|
||||
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStID90' : 'hworkStID'%> pr10" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</li>
|
||||
</td>
|
||||
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkStID90' : 'hworkStID'%> pr10 float-none student_work_<%= student_work.id%>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<span style="width:90px; float:left;" class="hidden"><%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%></span>
|
||||
</td>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
|
||||
<li class="hworkPrName" title="项目名称">
|
||||
<td class="hworkPrName student_work_<%= student_work.id%>" title="项目名称">
|
||||
<%= link_to( student_work.project.name, project_path(student_work.project.id))%>
|
||||
</li>
|
||||
</td>
|
||||
<% else %>
|
||||
<li class="hworkPrName" title="该项目是私有的">
|
||||
<td class="hworkPrName student_work_<%= student_work.id%>" title="该项目是私有的">
|
||||
<%= student_work.project.name %>
|
||||
</li>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<td class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<% if student_work.created_at && @homework.end_time%>
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="hworkList50 <%= score_color student_work.teacher_score%>">
|
||||
</td>
|
||||
<td class="hworkList50 <%= score_color student_work.teacher_score%>">
|
||||
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||
</li>
|
||||
<li class="hworkList50 <%= score_color student_work.teaching_asistant_score%>">
|
||||
</td>
|
||||
<td class="hworkList50 <%= score_color student_work.teaching_asistant_score%>">
|
||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||
</li>
|
||||
</td>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<li class="hworkList50 <%= score_color student_work.system_score%>">
|
||||
<td class="hworkList50 <%= score_color student_work.system_score%>">
|
||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
</li>
|
||||
</td>
|
||||
<% end%>
|
||||
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<li class="hworkList50 <%= score_color student_work.student_score%> student_score_info">
|
||||
<td class="hworkList50 <%= score_color student_work.student_score%> student_score_info">
|
||||
<% if student_work.student_score.nil? %>
|
||||
<span title="该作品未被匿评">未参与</span>
|
||||
<% else %>
|
||||
|
@ -71,7 +69,7 @@
|
|||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
</td>
|
||||
<% end %>
|
||||
<!-- 成绩 -->
|
||||
<% if student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score %>
|
||||
|
@ -79,7 +77,7 @@
|
|||
<% else %>
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<% end %>
|
||||
<li class="hworkList50 <%= score_color score%> student_final_scor_info">
|
||||
<td class="hworkList50 <%= score_color score%> student_final_scor_info">
|
||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless score.nil?%>
|
||||
<div class="infoNi none width180">
|
||||
|
@ -97,9 +95,9 @@
|
|||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
$(".student_work_<%= student_work.id%>").mouseenter(function(){
|
||||
if($("#about_hwork_<%= student_work.id%>").html().trim() == "") {
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
<a name="<%= student_work.id%>"></a>
|
||||
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(student_work.user)) %>
|
||||
</li>
|
||||
<div class="student_work_<%= student_work.id%>">
|
||||
<li class="hworkName mt12 pr10 <%= @homework.homework_type == 2 ? '' : 'width130'%>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
|
||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
||||
<div>
|
||||
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
||||
</div>
|
||||
</li>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<%= student_work.user.show_name%>
|
||||
</li>
|
||||
<li class="<%=@homework.anonymous_comment == 1 ? 'hworkStID90' : 'hworkStID'%> pr10" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</li>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
|
||||
<li class="hworkPrName" title="项目名称">
|
||||
<%= link_to( student_work.project.name, project_path(student_work.project.id))%>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="hworkPrName" title="该项目是私有的">
|
||||
<%= student_work.project.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<% if student_work.created_at && @homework.end_time%>
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="hworkList50 <%= score_color student_work.teacher_score%>">
|
||||
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||
</li>
|
||||
<li class="hworkList50 <%= score_color student_work.teaching_asistant_score%>">
|
||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||
</li>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<li class="hworkList50 <%= score_color student_work.system_score%>">
|
||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<li class="hworkList50 <%= score_color student_work.student_score%> student_score_info">
|
||||
<% if student_work.student_score.nil? %>
|
||||
<span title="该作品未被匿评">未参与</span>
|
||||
<% else %>
|
||||
<%=format("%.1f",student_work.student_score) %>
|
||||
<% end %>
|
||||
<% unless student_work.student_score.nil?%>
|
||||
<span class="linkBlue">
|
||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>)
|
||||
</span>
|
||||
<div class="infoNi none">
|
||||
现共有
|
||||
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%> </span>
|
||||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<% end %>
|
||||
<!-- 成绩 -->
|
||||
<% if student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score %>
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : student_work.teacher_score %>
|
||||
<% else %>
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<% end %>
|
||||
<li class="hworkList50 <%= score_color score%> student_final_scor_info">
|
||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless score.nil?%>
|
||||
<div class="infoNi none width180">
|
||||
作品最终评分为
|
||||
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
||||
迟交扣分
|
||||
<span class="c_red">
|
||||
<%= student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score ? 0 : student_work.late_penalty %>
|
||||
</span>分,
|
||||
缺评扣分
|
||||
<span class="c_red">
|
||||
<%= student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score ? 0 : student_work.absence_penalty%>
|
||||
</span>分,
|
||||
最终成绩为
|
||||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
</ul>
|
|
@ -1,5 +1,5 @@
|
|||
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
||||
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<tr class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<% is_my_work = student_work.user == User.current%>
|
||||
<% else %>
|
||||
|
@ -8,81 +8,78 @@
|
|||
<% end %>
|
||||
|
||||
<% if is_my_work%>
|
||||
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<td class="hworkList30 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>
|
||||
<td class="hworkPortrait pr10 float-none">
|
||||
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40", style: "display:block;") %>
|
||||
</li>
|
||||
<li class="hworkName mt12 pr10 w250 student_work_<%= student_work.id%>">
|
||||
</td>
|
||||
<td class="hworkName pr10 w250 float-none student_work_<%= student_work.id%>">
|
||||
<div>
|
||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
||||
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
|
||||
</div>
|
||||
</li>
|
||||
<div class="student_work_<%= student_work.id%>">
|
||||
</td>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<li class="hworkStName w80" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<td class="hworkStName float-none w80 student_work_<%= student_work.id%>" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= student_work.user.show_name%>
|
||||
</li>
|
||||
<li class="hworkStID" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
</td>
|
||||
<td class="hworkStID float-none student_work_<%= student_work.id%>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</li>
|
||||
</td>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
|
||||
<li class="hworkPrName mr10 mt12" title="项目名称">
|
||||
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
|
||||
<td class="hworkPrName float-none mr10 student_work_<%= student_work.id%>" title="项目名称">
|
||||
<%= link_to( student_work.project.name, project_path(student_work.project.id))%>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="hworkPrName mr10 mt12" title="该项目是私有的">
|
||||
</td>
|
||||
<% else %>
|
||||
<td class="hworkPrName float-none mr10 student_work_<%= student_work.id%>" title="该项目是私有的">
|
||||
<%= student_work.project.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else%>
|
||||
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<td class="hworkList30 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>
|
||||
<td class="hworkPortrait float-none pr10">
|
||||
<%= image_tag(url_to_avatar(""),width:"40", height: "40", style: "display:block;") %>
|
||||
</li>
|
||||
<li class="hworkName mt12 pr10 w250 student_work_<%= student_work.id%>">
|
||||
</td>
|
||||
<td class="hworkName float-none pr10 w250 student_work_<%= student_work.id%>">
|
||||
<div>
|
||||
<%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
|
||||
</div>
|
||||
</li>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<li class="hworkStName w80" title="姓名" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
</td>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<td class="hworkStName float-none w80" title="姓名" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
匿名
|
||||
</li>
|
||||
<li class="hworkStID" title="学号">
|
||||
</td>
|
||||
<td class="hworkStID float-none" title="学号">
|
||||
--
|
||||
</li>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li class="hworkPrName mr10" title="项目名称" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
</td>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<td class="hworkPrName mr10 float-none" title="项目名称" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
匿名
|
||||
</li>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end%>
|
||||
|
||||
<li class="hworkList130 pl10 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<td class="hworkList130 pl10 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
|
||||
<!-- 成绩 -->
|
||||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<li class="hworkList50 <%= score_color student_work.system_score%>">
|
||||
<td class="hworkList50 <%= score_color student_work.system_score%>">
|
||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
</li>
|
||||
</td>
|
||||
<% end%>
|
||||
|
||||
<% my_score = student_work_score(student_work,User.current) %>
|
||||
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10 ml10">
|
||||
<td class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10 ml10">
|
||||
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
$(".student_work_<%= student_work.id%>").mouseenter(function(){
|
||||
$("#work_click_<%= student_work.id%>").show();
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<% is_my_work = student_work.user == User.current%>
|
||||
<% else %>
|
||||
<% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %>
|
||||
<% is_my_work = pro && pro.student_work_id == student_work.id%>
|
||||
<% end %>
|
||||
|
||||
<% if is_my_work%>
|
||||
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40", style: "display:block;") %>
|
||||
</li>
|
||||
<li class="hworkName mt12 pr10 w250 student_work_<%= student_work.id%>">
|
||||
<div>
|
||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
||||
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
|
||||
</div>
|
||||
</li>
|
||||
<div class="student_work_<%= student_work.id%>">
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<li class="hworkStName w80" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= student_work.user.show_name%>
|
||||
</li>
|
||||
<li class="hworkStID" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</li>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
|
||||
<li class="hworkPrName mr10 mt12" title="项目名称">
|
||||
<%= link_to( student_work.project.name, project_path(student_work.project.id))%>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="hworkPrName mr10 mt12" title="该项目是私有的">
|
||||
<%= student_work.project.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else%>
|
||||
<li class="hworkList30 ml5 mr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></li>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(""),width:"40", height: "40", style: "display:block;") %>
|
||||
</li>
|
||||
<li class="hworkName mt12 pr10 w250 student_work_<%= student_work.id%>">
|
||||
<div>
|
||||
<%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
|
||||
</div>
|
||||
</li>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<li class="hworkStName w80" title="姓名" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
匿名
|
||||
</li>
|
||||
<li class="hworkStID" title="学号">
|
||||
--
|
||||
</li>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li class="hworkPrName mr10" title="项目名称" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
匿名
|
||||
</li>
|
||||
<% end %>
|
||||
<% end%>
|
||||
|
||||
<li class="hworkList130 pl10 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<!-- 成绩 -->
|
||||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<li class="hworkList50 <%= score_color student_work.system_score%>">
|
||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
<% my_score = student_work_score(student_work,User.current) %>
|
||||
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10 ml10">
|
||||
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
</ul>
|
|
@ -1,123 +1,122 @@
|
|||
|
||||
<div class="show_hwork_arrow"></div>
|
||||
<div class="showHwork">
|
||||
<ul>
|
||||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time work.created_at %>
|
||||
</li>
|
||||
|
||||
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
|
||||
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
|
||||
<li class="fr" >
|
||||
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
|
||||
<div class="show_hwork_arrow"></div>
|
||||
<div class="showHwork">
|
||||
<ul>
|
||||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time work.created_at %>
|
||||
</li>
|
||||
<li class="fr" >
|
||||
<%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
|
||||
<!-- 匿评结束阶段,显示点赞按钮 -->
|
||||
<li class="fr" id="student_work_praise_<%= work.id%>">
|
||||
<%= render :partial => 'student_work_praise',:locals => {:work => work} %>
|
||||
</li>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
|
||||
<li >
|
||||
<span class="tit_fb ">编程代码:</span>
|
||||
<div class="showHworkP break_word"><pre id="work-src_<%= work.id%>" style="display: none;"><%= work.description if work.description%></pre><div class="fontGrey2 font_cus" id="work-code_<%= work.id%>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
|
||||
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
|
||||
<li class="fr" >
|
||||
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
|
||||
</li>
|
||||
<li class="fr" >
|
||||
<%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
|
||||
<!-- 匿评结束阶段,显示点赞按钮 -->
|
||||
<li class="fr" id="student_work_praise_<%= work.id%>">
|
||||
<%= render :partial => 'student_work_praise',:locals => {:work => work} %>
|
||||
</li>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
|
||||
<li class="mt10 fl">
|
||||
<span class="tit_fb ">
|
||||
测试结果:
|
||||
</span>
|
||||
<div class="show_hwork_p break_word">
|
||||
<% work.student_work_tests.each_with_index do |test, index| %>
|
||||
<div class="ProResultTop">
|
||||
<p class="c_blue fl">
|
||||
第<%= work.student_work_tests.count - index%>次测试
|
||||
</p>
|
||||
<span class="fr c_grey">
|
||||
<%= test.created_at.to_s(:db) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<li >
|
||||
<span class="tit_fb ">编程代码:</span>
|
||||
<div class="showHworkP break_word"><pre id="work-src_<%= work.id%>" style="display: none;"><%= work.description if work.description%></pre><div class="fontGrey2 font_cus" id="work-code_<%= work.id%>">
|
||||
</div>
|
||||
<% if test.status.to_i == -2 %>
|
||||
<div class="ProResultCon ">
|
||||
<%= test.results.first %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="ProResultTable " >
|
||||
<ul class="ProResultUl " >
|
||||
|
||||
<% test.results.reverse.each_with_index do |x, i| %>
|
||||
<% unless x.nil? %>
|
||||
<li >
|
||||
<span class="w60 T_C">测试<%=test.results.size-i%></span>
|
||||
<% if x["status"].to_i != 0 %>
|
||||
<% if x["status"].to_i == 2 %>
|
||||
<span class="w60 c_red">超时!</span>
|
||||
<% else %>
|
||||
<span class="w60 c_red">测试错误!</span>
|
||||
<% end %>
|
||||
<span class="w60">您的输出:</span>
|
||||
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["result"].force_encoding("UTF-8")%> </pre></span>
|
||||
<span class="w60">正确输出:</span>
|
||||
|
||||
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["output"].force_encoding("UTF-8")%></pre></span>
|
||||
<span class="w50">耗时:</span>
|
||||
<span class="w80"><pre><%=x["time_used"]==0?1:x["time_used"]%>毫秒</pre></span>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<span class="w60 c_green">测试正确!</span>
|
||||
<span style="width:360px;"> </span>
|
||||
<span class="w50">耗时:</span>
|
||||
<span class="w80"><pre><%=x["time_used"]==0?1:x["time_used"]%>毫秒</pre></span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
|
||||
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li class="mt10 fl">
|
||||
<span class="tit_fb ">
|
||||
测试结果:
|
||||
</span>
|
||||
<div class="show_hwork_p break_word">
|
||||
<% work.student_work_tests.each_with_index do |test, index| %>
|
||||
<div class="ProResultTop">
|
||||
<p class="c_blue fl">
|
||||
第<%= work.student_work_tests.count - index%>次测试
|
||||
</p>
|
||||
<span class="fr c_grey">
|
||||
<%= test.created_at.to_s(:db) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% if test.status.to_i == -2 %>
|
||||
<div class="ProResultCon ">
|
||||
<%= test.results.first %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="ProResultTable " >
|
||||
<ul class="ProResultUl " >
|
||||
|
||||
<% test.results.reverse.each_with_index do |x, i| %>
|
||||
<% unless x.nil? %>
|
||||
<li >
|
||||
<span class="w60 T_C">测试<%=test.results.size-i%></span>
|
||||
<% if x["status"].to_i != 0 %>
|
||||
<% if x["status"].to_i == 2 %>
|
||||
<span class="w60 c_red">超时!</span>
|
||||
<% else %>
|
||||
<span class="w60 c_red">测试错误!</span>
|
||||
<% end %>
|
||||
<span class="w60">您的输出:</span>
|
||||
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["result"].force_encoding("UTF-8")%> </pre></span>
|
||||
<span class="w60">正确输出:</span>
|
||||
|
||||
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["output"].force_encoding("UTF-8")%></pre></span>
|
||||
<span class="w50">耗时:</span>
|
||||
<span class="w80"><pre><%=x["time_used"]==0?1:x["time_used"]%>毫秒</pre></span>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<span class="w60 c_green">测试正确!</span>
|
||||
<span style="width:360px;"> </span>
|
||||
<span class="w50">耗时:</span>
|
||||
<span class="w80"><pre><%=x["time_used"]==0?1:x["time_used"]%>毫秒</pre></span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
|
||||
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="revise_attachment">
|
||||
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="revise_attachment">
|
||||
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%student_work_scores.each do |student_score|%>
|
||||
<div id="work_score_<%= student_score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!---ping_box end--->
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:auto; margin-right: auto; display:block; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%student_work_scores.each do |student_score|%>
|
||||
<div id="work_score_<%= student_score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!---ping_box end--->
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:auto; margin-right: auto; display:block; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
<% if defined?(is_focus) && is_focus.to_i == 1 %>
|
||||
|
|
|
@ -1,109 +1,109 @@
|
|||
<div class="show_hwork_arrow"></div>
|
||||
<div class="showHwork">
|
||||
<% is_teacher = User.current.allowed_to?(:as_teacher, @homework.course) || User.current.admin? %>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<% is_my_work = work.user == User.current%>
|
||||
<% else %>
|
||||
<% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %>
|
||||
<% is_my_work = pro && pro.student_work_id == work.id%>
|
||||
<% end %>
|
||||
<ul>
|
||||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time work.created_at %>
|
||||
</li>
|
||||
<div class="show_hwork_arrow"></div>
|
||||
<div class="showHwork">
|
||||
<% is_teacher = User.current.allowed_to?(:as_teacher, @homework.course) || User.current.admin? %>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<% is_my_work = work.user == User.current%>
|
||||
<% else %>
|
||||
<% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %>
|
||||
<% is_my_work = pro && pro.student_work_id == work.id%>
|
||||
<% end %>
|
||||
<ul>
|
||||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time work.created_at %>
|
||||
</li>
|
||||
|
||||
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
|
||||
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
|
||||
<li class="fr" >
|
||||
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del",:title=>"删除") %>
|
||||
</li>
|
||||
<li class="fr mr5" >
|
||||
<%= link_to "",edit_student_work_path(work),:class => "pic_edit",:title => "修改"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && !is_my_work %>
|
||||
<!-- 匿评结束阶段,显示点赞按钮 -->
|
||||
<li class="fr" id="student_work_praise_<%= work.id%>">
|
||||
<%= render :partial => 'student_work_praise',:locals => {:work => work} %>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
|
||||
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
|
||||
<li class="fr" >
|
||||
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del",:title=>"删除") %>
|
||||
</li>
|
||||
<li class="fr mr5" >
|
||||
<%= link_to "",edit_student_work_path(work),:class => "pic_edit",:title => "修改"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && !is_my_work %>
|
||||
<!-- 匿评结束阶段,显示点赞按钮 -->
|
||||
<li class="fr" id="student_work_praise_<%= work.id%>">
|
||||
<%= render :partial => 'student_work_praise',:locals => {:work => work} %>
|
||||
</li>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
|
||||
<!--<li ><span class="tit_fb"> 参与人员:</span>程梦雯 王强</li>-->
|
||||
|
||||
<% if @homework.homework_type == 3 && work.student_work_projects && (@homework.homework_detail_manual.comment_status != 2 || is_my_work || is_teacher ) %>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<span class="tit_fb"> 参与人员:</span>
|
||||
<%= link_to(work.user.show_name+"(组长)", user_path(work.user.id), :class => "linkBlue" )%>
|
||||
<% members = work.student_work_projects.where("is_leader = 0") %>
|
||||
<% members.each do |member| if !members.empty? %>
|
||||
、<%=link_to((User.find member.user_id).show_name, user_path(member.user.id), :class => "linkBlue" ) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li>
|
||||
<span class="tit_fb"> 关联项目:</span>
|
||||
<% if work.project.is_public || User.current.member_of?(work.project) || User.current.admin? %>
|
||||
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||
<% else %>
|
||||
<span title ="该项目是私有的"><%=work.project.name %></span>
|
||||
<% end %>
|
||||
<%#= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||
<span class="ml5">(综合评分:<font class="c_red"><%=work.project.project_score.score.to_i %></font>)</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end%>
|
||||
|
||||
<li >
|
||||
<span class="tit_fb ">内容:</span>
|
||||
<div class="showHworkP break_word upload_img" id="student_work_img_<%=work.id %>">
|
||||
<%= work.description.html_safe if work.description%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<span class="tit_fb"> 附件:</span>
|
||||
<% com_attachments = work.attachments.where("attachtype IS NULL OR attachtype <> 7") %>
|
||||
<% if com_attachments.empty?%>
|
||||
<span style="color: #999999">尚未提交附件</span>
|
||||
<% else%>
|
||||
<div class="fl" style="width: 90%;">
|
||||
<%= render :partial => 'work_attachments_status', :locals => {:attachments => com_attachments, :status => @homework.homework_detail_manual.comment_status} %>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && !is_my_work)%>
|
||||
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="revise_attachment">
|
||||
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<!--<li ><span class="tit_fb"> 参与人员:</span>程梦雯 王强</li>-->
|
||||
|
||||
<% if @homework.homework_type == 3 && work.student_work_projects && (@homework.homework_detail_manual.comment_status != 2 || is_my_work || is_teacher ) %>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<span class="tit_fb"> 参与人员:</span>
|
||||
<%= link_to(work.user.show_name+"(组长)", user_path(work.user.id), :class => "linkBlue" )%>
|
||||
<% members = work.student_work_projects.where("is_leader = 0") %>
|
||||
<% members.each do |member| if !members.empty? %>
|
||||
、<%=link_to((User.find member.user_id).show_name, user_path(member.user.id), :class => "linkBlue" ) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li>
|
||||
<span class="tit_fb"> 关联项目:</span>
|
||||
<% if work.project.is_public || User.current.member_of?(work.project) || User.current.admin? %>
|
||||
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||
<% else %>
|
||||
<span title ="该项目是私有的"><%=work.project.name %></span>
|
||||
<% end %>
|
||||
<%#= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||
<span class="ml5">(综合评分:<font class="c_red"><%=work.project.project_score.score.to_i %></font>)</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end%>
|
||||
|
||||
<li >
|
||||
<span class="tit_fb ">内容:</span>
|
||||
<div class="showHworkP break_word upload_img" id="student_work_img_<%=work.id %>">
|
||||
<%= work.description.html_safe if work.description%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<span class="tit_fb"> 附件:</span>
|
||||
<% com_attachments = work.attachments.where("attachtype IS NULL OR attachtype <> 7") %>
|
||||
<% if com_attachments.empty?%>
|
||||
<span style="color: #999999">尚未提交附件</span>
|
||||
<% else%>
|
||||
<div class="fl" style="width: 90%;">
|
||||
<%= render :partial => 'work_attachments_status', :locals => {:attachments => com_attachments, :status => @homework.homework_detail_manual.comment_status} %>
|
||||
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%student_work_scores.each do |student_score|%>
|
||||
<div id="work_score_<%= student_score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && !is_my_work)%>
|
||||
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="revise_attachment">
|
||||
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!---ping_box end--->
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:auto; margin-right: auto; display:block; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%student_work_scores.each do |student_score|%>
|
||||
<div id="work_score_<%= student_score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!---ping_box end--->
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:auto; margin-right: auto; display:block; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('student_work_img_<%=work.id %>');
|
||||
|
|
|
@ -37,17 +37,6 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% @stundet_works.each_with_index do |student_work, i|%>
|
||||
<% if @is_evaluation%>
|
||||
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i}%>
|
||||
<% else%>
|
||||
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i}%>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<div id="about_hwork_<%= student_work.id%>">
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
<% if !@is_evaluation && (!@is_teacher || params[:show_work_id].present?) || @message_student_work_id %>
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% user = User.find(reply.creator_id) %>
|
||||
|
@ -164,6 +165,7 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('intro_content_<%= @document.id %>');
|
||||
var replyCount = $(".homepagePostReplyContainer").size();
|
||||
if (replyCount >3){
|
||||
for(var i= 3; i < replyCount+1; i++){
|
||||
|
|
|
@ -321,6 +321,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
@ -179,4 +180,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="homepagePostIntro break_word upload_img maxh360 table_maxWidth " id="activity_description_<%= user_activity_id%>">
|
||||
<div id="intro_content_<%= user_activity_id%>">
|
||||
<%= content.to_s.html_safe%>
|
||||
<%= content.to_s.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
@ -13,6 +13,7 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('intro_content_<%= user_activity_id%>');
|
||||
description_show_hide(<%=user_activity_id %>);
|
||||
});
|
||||
</script>
|
|
@ -29,6 +29,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i + 1 %>
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -331,6 +331,7 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
|
|
|
@ -86,6 +86,12 @@
|
|||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% fetch_user_leaveWord_reply(activity).reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= user_activity_id %>');
|
||||
autoUrl('reply_content_<%= user_activity_id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_delete_<%= comment.id%>').show();" onmouseout="$('#message_delete_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
|
|
|
@ -407,9 +407,9 @@
|
|||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||
<% if ma.course_message.m_parent_id.nil? %>
|
||||
回复了您的作业:
|
||||
回复了您的<span class="fontBlue2" title="作业:<%=ma.course_message.jour.name %>">作业</span>:
|
||||
<% else %>
|
||||
回复了您:
|
||||
在<span class="fontBlue2" title="作业:<%=ma.course_message.jour.name %>">作业</span>中回复了您:
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
|
|
|
@ -2137,6 +2137,7 @@ zh:
|
|||
label_notice_comment_template: 您的课程通知有新回复了
|
||||
label_news_comment_template: 您的项目新闻有新回复了
|
||||
label_homework_comment_template: 您的作业有新回复了
|
||||
label_new_second_comment_template: 您有新回复了
|
||||
label_new_journals_template: 您有新留言了
|
||||
label_journals_comment_template: 您的留言有新回复了
|
||||
label_blog_comment_template: 您的博客有新回复了
|
||||
|
|
|
@ -1317,3 +1317,54 @@ function pop_up_box(value,tWidth,tTop,tLeft){
|
|||
}
|
||||
|
||||
|
||||
//yk 自动识别URL 并加上链接
|
||||
//var strRegex = '((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?';
|
||||
|
||||
function autoUrl(id){
|
||||
if ($("#"+id).children().length > 0 ){
|
||||
$("#"+id+" p,#"+ id +" span,#"+id+" em,#"+id+" h1,#"+id+" h2,#"+id+" h3,#"+id+" h4,#"+id+" strong,#"+id+" b,#"+id+" font,#"+id+" i").each(function(){
|
||||
if ($(this).children().length == 0){
|
||||
var html = $(this).text(); //.replace(/(^\s*)|(\s*$)/g, "")
|
||||
console.log("html="+html);
|
||||
// var re=new RegExp(strRegex,"g");
|
||||
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
|
||||
//没有://的都加上http://
|
||||
var reStr = full;
|
||||
if (full.length > 0){
|
||||
if (full.indexOf("://") >= 0){
|
||||
reStr = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
|
||||
}
|
||||
else{
|
||||
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
|
||||
}
|
||||
console.log("reStr="+reStr);
|
||||
}
|
||||
return reStr ;
|
||||
});
|
||||
$(this).html(html);
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
var html = $("#"+id).text(); //.replace(/(^\s*)|(\s*$)/g, "")
|
||||
console.log("!!!!html="+html);
|
||||
// var re=new RegExp(strRegex,"g");
|
||||
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
|
||||
//没有://的都加上http://
|
||||
var reStr = full;
|
||||
if (full.length > 0){
|
||||
if (full.indexOf("://") >= 0){
|
||||
reStr = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
|
||||
}
|
||||
else{
|
||||
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
|
||||
}
|
||||
console.log("reStr="+reStr);
|
||||
}
|
||||
return reStr ;
|
||||
});
|
||||
$("#"+id).html(html);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -101,6 +101,10 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
|
|||
.mt16{margin-top: 16px;}
|
||||
.pr10{padding-right: 10px;}
|
||||
|
||||
/*20160520作品列表table*/
|
||||
.hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle;}
|
||||
.hwork-table-wrap th {font-size:14px; color:#2d2d2d;}
|
||||
|
||||
/*作业信息*/
|
||||
.mt-2 {margin-top:-2px;}
|
||||
.homeworkInfo {background:#F6F6F6; padding:10px; margin-bottom:10px;}
|
||||
|
|
|
@ -672,6 +672,7 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostDes {float:left; width:655px; margin-left:15px; overflow:hidden;}
|
||||
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
|
||||
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
|
||||
.homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
|
||||
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
|
||||
.homepagePostSubmit:hover {background-color:#d8d8d8;}
|
||||
|
@ -681,10 +682,9 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
|
||||
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
|
||||
|
||||
.borderBottomNone {border-bottom:none !important;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
|
||||
.borderBottomNone {border-bottom:none !important;}
|
||||
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
|
||||
.borderBottomNone {border-bottom:none !important;}
|
||||
.topBorder {border-top: 1px solid #e4e4e4;}
|
||||
|
@ -721,6 +721,7 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
|
|||
.homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family:"微软雅黑","宋体";}
|
||||
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
|
||||
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
|
||||
|
@ -864,7 +865,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
|
|||
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
|
||||
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
|
@ -1456,7 +1457,7 @@ span.at a{color:#269ac9;text-decoration: none;}
|
|||
.pic_edit2:hover{display:inline-block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;}
|
||||
.w70{ width:70px;}
|
||||
.w80{ width:80px;}
|
||||
.label03{ width:70px; text-align:right; display:block; float:left;}
|
||||
.label03{ width:70px; text-align:right; display:block; float:left;white-space: nowrap;}
|
||||
.pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ a:hover.st_add{ color:#ff8e15;}
|
|||
.newpro_box select{ height:29px; float:left; margin-bottom:10px;}
|
||||
/*.label{ width:80px; text-align:right; font-size:14 background-image: url(../images/true.png); }*/
|
||||
.label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;}
|
||||
.label03{ width:70px; text-align:right; display:block; float:left;}
|
||||
.label03{ width:70px; text-align:right; display:block; float:left;white-space: nowrap;}
|
||||
.collapsible{ border-left:none;border-right:none;border-bottom:none; border-top:1px solid #e4e4e4; padding-top:10px; }
|
||||
.icon-reload { background-image: url(../images/reload.png); }
|
||||
.icon {
|
||||
|
@ -1240,4 +1240,4 @@ a.pages-big{ width:50px;}
|
|||
.pages{width:330px; margin:20px auto 10px;}
|
||||
|
||||
.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
|
|
|
@ -48,6 +48,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.fr{float:right;display:inline;}
|
||||
.f_l{ float:left;}
|
||||
.f_r{ float:right;}
|
||||
.float-none {float:none !important;}
|
||||
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
|
||||
.clearfix{clear:both;zoom:1}
|
||||
.break_word{ word-break:break-all; word-wrap: break-word;}
|
||||
|
@ -136,6 +137,8 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.pl10 {padding-left:10px;}
|
||||
.pl15{ padding-left:15px;}
|
||||
.pl5{ padding-left:5px;}
|
||||
.pr5 {padding-right:5px;}
|
||||
.pr10 {padding-right:10px;}
|
||||
.pt5{ padding-top:5px;}
|
||||
.pt10{ padding-top:10px;}
|
||||
.pb5{ padding-bottom: 5px;}
|
||||
|
|
Loading…
Reference in New Issue