Merge branch 'szzh' into dev_hjq
This commit is contained in:
commit
d1359d1e55
|
@ -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
|
||||
|
@ -209,7 +209,7 @@ class HomeworkCommonController < ApplicationController
|
|||
end
|
||||
|
||||
if @homework.homework_type == 2 && @homework_detail_programing #编程作业
|
||||
@homework_detail_programing.language = "C++"
|
||||
@homework_detail_programing.language = params[:language]
|
||||
@homework_detail_programing.standard_code = params[:standard_code]
|
||||
@homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
|
||||
homework_tests = @homework.homework_tests
|
||||
|
@ -236,6 +236,25 @@ class HomeworkCommonController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
#发送修改作业的请求
|
||||
question = {title:@homework.name,content:@homework.description}
|
||||
question[:input] = []
|
||||
question[:output] = []
|
||||
@homework.homework_tests.each do |test|
|
||||
question[:input] << test.input
|
||||
question[:output] << test.output
|
||||
end
|
||||
uri = URI("http://192.168.80.21:8080/api/questions/#{@homework_detail_programing.question_id}.json")
|
||||
body = question.to_json
|
||||
res = Net::HTTP.new(uri.host, uri.port).start do |client|
|
||||
request = Net::HTTP::Put.new(uri.path)
|
||||
request.body = body
|
||||
request["Content-Type"] = "application/json"
|
||||
client.request(request)
|
||||
end
|
||||
result = JSON.parse(res.body)
|
||||
homework_detail_programing.question_id = result["id"] if result["status"] && result["status"] == 0
|
||||
end
|
||||
|
||||
@homework.save_attachments(params[:attachments])
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -484,7 +484,18 @@ update
|
|||
if params[:repository_id].present?
|
||||
@repository = @project.repositories.find_by_identifier_param(params[:repository_id])
|
||||
else
|
||||
@repository = @project.repository
|
||||
# 多版本库,如果一个版本库为空则去下一个
|
||||
rep_count = @project.repositories.count
|
||||
if @project.repository.nil?
|
||||
for i in 0..rep_count
|
||||
unless @project.repositories[i].nil?
|
||||
@repository = @project.repositories[i]
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
@repository = @project.repository
|
||||
end
|
||||
end
|
||||
(render_404; return false) unless @repository
|
||||
@path = params[:path].is_a?(Array) ? params[:path].join('/') : params[:path].to_s
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,5 +2,5 @@ class HomeworkTest < ActiveRecord::Base
|
|||
attr_accessible :input, :output, :homework_common_id
|
||||
|
||||
belongs_to :homework_common
|
||||
has_one :student_work_test
|
||||
has_many :student_work_test
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<ul>
|
||||
<li >
|
||||
<label class="label02"> 开发语言: </label>
|
||||
<%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language), {:class => "fl mb10 h26 w70"} %>
|
||||
<%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language.to_i), {:class => "fl mb10 h26 w70"} %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -1,27 +1,17 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
||||
<%= error_messages_for 'homework_common' %>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2">
|
||||
<%= l(:label_course_homework_new)%>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="hwork_new" id="hwork_new">
|
||||
<%= form_for("new_homework_common",:url => next_step_homework_common_index_path) do |f|%>
|
||||
<input type="hidden" name="course" value="<%= @course.id%>">
|
||||
<h3 class="c_blue f16 mb10">
|
||||
请选择将要发布的作业类型
|
||||
</h3>
|
||||
<input type="radio" class="mb10 fl" name="homework_common_type" value="1" id="homework_detail_manual_radio" checked/>
|
||||
<span class="ml5 fl">
|
||||
人工评分的作业(支持匿名互评、灵活设置评分比例)
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<input type="radio" class="mb20 fl" name="homework_common_type" value="2" id="homework_detail_programing_radio"/>
|
||||
<span class="ml5 fl">
|
||||
自动评测的编程作业(支持C/C++程序的自动评分)
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class=" orange_btn" onclick="$(this).parent().submit();">
|
||||
下一步
|
||||
</a>
|
||||
<div class="hwork_new">
|
||||
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
|
||||
<%= hidden_field_tag "course",@course.id%>
|
||||
<%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
|
||||
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
|
||||
<%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
|
||||
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
|
||||
<% end%>
|
||||
</div><!--hwork_new end-->
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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'%>">
|
||||
|
|
|
@ -47,8 +47,9 @@
|
|||
<td class="td_tit">
|
||||
<%= test.output%>
|
||||
</td>
|
||||
<td class="td_50 c_red"><%= test.student_work_test.nil? ? "正在编译" : test.student_work_test.status_to_s%></td>
|
||||
<input type="hidden" value="<%= test.student_work_test.result if test.student_work_test%>">
|
||||
<% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%>
|
||||
<td class="td_50 c_red"><%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%></td>
|
||||
<input type="hidden" value="<%= student_work_test.result if student_work_test%>">
|
||||
</tr>
|
||||
<% end%>
|
||||
|
||||
|
|
|
@ -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
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20150719092427) do
|
||||
ActiveRecord::Schema.define(:version => 20150722015428) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1248,6 +1248,7 @@ ActiveRecord::Schema.define(:version => 20150719092427) do
|
|||
t.integer "result"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.text "error_msg"
|
||||
end
|
||||
|
||||
create_table "student_works", :force => true do |t|
|
||||
|
|
Loading…
Reference in New Issue