commit
7c98e0f392
@ -1,3 +1,4 @@
|
|||||||
class ApplyAddSchools < ActiveRecord::Base
|
class ApplyAddSchools < ActiveRecord::Base
|
||||||
attr_accessible :address, :city, :name, :province, :remarks, :school_id, :status
|
attr_accessible :address, :city, :name, :province, :remarks, :school_id, :status
|
||||||
|
belongs_to :school
|
||||||
end
|
end
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
class SonarError < ActiveRecord::Base
|
||||||
|
attr_accessible :jenkins_job_name, :output, :project_id
|
||||||
|
end
|
@ -0,0 +1,30 @@
|
|||||||
|
<td style="text-align: center;">
|
||||||
|
<%= course.id %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=course.name%>'>
|
||||||
|
<span>
|
||||||
|
<%= link_to(course.name, course_path(course.id)) %>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= course.class_period %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= checked_image course.is_public? %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(course.created_at) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= course.updated_at.strftime('%Y-%m-%d %H:%M:%S') %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option(course.teacher),course.syllabus_id), {:id=>"new_syllabus_id_#{course.id}", :class=>"course_syllabus_input", :onchange=>"select_syllabus(#{course.id});"}%>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<a href="javascript:void(0)" onclick="alert_new_syllabus(<%=course.id %>, 0)">新建课程</a>
|
||||||
|
<%#= link_to "新建课程", admin_create_syllabus_path%>
|
||||||
|
</td>
|
@ -0,0 +1,7 @@
|
|||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><%= link_to '课程列表', {:action => 'syllabuses'}, class: "#{current_page?(all_syllabuses_path)? 'selected' : nil }" %></li>
|
||||||
|
<li><%= link_to '全部班级列表', {:action => 'courses'}, class: "#{current_page?(all_courses_path)? 'selected' : nil }" %></li>
|
||||||
|
<li><%= link_to '未配置班级列表', {:action => 'non_syllabus_courses'}, class: "#{current_page?(non_syllabus_courses_path)? 'selected' : nil }" %></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
@ -0,0 +1,10 @@
|
|||||||
|
hideModal();
|
||||||
|
<%courses = Course.where("tea_id = #{@user.id}") %>
|
||||||
|
<% unless courses.empty? %>
|
||||||
|
<% courses.each do |course|%>
|
||||||
|
$("#course_<%=course.id %>").html("<%=escape_javascript(render :partial => 'courselist_detail_tr', :locals => {:course => course}) %>");
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if @flag == 1 %>
|
||||||
|
$("#course_<%=@course.id %>").html("");
|
||||||
|
<% end %>
|
@ -0,0 +1,164 @@
|
|||||||
|
<div class="contextual">
|
||||||
|
<%= link_to l(:label_course_new), {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>
|
||||||
|
未配置班级列表
|
||||||
|
</h3>
|
||||||
|
<%= render 'tab_syllabuses_courses' %>
|
||||||
|
|
||||||
|
<h3>
|
||||||
|
未配置班级列表
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<%= form_tag({}, :method => :get) do %>
|
||||||
|
<fieldset>
|
||||||
|
<label for='name'>
|
||||||
|
班级:
|
||||||
|
</label>
|
||||||
|
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder => '班级、老师名称' %>
|
||||||
|
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||||
|
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'non_syllabus_courses'}, :class => 'icon icon-reload' %>
|
||||||
|
</fieldset>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 85px;">
|
||||||
|
班级
|
||||||
|
</th>
|
||||||
|
<th style="width: 35px;">
|
||||||
|
主讲老师
|
||||||
|
</th>
|
||||||
|
<th style="width: 20px;">
|
||||||
|
学时
|
||||||
|
</th>
|
||||||
|
<th style="width: 15px;">
|
||||||
|
<%=l(:field_is_public)%>
|
||||||
|
</th>
|
||||||
|
<th style="width: 45px;">
|
||||||
|
<%=l(:field_created_on)%>
|
||||||
|
</th>
|
||||||
|
<th style="width: 45px;">
|
||||||
|
动态时间
|
||||||
|
</th>
|
||||||
|
<th style="width:75px">
|
||||||
|
课程
|
||||||
|
</th>
|
||||||
|
<th style="width:35px">
|
||||||
|
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @courses.each do |course| %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>" id="course_<%=course.id %>">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= course.id %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=course.name%>'>
|
||||||
|
<span>
|
||||||
|
<a title="<%=course.name %>" id="rename_course_name_<%=course.id %>" ondblclick="rename_course_name($(this),'<%=course.name %>','<%=course.id %>');"><%= course.name%></a>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= course.class_period %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= checked_image course.is_public? %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(course.created_at) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= course.updated_at.strftime('%Y-%m-%d %H:%M:%S') %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option(course.teacher),course.syllabus_id), {:id=>"new_syllabus_id_#{course.id}", :class=>"course_syllabus_input", :onchange=>"select_syllabus(#{course.id});"}%>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<a href="javascript:void(0)" onclick="alert_new_syllabus(<%=course.id %>, 1)">新建课程</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var tagNameHtml; //当前双击的链接的父节点的html
|
||||||
|
var parentCssBorder; //当前双击的链接的父节点
|
||||||
|
var ele; //当前双击的链接
|
||||||
|
var tagId; //班级的id
|
||||||
|
var tagName; //班级名称
|
||||||
|
|
||||||
|
function rename_course_name(domEle,name,id){
|
||||||
|
isdb = true; //这是双击
|
||||||
|
//clearTimeout(clickFunction);
|
||||||
|
if (domEle.children().get(0) != undefined) { //已经是编辑框的情况下不要动
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tagNameHtml = domEle.parent().html();
|
||||||
|
parentCssBorder = domEle.parent().css("border");
|
||||||
|
ele = domEle;
|
||||||
|
tagId = id;
|
||||||
|
tagName = name;
|
||||||
|
domEle.html('<input name="" id="renameCourseName" maxlength="120" minlength="1" style="width:125px;" value="' + name + '"/>');
|
||||||
|
domEle.parent().css("border", "1px solid #ffffff");
|
||||||
|
$("#renameCourseName").focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
$("#renameCourseName").live("blur",function(){
|
||||||
|
updateCourseName();
|
||||||
|
}).live("keypress",function(e){
|
||||||
|
if (e.keyCode == '13') {
|
||||||
|
updateCourseName();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//执行修改courseName方法
|
||||||
|
function updateCourseName(){
|
||||||
|
if(isdb){
|
||||||
|
isdb = false;
|
||||||
|
if($("#renameCourseName").val() == tagName){ //如果值一样,则恢复原来的状态
|
||||||
|
ele.parent().css("border","");
|
||||||
|
ele.parent().html(tagNameHtml);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$.post(
|
||||||
|
'<%= admin_update_course_name_path %>',
|
||||||
|
{"course_id": tagId, "name": $("#renameCourseName").val().trim()}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function select_syllabus(id){
|
||||||
|
val = $("#new_syllabus_id_"+id).children('option:selected').val();
|
||||||
|
if(val != "0") {
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/admin/select_course_syllabus",
|
||||||
|
data: {syllabus_id: val,
|
||||||
|
course_id: id},
|
||||||
|
success: function (data) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<% html_title(l(:label_course_all)) -%>
|
@ -0,0 +1,142 @@
|
|||||||
|
<h3>
|
||||||
|
课程列表
|
||||||
|
</h3>
|
||||||
|
<%= render 'tab_syllabuses_courses' %>
|
||||||
|
|
||||||
|
<h3>
|
||||||
|
课程列表
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<%= form_tag({}, :method => :get) do %>
|
||||||
|
<fieldset>
|
||||||
|
<label for='name'>
|
||||||
|
课程:
|
||||||
|
</label>
|
||||||
|
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder => '课程名称' %>
|
||||||
|
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||||
|
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'syllabuses'}, :class => 'icon icon-reload' %>
|
||||||
|
</fieldset>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 85px;">
|
||||||
|
课程名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 85px;">
|
||||||
|
班级名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 35px;">
|
||||||
|
创建老师
|
||||||
|
</th>
|
||||||
|
<th style="width: 60px;">
|
||||||
|
<%=l(:field_created_on)%>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @syllabuses.each do |syllabus| %>
|
||||||
|
<tr class="odd">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= syllabus.id %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=syllabus.title%>'>
|
||||||
|
<span>
|
||||||
|
<%= link_to(syllabus.title, syllabus_path(syllabus.id)) %>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= link_to(syllabus.try(:user).try(:realname).truncate(6, omission: '...'), user_path(syllabus.user)) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(syllabus.created_at) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% courses = syllabus.courses %>
|
||||||
|
<% courses.each do |course| %>
|
||||||
|
<tr class="even">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= course.id %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=course.name%>'>
|
||||||
|
<span>
|
||||||
|
<a title="<%=course.name %>" id="rename_course_name_<%=course.id %>" ondblclick="rename_course_name($(this),'<%=course.name %>','<%=course.id %>');"><%= course.name%></a>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(course.created_at) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var tagNameHtml; //当前双击的链接的父节点的html
|
||||||
|
var parentCssBorder; //当前双击的链接的父节点
|
||||||
|
var ele; //当前双击的链接
|
||||||
|
var tagId; //班级的id
|
||||||
|
var tagName; //班级名称
|
||||||
|
|
||||||
|
function rename_course_name(domEle,name,id){
|
||||||
|
isdb = true; //这是双击
|
||||||
|
//clearTimeout(clickFunction);
|
||||||
|
if (domEle.children().get(0) != undefined) { //已经是编辑框的情况下不要动
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tagNameHtml = domEle.parent().html();
|
||||||
|
parentCssBorder = domEle.parent().css("border");
|
||||||
|
ele = domEle;
|
||||||
|
tagId = id;
|
||||||
|
tagName = name;
|
||||||
|
domEle.html('<input name="" id="renameCourseName" maxlength="120" minlength="1" style="width:125px;" value="' + name + '"/>');
|
||||||
|
domEle.parent().css("border", "1px solid #ffffff");
|
||||||
|
$("#renameCourseName").focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
$("#renameCourseName").live("blur",function(){
|
||||||
|
updateCourseName();
|
||||||
|
}).live("keypress",function(e){
|
||||||
|
if (e.keyCode == '13') {
|
||||||
|
updateCourseName();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//执行修改TAGName方法
|
||||||
|
function updateCourseName(){
|
||||||
|
if(isdb){
|
||||||
|
isdb = false;
|
||||||
|
if($("#renameCourseName").val() == tagName){ //如果值一样,则恢复原来的状态
|
||||||
|
ele.parent().css("border","");
|
||||||
|
ele.parent().html(tagNameHtml);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$.post(
|
||||||
|
'<%= admin_update_course_name_path %>',
|
||||||
|
{"course_id": tagId, "name": $("#renameCourseName").val().trim()}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1 @@
|
|||||||
|
$("#rename_course_name_<%=@course.id %>").html("<%=@course.name %>");
|
@ -0,0 +1,5 @@
|
|||||||
|
<span style="word-break: normal; word-wrap: break-word;"><%=@syllabus.title %></span>
|
||||||
|
|
||||||
|
<% if User.current == syllabus.user %>
|
||||||
|
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_title_png", :class => "none", :onclick => "show_edit_title();"%>
|
||||||
|
<% end %>
|
@ -0,0 +1,8 @@
|
|||||||
|
<%if @project%>
|
||||||
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
||||||
|
<%elsif @course%>
|
||||||
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
||||||
|
<% elsif @org_subfield %>
|
||||||
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
|
<%end%>
|
||||||
|
sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity");
|
@ -1,9 +1,11 @@
|
|||||||
<% if @current_build_status == "success" %>
|
<div class="project_r_h">
|
||||||
<%= render :partial => "show", :locals => {:branch => params[:branch]} %>
|
<h2 class="project_h2" style="width:180px;">质量分析</h2>
|
||||||
<% else %>
|
</div>
|
||||||
<% if @build_console_result %>
|
<div>
|
||||||
运行结果超时
|
<div class="c_red">本次分析失败,原因如下:</div>
|
||||||
<% else %>
|
<% if @build_console_result == false %>
|
||||||
<%= render :partial => "console_output" %>
|
分析超时
|
||||||
<% end %>
|
<% else %>
|
||||||
<% end %>
|
<%= h @sonar_error.to_json %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
@ -0,0 +1,11 @@
|
|||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h2" style="width:180px;">质量分析</h2>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="c_red">本次分析失败,原因如下:</div>
|
||||||
|
<% if @build_console_result == false %>
|
||||||
|
分析超时
|
||||||
|
<% else %>
|
||||||
|
<%= h @error_list.output %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
@ -0,0 +1,48 @@
|
|||||||
|
<tr class="b_grey hworkH30">
|
||||||
|
<th class="hworkList40 hworkH30 pl5 pr5">序号</th>
|
||||||
|
<th class="hworkList50"> </th>
|
||||||
|
<th class="<%= @homework.anonymous_comment == 1 ? 'hworkList130' : 'hworkList100' %> pl5 pr5 hide-text">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="<%= @homework.anonymous_comment == 1 ? 'hworkList130' : 'hworkList90' %> pl5 pr5 hide-text">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<% end %>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
</tr>
|
@ -0,0 +1,79 @@
|
|||||||
|
<tr class="hworkListRow" id="student_work_<%= student_work.id %>">
|
||||||
|
<td class="none"><a name="<%= student_work.id %>"></a></td>
|
||||||
|
<td class="hworkList40 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)) %>
|
||||||
|
</td>
|
||||||
|
<td class="<%= @homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStName100' %> pr10 float-none 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 %>
|
||||||
|
</td>
|
||||||
|
<td class="<%= @homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStID90' %> 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;">
|
||||||
|
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
|
||||||
|
</td>
|
||||||
|
<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 %>
|
||||||
|
</td>
|
||||||
|
<td class="hworkList70 <%= score_color student_work.teacher_score %>">
|
||||||
|
<%= student_work.teacher_score.nil? ? "--" : format("%.1f", student_work.teacher_score) %>
|
||||||
|
</td>
|
||||||
|
<td class="hworkList70 <%= score_color student_work.teaching_asistant_score %>">
|
||||||
|
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f", student_work.teaching_asistant_score) %>
|
||||||
|
</td>
|
||||||
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
|
<td class="hworkList70 <%= 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 %>
|
||||||
|
</td>
|
||||||
|
<% 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 %>
|
||||||
|
<td class="hworkList70 <%= 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 %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="position:relative;">
|
||||||
|
<div class="hworkTip" style="display: none" id="work_click_<%= student_work.id %>">
|
||||||
|
<em></em><span></span><font class="fontGrey2">点击查看详情</font></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
@ -0,0 +1,44 @@
|
|||||||
|
<tr class="b_grey hworkH30">
|
||||||
|
<th class="hworkList40 hworkH30 pl5 pr5">序号</th>
|
||||||
|
<th class="hworkList50"> </th>
|
||||||
|
<% if @homework.homework_detail_group.base_on_project == 1 %>
|
||||||
|
<th class="hworkList130 pl5 pr5" style="text-align:left;">组长</th>
|
||||||
|
<th class="<%= @homework.anonymous_comment == 1 ? 'hworkList140' : 'hworkList70' %>">
|
||||||
|
<span class="c_dark f14 fb">关联项目</span>
|
||||||
|
</th>
|
||||||
|
<% elsif @homework.homework_detail_group.base_on_project == 0 %>
|
||||||
|
<th class="<%= @homework.anonymous_comment == 1 ? 'hworkList270' : 'hworkList200' %> pl5 pr5" style="text-align:left;">组长</th>
|
||||||
|
<% end %>
|
||||||
|
<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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<% end %>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
</tr>
|
@ -0,0 +1,89 @@
|
|||||||
|
<tr class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||||
|
<td class="none"><a name="<%= student_work.id%>"></a></td>
|
||||||
|
<td class="hworkList40 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)) %>
|
||||||
|
</td>
|
||||||
|
<% if @homework.homework_detail_group.base_on_project == 1 %>
|
||||||
|
<td class="hworkName float-none pr10 student_work_<%= student_work.id%> width130" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
|
||||||
|
<div>
|
||||||
|
<%= link_to student_work.user.show_name,"javascript:void(0)" ,:title => student_work.user.show_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
|
||||||
|
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkPrName2' : 'hworkPrName'%> student_work_<%= student_work.id%>" title="项目名称">
|
||||||
|
<%= link_to( student_work.project.name, project_path(student_work.project.id))%>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkPrName2' : 'hworkPrName'%> student_work_<%= student_work.id%>" title="该项目是私有的">
|
||||||
|
<%= student_work.project.name %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
<% elsif @homework.homework_detail_group.base_on_project == 0 %>
|
||||||
|
<td class="hworkName float-none pr10 student_work_<%= student_work.id%> <%=@homework.anonymous_comment == 1 ? 'width280' : 'width210' %>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
|
||||||
|
<div>
|
||||||
|
<%= link_to student_work.user.show_name,"javascript:void(0)" ,:title => student_work.user.show_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
<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 %>
|
||||||
|
</td>
|
||||||
|
<td class="hworkList70 <%= score_color student_work.teacher_score%>">
|
||||||
|
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||||
|
</td>
|
||||||
|
<td class="hworkList70 <%= score_color student_work.teaching_asistant_score%>">
|
||||||
|
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||||
|
</td>
|
||||||
|
<% if @homework.anonymous_comment == 0%>
|
||||||
|
<td class="hworkList70 <%= 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%>
|
||||||
|
</td>
|
||||||
|
<% 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 %>
|
||||||
|
<td class="hworkList70 <%= 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%>
|
||||||
|
</td>
|
||||||
|
<td><div style="position:relative;"><div class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></div></div></td>
|
||||||
|
</tr>
|
@ -0,0 +1,55 @@
|
|||||||
|
<tr class="b_grey hworkH30">
|
||||||
|
<th class="hworkList40 hworkH30 pl5 pr5">序号</th>
|
||||||
|
<th class="hworkList50"> </th>
|
||||||
|
<th class="<%= @homework.anonymous_comment == 1 ? 'hworkList110' : 'hworkList60' %> pl5 pr5 hide-text">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="<%= @homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList80' %> pl5 pr5 hide-text">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
|
||||||
|
<th class="hworkList110">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<% end %>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
</tr>
|
@ -0,0 +1,83 @@
|
|||||||
|
<tr class="hworkListRow" id="student_work_<%= student_work.id %>">
|
||||||
|
<td class="none"><a name="<%= student_work.id %>"></a></td>
|
||||||
|
<td class="hworkList40 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)) %>
|
||||||
|
</td>
|
||||||
|
<td class="<%= @homework.anonymous_comment == 1 ? 'hworkStName110' : 'hworkStName' %> pr10 float-none 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 %>
|
||||||
|
</td>
|
||||||
|
<td class="<%= @homework.anonymous_comment == 1 ? 'hworkStID100' : '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;">
|
||||||
|
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
|
||||||
|
</td>
|
||||||
|
<td class="hworkList110 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 %>
|
||||||
|
</td>
|
||||||
|
<td class="hworkList70 <%= score_color student_work.teacher_score %>">
|
||||||
|
<%= student_work.teacher_score.nil? ? "--" : format("%.1f", student_work.teacher_score) %>
|
||||||
|
</td>
|
||||||
|
<td class="hworkList70 <%= score_color student_work.teaching_asistant_score %>">
|
||||||
|
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f", student_work.teaching_asistant_score) %>
|
||||||
|
</td>
|
||||||
|
<!-- 系统评分 -->
|
||||||
|
<td class="hworkList70 <%= score_color student_work.system_score %>">
|
||||||
|
<%= student_work.system_score.nil? ? "--" : format("%.1f", student_work.system_score) %>
|
||||||
|
</td>
|
||||||
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
|
<td class="hworkList70 <%= 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 %>
|
||||||
|
</td>
|
||||||
|
<% 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 %>
|
||||||
|
<td class="hworkList70 <%= 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 %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="position:relative;">
|
||||||
|
<div class="hworkTip" style="display: none" id="work_click_<%= student_work.id %>">
|
||||||
|
<em></em><span></span><font class="fontGrey2">点击查看详情</font></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
@ -1,77 +1,86 @@
|
|||||||
<table class="hwork-table-wrap" id="homework_table">
|
<table class="hwork-table-wrap" id="homework_table">
|
||||||
<tr class="b_grey hworkH30">
|
<%# if @homework.homework_type == 1 %>
|
||||||
<th class="hworkList30 hworkH30 pl5 pr5">序号</th>
|
<%#= render :partial => 'evaluation_un_common_title' %>
|
||||||
<th class="hworkList50"> </th>
|
<%# elsif @homework.homework_type == 2 %>
|
||||||
<% if @homework.homework_type != 3 %>
|
<%#= render :partial => 'evaluation_un_pro_title' %>
|
||||||
<th class="<%= @homework.homework_type == 2 ? 'hworkList80 pl5 pr5 hide-text' : 'hworkList130 pl5 pr5 hide-text'%>" style="text-align:left;">作品名称</th>
|
<%# elsif @homework.homework_type == 3 %>
|
||||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> pl5 pr5 hide-text">
|
<%#= render :partial => 'evaluation_un_group_title' %>
|
||||||
<%= 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" ,:remote => true%>
|
<%# else %>
|
||||||
<% if @show_all && @order == "lastname"%>
|
<tr class="b_grey hworkH30">
|
||||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none" ,:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
<th class="hworkList40 hworkH30 pl5 pr5">序号</th>
|
||||||
<% end%>
|
<th class="hworkList50"> </th>
|
||||||
</th>
|
<% if @homework.homework_type != 3 %>
|
||||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList90' : 'hworkList80'%> pl5 pr5 hide-text">
|
<th class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkList130' : 'hworkList100') : (@homework.anonymous_comment == 1 ? 'hworkList110' : 'hworkList60') %> pl5 pr5 hide-text">
|
||||||
<%= 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" ,:remote => true%>
|
<%= 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", :remote => true %>
|
||||||
<% if @show_all && @order == "student_id"%>
|
<% if @show_all && @order == "lastname" %>
|
||||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none" ,:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
<%= link_to "", student_work_index_path(:homework => @homework.id, :order => "lastname", :sort => @score, :name => @name, :group => @group), :class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
<% end%>
|
<% end %>
|
||||||
</th>
|
</th>
|
||||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
<th class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkList130' : 'hworkList90') : (@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList80') %> pl5 pr5 hide-text">
|
||||||
<th class="hworkList130 pl5 pr5" style="text-align:left;">作品名称</th>
|
<%= 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", :remote => true %>
|
||||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList210' : 'hworkList160'%>">
|
<% if @show_all && @order == "student_id" %>
|
||||||
<span class="c_dark f14 fb">关联项目</span>
|
<%= link_to "", student_work_index_path(:homework => @homework.id, :order => "student_id", :sort => @score, :name => @name, :group => @group), :class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<% else %>
|
||||||
|
<% if @homework.homework_detail_group.base_on_project == 1 %>
|
||||||
|
<th class="hworkList130 pl5 pr5" style="text-align:left;">组长</th>
|
||||||
|
<th class="<%= @homework.anonymous_comment == 1 ? 'hworkList140' : 'hworkList70' %>">
|
||||||
|
<span class="c_dark f14 fb">关联项目</span>
|
||||||
|
</th>
|
||||||
|
<% elsif @homework.homework_detail_group.base_on_project == 0 %>
|
||||||
|
<th class="<%= @homework.anonymous_comment == 1 ? 'hworkList270' : 'hworkList200' %> pl5 pr5" style="text-align:left;">组长</th>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<th class="<%= @homework.homework_type ==2 ? 'hworkList110' : 'hworkList130' %>">
|
||||||
|
<%= link_to "状态", @show_all ? student_work_index_path(:homework => @homework.id, :order => "work_status", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)", :class => "c_dark f14 fb", :remote => true %>
|
||||||
|
<% if @show_all && @order == "work_status" %>
|
||||||
|
<%= link_to "", student_work_index_path(:homework => @homework.id, :order => "work_status", :sort => @score, :name => @name, :group => @group), :class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
</th>
|
</th>
|
||||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %>
|
<th class="hworkList70">
|
||||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList340' : 'hworkList290' %> pl5 pr5" style="text-align:left;">作品名称</th>
|
<%= 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", :remote => true %>
|
||||||
<% end %>
|
<% if @show_all && @order == "teacher_score" %>
|
||||||
<th class="hworkList130">
|
<%= link_to "", student_work_index_path(:homework => @homework.id, :order => "teacher_score", :sort => @score, :name => @name, :group => @group), :class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
<%= 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" ,:remote => true%>
|
<% end %>
|
||||||
<% 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' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",: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" ,: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' ? 'sort_up' : 'sort_down'} float-none" ,:style => "line-height:30px; vertical-align:middle;",: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",: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' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",: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",: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' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
|
||||||
<% end%>
|
|
||||||
</th>
|
</th>
|
||||||
<% end%>
|
<th class="hworkList70">
|
||||||
<% if @homework.anonymous_comment == 0%>
|
<%= 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", :remote => true %>
|
||||||
<th class="hworkList50">
|
<% if @show_all && @order == "teaching_asistant_score" %>
|
||||||
<%= 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",:remote => true%>
|
<%= link_to "", student_work_index_path(:homework => @homework.id, :order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group), :class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
<% if @show_all && @order == "student_score"%>
|
<% end %>
|
||||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
|
||||||
<% end%>
|
|
||||||
</th>
|
</th>
|
||||||
<% end %>
|
<% if @homework.homework_type == 2 %>
|
||||||
<th class="hworkList50">
|
<th class="hworkList70">
|
||||||
<%= 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",:remote => true%>
|
<%= 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", :remote => true %>
|
||||||
<% if @show_all && @order == "score"%>
|
<% if @show_all && @order == "system_score" %>
|
||||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
<%= link_to "", student_work_index_path(:homework => @homework.id, :order => "system_score", :sort => @score, :name => @name, :group => @group), :class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
<% end%>
|
<% end %>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
<% end %>
|
||||||
<% @stundet_works.each_with_index do |student_work, i|%>
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i}%>
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
<% end %>
|
||||||
|
<th class="hworkList70">
|
||||||
|
<%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<%# end %>
|
||||||
|
<% @stundet_works.each_with_index do |student_work, i| %>
|
||||||
|
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i} %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="12">
|
<td colspan="12">
|
||||||
<div id="about_hwork_<%= student_work.id%>">
|
<div id="about_hwork_<%= student_work.id %>">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end%>
|
<% end %>
|
||||||
</table>
|
</table>
|
@ -0,0 +1,3 @@
|
|||||||
|
$("#syllabus_title_show").html("<%= escape_javascript render :partial => 'layouts/syllabus_title', :locals => {:syllabus => @syllabus} %>");
|
||||||
|
$("#syllabus_title_show").show();
|
||||||
|
$("#syllabus_title_edit").hide();
|
@ -1,9 +1,9 @@
|
|||||||
<div class="orig_user fl">
|
<div class="orig_user fl">
|
||||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_right fl">
|
<div class="orig_right fl">
|
||||||
<%= link_to comment.user.show_name, user_path(comment.user_id), :class => "content-username" %>
|
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %>
|
||||||
<span class="orig_area"><%= time_from_now(comment.created_on) %></span>
|
<span class="orig_area"><%= time_from_now(comment.created_on) %></span>
|
||||||
<div class="orig_content "><%= comment.notes.html_safe %></div>
|
<div class="orig_content "><%= comment.content_detail.html_safe %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
@ -0,0 +1,23 @@
|
|||||||
|
<% parents_rely = [] %>
|
||||||
|
<% parents_rely = get_reply_parents_no_root parents_rely, comment %>
|
||||||
|
<% length = parents_rely.length %>
|
||||||
|
<div id="comment_reply_<%=comment.id %>">
|
||||||
|
<% if length <= 3 %>
|
||||||
|
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent} %>
|
||||||
|
<% else %>
|
||||||
|
<div class="orig_cont clearfix">
|
||||||
|
<div class="orig_cont clearfix">
|
||||||
|
<div>
|
||||||
|
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
|
||||||
|
</div>
|
||||||
|
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
|
||||||
|
</div>
|
||||||
|
<div class="orig_cont_hide clearfix">
|
||||||
|
<span class="orig_icon" >↓ </span>
|
||||||
|
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||||
|
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %>
|
||||||
|
</div>
|
||||||
|
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
@ -0,0 +1,61 @@
|
|||||||
|
<ul>
|
||||||
|
<% comments.each do |comment| %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
showNormalImage('reply_content_<%= comment.id %>');
|
||||||
|
autoUrl('reply_content_<%= comment.id %>');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
||||||
|
<div class="homepagePostReplyPortrait">
|
||||||
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||||
|
</div>
|
||||||
|
<div class="homepagePostReplyDes">
|
||||||
|
<div class="homepagePostReplyPublisher">
|
||||||
|
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
|
||||||
|
<%= time_from_now(comment.created_on) %>
|
||||||
|
</div>
|
||||||
|
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||||
|
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
||||||
|
<% end %>
|
||||||
|
<% if !comment.content_detail.blank? %>
|
||||||
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
|
<%= comment.content_detail.html_safe %>
|
||||||
|
</div>
|
||||||
|
<div class="orig_reply mb10 mt-10">
|
||||||
|
<div class="reply">
|
||||||
|
<span class="reply-right">
|
||||||
|
<span id="reply_praise_count_<%=comment.id %>">
|
||||||
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
|
</span>
|
||||||
|
<span style="position: relative" class="fr mr20">
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_reply),
|
||||||
|
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_board => is_board},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:title => l(:button_reply)) %>
|
||||||
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||||
|
</span>
|
||||||
|
<% if comment.course_destroyable_by?(User.current) %>
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_delete),
|
||||||
|
delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_board => is_board),
|
||||||
|
:method => :post,
|
||||||
|
:remote => true,
|
||||||
|
:class => 'fr mr20',
|
||||||
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
|
:title => l(:button_delete)
|
||||||
|
) %>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="reply_message_<%= comment.id%>"></p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
@ -1,6 +1,8 @@
|
|||||||
<% unless @comment.parent.nil? %>
|
<% unless @comment.parent.nil? %>
|
||||||
<% if params[:type] == 'JournalsForMessage' && (@comment.jour_type == 'Principal' || @comment.jour_type == 'Course') %>
|
<% if params[:type] == 'JournalsForMessage' && (@comment.jour_type == 'Principal' || @comment.jour_type == 'Course') %>
|
||||||
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/journal_comment_reply', :locals => {:comment => @comment.parent})%>");
|
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/journal_comment_reply', :locals => {:comment => @comment.parent})%>");
|
||||||
|
<% elsif @comment.class.to_s == 'Message' %>
|
||||||
|
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/journal_comment_reply', :locals => {:comment => @comment.parent})%>");
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/comment_reply', :locals => {:comment => @comment.parent})%>");
|
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/comment_reply', :locals => {:comment => @comment.parent})%>");
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue