Merge branch 'szzh' into develop
This commit is contained in:
commit
4c0995d9e8
|
@ -18,28 +18,28 @@ class HomeworkCommonController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
# @homework_type = "1"
|
||||
#
|
||||
# @homework = HomeworkCommon.new
|
||||
# @homework.safe_attributes = params[:homework_common]
|
||||
# @homework.late_penalty = 0
|
||||
# @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
# @homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||
#
|
||||
# if @homework_type == "1"
|
||||
# #匿评作业相关属性
|
||||
# @homework_detail_manual = HomeworkDetailManual.new
|
||||
# @homework_detail_manual.ta_proportion = 0.6
|
||||
# @homework_detail_manual.absence_penalty = 0
|
||||
# @homework_detail_manual.evaluation_num = 3
|
||||
# @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||
# @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
# @homework.homework_detail_manual = @homework_detail_manual
|
||||
# elsif @homework_type == "2"
|
||||
# #编程作业相关属性
|
||||
# @homework_detail_programing = HomeworkDetailPrograming.new
|
||||
# @homework.homework_detail_programing = @homework_detail_programing
|
||||
# end
|
||||
@homework_type = "1"
|
||||
|
||||
@homework = HomeworkCommon.new
|
||||
@homework.safe_attributes = params[:homework_common]
|
||||
@homework.late_penalty = 0
|
||||
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||
|
||||
if @homework_type == "1"
|
||||
#匿评作业相关属性
|
||||
@homework_detail_manual = HomeworkDetailManual.new
|
||||
@homework_detail_manual.ta_proportion = 0.6
|
||||
@homework_detail_manual.absence_penalty = 0
|
||||
@homework_detail_manual.evaluation_num = 3
|
||||
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
@homework.homework_detail_manual = @homework_detail_manual
|
||||
elsif @homework_type == "2"
|
||||
#编程作业相关属性
|
||||
@homework_detail_programing = HomeworkDetailPrograming.new
|
||||
@homework.homework_detail_programing = @homework_detail_programing
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
|
|
|
@ -73,8 +73,14 @@ class NewsController < ApplicationController
|
|||
@news_count = scope.count
|
||||
#@news_pages = Paginator.new @news_count, @limit, params['page']
|
||||
#@offset ||= scope_page.offset
|
||||
scope_order = scope.all(:include => [:author, :course],
|
||||
:order => "#{News.table_name}.created_on DESC")
|
||||
if params[:subject].nil?
|
||||
scope_order = scope.all(:include => [:author, :course],
|
||||
:order => "#{News.table_name}.created_on DESC")
|
||||
else
|
||||
scope_order = scope.where("news.title like '#{'%' << params[:subject].to_s << '%'}'").all(:include => [:author, :course],
|
||||
:order => "#{News.table_name}.created_on DESC")
|
||||
end
|
||||
|
||||
# :offset => @offset,
|
||||
# :limit => @limit)
|
||||
@newss = paginateHelper scope_order,10
|
||||
|
@ -83,6 +89,7 @@ class NewsController < ApplicationController
|
|||
@news = News.new
|
||||
render :layout => 'base_courses'
|
||||
}
|
||||
format.js
|
||||
format.api
|
||||
format.atom { render_feed(@newss, :title => (@course ? @course.name : Setting.app_title) + ": #{l(:label_news_plural)}") }
|
||||
end
|
||||
|
@ -141,7 +148,7 @@ class NewsController < ApplicationController
|
|||
ids = params[:asset_id].split(',')
|
||||
update_kindeditor_assets_owner ids,@news.id,OwnerTypeHelper::NEWS
|
||||
end
|
||||
# 与我相关动态的记录add start
|
||||
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add start
|
||||
teachers = searchTeacherAndAssistant(@course)
|
||||
for teacher in teachers
|
||||
if(teacher.user_id != User.current.id)
|
||||
|
@ -155,7 +162,7 @@ class NewsController < ApplicationController
|
|||
notify.save()
|
||||
end
|
||||
end
|
||||
# 与我相关动态的记录add end
|
||||
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
|
||||
render_attachment_warning_if_needed(@news)
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to course_news_index_url(@course)
|
||||
|
|
|
@ -157,7 +157,7 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
|
||||
def edit
|
||||
if @homework.homework_type == 2 #编程作业不能修改作业
|
||||
if !User.current.admin? && @homework.homework_type == 2 #编程作业不能修改作业
|
||||
render_403
|
||||
else
|
||||
respond_to do |format|
|
||||
|
@ -396,6 +396,7 @@ class StudentWorkController < ApplicationController
|
|||
if student_work_test.result == 0
|
||||
student_score_count += 1
|
||||
end
|
||||
student_work_test.error_msg = params[:compile_error_msg]
|
||||
student_work_test.save!
|
||||
end
|
||||
end
|
||||
|
@ -444,7 +445,7 @@ class StudentWorkController < ApplicationController
|
|||
#判断是不是当前作品的提交者
|
||||
#提交者 && (非匿评作业 || 未开启匿评) 可以编辑作品
|
||||
def author_of_work
|
||||
render_403 unless (User.current.id == @work.user_id || User.current.admin?) && (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 1 )
|
||||
render_403 unless User.current.admin? || (User.current.id == @work.user_id && @homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 1 )
|
||||
end
|
||||
|
||||
def teacher_of_course
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
class StudentWorkTest < ActiveRecord::Base
|
||||
attr_accessible :student_work_id, :homework_test_id, :result
|
||||
attr_accessible :student_work_id, :homework_test_id, :result, :error_msg
|
||||
|
||||
belongs_to :homework_test
|
||||
belongs_to :student_work
|
||||
|
|
|
@ -2,70 +2,39 @@
|
|||
btn_tips = l(:label_news_notice)
|
||||
label_tips = l(:label_course_news)
|
||||
%>
|
||||
<script>
|
||||
function remote_search(){
|
||||
$("#news_query_form").submit();
|
||||
}
|
||||
</script>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= label_tips %></h2>
|
||||
</div>
|
||||
<div class="talk_top">
|
||||
<p class="fl">
|
||||
<%= l(:label_total_news) %>
|
||||
<span><%= @news_count %></span>
|
||||
<%= l(:label_course_news_count) %>
|
||||
</p>
|
||||
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
|
||||
<%= link_to(btn_tips,new_course_news_path(@course),:class => 'problem_new_btn fl c_dorange')%>
|
||||
<div class="cl"></div>
|
||||
<div class="fl">
|
||||
<p class="fl">
|
||||
<%= l(:label_total_news) %>
|
||||
<span><%= @news_count %></span>
|
||||
<%= l(:label_course_news_count) %>
|
||||
</p>
|
||||
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
|
||||
<%= link_to(btn_tips,new_course_news_path(@course),:class => 'problem_new_btn fl c_dorange')%>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="problem_search fr" >
|
||||
<%= form_tag({:controller => 'news', :action => 'index', :course_id => @course },:remote=>'true', :method => :get,:id=>"news_query_form", :class => 'query_form') do %>
|
||||
<input class="problem_search_input fl" id="v_subject" placeholder="通知主题" type="text" name="subject" value="" onkeypress="" onkeydown="">
|
||||
<a href="javascript:void(0)" class="problem_search_btn fl" onclick="remote_search();" >搜索</a>
|
||||
<% end %>
|
||||
</div><!--problem_search end-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div id="news_list">
|
||||
<%= render :partial => 'course_news_list', :locals=>{ :newss=>@newss,:obj_pages=>@obj_pages, :obj_count=>@obj_count} %>
|
||||
<div>
|
||||
<% if @newss.empty? %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<% @newss.each do |news| %>
|
||||
<div class="problem_main upload_img">
|
||||
<%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %>
|
||||
<div class="problem_txt fl mt5">
|
||||
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %>
|
||||
<span class="fl">
|
||||
<%= l(:label_release_news) %>:
|
||||
</span>
|
||||
<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
|
||||
<%=link_to "<span class = 'pic_mes'>#{news.comments.all.count}</span>".html_safe, news_path(news.id), :class => "pro_mes_w" %>
|
||||
<br />
|
||||
<div class="cl mb5"></div>
|
||||
<script>
|
||||
$(function(){if($("#news_description_<%= news.id%>_content").height()>360){$("#news_foot_<%= news.id%>").show();}});
|
||||
</script>
|
||||
<div id="news_description_<%= news.id%>" class="news_description mt5">
|
||||
<div id="news_description_<%= news.id%>_content" class="upload_img">
|
||||
<%= news.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="news_foot currentDd fr" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>">
|
||||
[展开]
|
||||
</div>
|
||||
<div class="cl mb5"></div>
|
||||
<span class="fl"><%= l(:label_create_time)%>:<%= format_time(news.created_on)%></span>
|
||||
<%= link_to_attachments_course news %>
|
||||
<div class="cl"></div>
|
||||
<%#= render :partial => 'student_work/work_attachments', :locals => {:attachments => news.attachments} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--problem_main end-->
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<!--end-->
|
||||
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</ul>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
||||
<%= stylesheet_link_tag 'scm' %>
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<div>
|
||||
<% if newss.empty? %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<% newss.each do |news| %>
|
||||
<div class="problem_main upload_img">
|
||||
<%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %>
|
||||
<div class="problem_txt fl mt5">
|
||||
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %>
|
||||
<span class="fl">
|
||||
<%= l(:label_release_news) %>:
|
||||
</span>
|
||||
<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
|
||||
<%=link_to "<span class = 'pic_mes'>#{news.comments.all.count}</span>".html_safe, news_path(news.id), :class => "pro_mes_w" %>
|
||||
<br />
|
||||
<div class="cl mb5"></div>
|
||||
<script>
|
||||
$(function(){if($("#news_description_<%= news.id%>_content").height()>360){$("#news_foot_<%= news.id%>").show();}});
|
||||
</script>
|
||||
<div id="news_description_<%= news.id%>" class="news_description mt5">
|
||||
<div id="news_description_<%= news.id%>_content" class="upload_img">
|
||||
<%= news.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="news_foot currentDd fr" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>">
|
||||
[展开]
|
||||
</div>
|
||||
<div class="cl mb5"></div>
|
||||
<span class="fl"><%= l(:label_create_time)%>:<%= format_time(news.created_on)%></span>
|
||||
<%= link_to_attachments_course news %>
|
||||
<div class="cl"></div>
|
||||
<%#= render :partial => 'student_work/work_attachments', :locals => {:attachments => news.attachments} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--problem_main end-->
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<!--end-->
|
||||
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full obj_pages, obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</ul>
|
|
@ -0,0 +1 @@
|
|||
$("#news_list").html("<%= escape_javascript(render :partial => 'course_news_list', :locals=>{ :newss=>@newss,:obj_pages=>@obj_pages, :obj_count=>@obj_count})%>");
|
|
@ -43,97 +43,69 @@
|
|||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://tsr.sei.pku.edu.cn/KnowledgeBaseDC/semantic-search.jsp?projectName=jena
|
||||
" target="_Blank">软件知识库</a>
|
||||
<%#= link_to l(:label_project_soft_knowledge) ,soft_knowledge_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://tsr.sei.pku.edu.cn/home.action" target="_Blank">软件资源库</a>
|
||||
<%#= link_to l(:label_project_soft_file) ,soft_file_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<%= link_to l(:label_project_dts_new) ,dts_dep_project_path(@project), data: { confirm:'你确定要对本项目进行代码缺陷测试分析吗?' } %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://www.seforge.org/pop-php/" target="_Blank">在线开发平台</a>
|
||||
<%#= link_to l(:label_project_online_dev) ,online_dev_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://www.seforge.org/sase/" target="_Blank">软工服务平台</a>
|
||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS评估工具</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">形式验证工具</a>
|
||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS证据采集工具</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS 评估工具</a>
|
||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS证据评估统计分析工具</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS 证据采集工具</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<%= link_to "代码缺陷测试工具(DTS)" ,dts_dep_project_path(@project), data: { confirm:'你确定要对本项目进行代码缺陷测试分析吗?' } %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://www.seforge.org/sase/" target="_Blank">软工服务平台(SASSP)</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://tsr.sei.pku.edu.cn/home.action" target="_Blank">软件知识库(KnowledgeBase)</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">可信评估工具(Evaluator)</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">在线验证工具(BACH-Online)</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">软件测试工具(SSCC-Web)</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://www.service4all.org.cn/servicexchange/" target="_Blank">服务资源共享平台(ServiceXchange)</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://www.service4all.org.cn/repository/ServiceCloud/MyServiceContainer.jsp" target="_Blank">在线服务开发平台(ServiceFoundry)</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://www.service4all.org.cn" target="_Blank">组合开发和运行演化平台(Service4All)</a>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">可信度评估工具 SAS
|
||||
</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">可信评估工具 Evaluator</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">软件测试工具 SSCC-Web</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<!--<li>-->
|
||||
<!--<%# unless @project.enabled_modules.where("name = 'dts'").empty? %>-->
|
||||
<!--<%#= link_to l(:project_module_dts) ,share_show_path(@project) %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS 证据评估统计分析工具</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if User.current.admin? %>
|
||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">在线验证工具 BACH-Online</a>
|
||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -45,11 +45,11 @@
|
|||
</div>
|
||||
|
||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
||||
<p class="fr f14 " style="padding-right: 32px;">语言:<span style="color: red">Java</span> 总文件数:<span style="color: red">361</span> 代码行数:<span style="color: red">48662</span></p>
|
||||
<div style="padding-left: 35px;padding-top: 30px;">
|
||||
<% @dts.each do |dt| %>
|
||||
<p class="fr f14 " style="padding-right: 32px;padding-bottom: 10px;">语言:<span style="color: red">Java</span> 总文件数:<span style="color: red">361</span> 代码行数:<span style="color: red">48662</span></p>
|
||||
|
||||
<table width="600" border="0" style="padding-left: 30px; border-spacing:0; border-collapse:collapse; border: 1px solid #b0b0b0;">
|
||||
<% @dts.each do |dt| %>
|
||||
<div style="padding-left: 35px;padding-top: 10px;">
|
||||
<table width="600" border="0" style="padding-left: 30px;padding-top: 100px; border-spacing:0; border-collapse:collapse; border: 1px solid #b0b0b0;">
|
||||
<tr>
|
||||
<td align="center" class="redBox">错误变量</td>
|
||||
<td class="redBox2"> <%= dt.Variable %></td>
|
||||
|
@ -71,6 +71,7 @@
|
|||
<td colspan="5" class="redBox2"> <%= dt.File %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -9,7 +9,8 @@
|
|||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_tit">
|
||||
<%= link_to student_work.name, student_work_path(student_work.id),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||
<% 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.id),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_time_c">
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
<% end%>
|
||||
</li>
|
||||
<li class=" hwork_tit_e" style="width: 410px">
|
||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true, :title => student_work.name, :class => "c_blue02"%>
|
||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? '匿名的作品' : student_work.name%>
|
||||
<%= link_to student_work_name, student_work_path(student_work),:remote => true, :title => student_work.name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<% my_score = student_work_score(student_work,User.current) %>
|
||||
<li class=" hwork_code <%= my_score.nil? ? 'c_grey' : 'c_red'%>">
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<li >
|
||||
<span class="tit_fb ">内容:</span>
|
||||
<div class="show_hwork_p break_word">
|
||||
<%= text_format @work.description%>
|
||||
<%= text_format(@work.description) if @work.description%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_tit_une">
|
||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||
<% 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 => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_time_c">
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
|
|
|
@ -92,7 +92,7 @@ zh:
|
|||
|
||||
label_project_dts_new: DTS缺陷测试
|
||||
label_project_dts_statics: DTS缺陷报告
|
||||
label_project_dts_yun: 云化部署
|
||||
label_project_dts_yun: 云化部署工具
|
||||
label_project_soft_knowledge: 软件知识库
|
||||
label_project_soft_file: 软件资源库
|
||||
label_project_online_dev: 在线开发平台
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class AddErrormsgToStudenWorkTest < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :student_work_tests,:error_msg,:text
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :student_work_tests,:error_msg,
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue