Merge branch 'szzh' into dev_hjq
Conflicts: app/controllers/projects_controller.rb app/views/projects/_tools_expand.html.erb config/locales/projects/zh.yml
This commit is contained in:
commit
069dad053b
|
@ -18,6 +18,28 @@ class HomeworkCommonController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
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
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
end
|
end
|
||||||
|
@ -73,7 +95,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
homework_detail_programing = HomeworkDetailPrograming.new
|
homework_detail_programing = HomeworkDetailPrograming.new
|
||||||
homework_detail_programing.language = "C++"
|
homework_detail_programing.language = "C++"
|
||||||
homework_detail_programing.standard_code = params[:standard_code]
|
homework_detail_programing.standard_code = params[:standard_code]
|
||||||
|
homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
|
||||||
question = {title:homework.name,content:homework.description}
|
question = {title:homework.name,content:homework.description}
|
||||||
question[:input] = []
|
question[:input] = []
|
||||||
question[:output] = []
|
question[:output] = []
|
||||||
|
@ -189,6 +211,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
if @homework.homework_type == 2 && @homework_detail_programing #编程作业
|
if @homework.homework_type == 2 && @homework_detail_programing #编程作业
|
||||||
@homework_detail_programing.language = "C++"
|
@homework_detail_programing.language = "C++"
|
||||||
@homework_detail_programing.standard_code = params[:standard_code]
|
@homework_detail_programing.standard_code = params[:standard_code]
|
||||||
|
@homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
|
||||||
homework_tests = @homework.homework_tests
|
homework_tests = @homework.homework_tests
|
||||||
#需要删除的测试
|
#需要删除的测试
|
||||||
ids = homework_tests.map(&:id) - params[:input].keys.map(&:to_i)
|
ids = homework_tests.map(&:id) - params[:input].keys.map(&:to_i)
|
||||||
|
|
|
@ -361,8 +361,34 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# dts工具接口
|
# dts测试工具
|
||||||
def dts_repos
|
def dts_dep
|
||||||
|
render_403 unless User.current.admin?
|
||||||
|
@dts = Dts.all
|
||||||
|
end
|
||||||
|
|
||||||
|
# dts云部署
|
||||||
|
def yun_dep
|
||||||
|
render_403 unless User.current.admin?
|
||||||
|
end
|
||||||
|
|
||||||
|
# 软件知识库
|
||||||
|
def soft_knowledge
|
||||||
|
render_403 unless User.current.admin?
|
||||||
|
end
|
||||||
|
|
||||||
|
# 在线开发平台
|
||||||
|
def online_dev
|
||||||
|
render_403 unless User.current.admin?
|
||||||
|
end
|
||||||
|
|
||||||
|
# 软件资源库
|
||||||
|
def soft_file
|
||||||
|
render_403 unless User.current.admin?
|
||||||
|
end
|
||||||
|
|
||||||
|
# 软件服务
|
||||||
|
def soft_service
|
||||||
render_403 unless User.current.admin?
|
render_403 unless User.current.admin?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ class WordsController < ApplicationController
|
||||||
elsif @journal_destroyed.jour_type == "Principal"
|
elsif @journal_destroyed.jour_type == "Principal"
|
||||||
@user = User.find(@journal_destroyed.jour_id)
|
@user = User.find(@journal_destroyed.jour_id)
|
||||||
@jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count
|
@jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count
|
||||||
|
@is_user = true
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
|
|
|
@ -57,7 +57,7 @@ module ActivitiesHelper
|
||||||
end
|
end
|
||||||
#留言
|
#留言
|
||||||
if activity.act_type == 'JournalsForMessage'
|
if activity.act_type == 'JournalsForMessage'
|
||||||
return [activity.act.jour_type,activity.act.jour_id]
|
return [activity.act.jour_type,activity.act.jour_id,activity.act.user_id]
|
||||||
end
|
end
|
||||||
|
|
||||||
# HomeworkCommon Issue Journal Message News
|
# HomeworkCommon Issue Journal Message News
|
||||||
|
|
|
@ -66,7 +66,7 @@ module ApiHelper
|
||||||
(user.language.nil? || user.language == "") ? 'zh':user.language
|
(user.language.nil? || user.language == "") ? 'zh':user.language
|
||||||
end
|
end
|
||||||
|
|
||||||
# 获取课程作业的状态
|
# 学生获取课程作业的状态
|
||||||
def get_homework_status homework
|
def get_homework_status homework
|
||||||
homework_status = ""
|
homework_status = ""
|
||||||
if !homework.nil?
|
if !homework.nil?
|
||||||
|
@ -75,9 +75,9 @@ module ApiHelper
|
||||||
when 1
|
when 1
|
||||||
homework_status = show_homework_deadline homework
|
homework_status = show_homework_deadline homework
|
||||||
when 2
|
when 2
|
||||||
homework_status = "正在匿评中"
|
homework_status = "正在匿评"
|
||||||
when 3
|
when 3
|
||||||
homework_status = "匿评已结束"
|
homework_status = "匿评结束"
|
||||||
end
|
end
|
||||||
elsif homework.homework_type == 0
|
elsif homework.homework_type == 0
|
||||||
homework_status = "未启用匿评"
|
homework_status = "未启用匿评"
|
||||||
|
|
|
@ -14,8 +14,11 @@ class Activity < ActiveRecord::Base
|
||||||
#helper :activities
|
#helper :activities
|
||||||
include ActivitiesHelper
|
include ActivitiesHelper
|
||||||
def set_container_type_val
|
def set_container_type_val
|
||||||
container_type,container_id =get_container_type(self)
|
params =get_container_type(self)
|
||||||
self.activity_container_type = container_type
|
self.activity_container_type = params[0]
|
||||||
self.activity_container_id = container_id
|
self.activity_container_id = params[1]
|
||||||
|
if(self.act_type == 'JournalsForMessage')
|
||||||
|
self.user_id = params[2]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class Dts < ActiveRecord::Base
|
||||||
|
attr_accessible :Category, :Defect, :Description, :File, :IPLine, :IPLineCode, :Method, :Num, :PreConditions, :Review, :StartLine, :TraceInfo, :Variable, :project_id
|
||||||
|
|
||||||
|
belongs_to :project
|
||||||
|
end
|
|
@ -68,6 +68,7 @@ class Project < ActiveRecord::Base
|
||||||
has_one :course_extra, :class_name => 'Course', :foreign_key => :extra,:primary_key => :identifier, :dependent => :destroy
|
has_one :course_extra, :class_name => 'Course', :foreign_key => :extra,:primary_key => :identifier, :dependent => :destroy
|
||||||
has_many :applied_projects
|
has_many :applied_projects
|
||||||
has_many :invite_lists
|
has_many :invite_lists
|
||||||
|
has_one :dts
|
||||||
|
|
||||||
# end
|
# end
|
||||||
#ADDED BY NIE
|
#ADDED BY NIE
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
class StudentWorkTest < ActiveRecord::Base
|
class StudentWorkTest < ActiveRecord::Base
|
||||||
attr_accessible :student_work_id, :homework_test_id
|
attr_accessible :student_work_id, :homework_test_id, :result
|
||||||
|
|
||||||
belongs_to :homework_test
|
belongs_to :homework_test
|
||||||
belongs_to :student_work
|
belongs_to :student_work
|
||||||
|
|
||||||
def status_to_s
|
def status_to_s
|
||||||
case self.result
|
case self.result.to_i
|
||||||
when -1
|
when -1
|
||||||
'编译出错'
|
'编译出错'
|
||||||
when -2
|
when -2
|
||||||
|
@ -33,7 +33,7 @@ class StudentWorkTest < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_score
|
def test_score
|
||||||
if self.result == 0
|
if self.result.to_i == 0
|
||||||
format("%.1f",100.0 / self.student_work.homework_common.homework_tests.count)
|
format("%.1f",100.0 / self.student_work.homework_common.homework_tests.count)
|
||||||
else
|
else
|
||||||
0
|
0
|
||||||
|
|
|
@ -711,19 +711,19 @@ class CoursesService
|
||||||
" limit 0,4"
|
" limit 0,4"
|
||||||
active_students = User.find_by_sql(sql1)
|
active_students = User.find_by_sql(sql1)
|
||||||
if homework_count != 0 && !better_students.empty?
|
if homework_count != 0 && !better_students.empty?
|
||||||
latest_course_dynamics <<{:type=> 6,:time=>Time.now.to_s,:count=> 4,:better_students=> better_students}
|
latest_course_dynamics <<{:type=> 6,:time=>"1970-01-01 0:0:0 +0800",:count=> 4,:better_students=> better_students}
|
||||||
end
|
end
|
||||||
unless active_students.empty?
|
unless active_students.empty?
|
||||||
latest_course_dynamics <<{:type=> 7,:time=>Time.now.to_s,:count=> 4,:active_students=>active_students}
|
latest_course_dynamics <<{:type=> 7,:time=>"1970-01-01 0:0:0 +0800",:count=> 4,:active_students=>active_students}
|
||||||
end
|
end
|
||||||
latest_course_dynamic = latest_course_dynamics.first
|
latest_course_dynamic = latest_course_dynamics.first
|
||||||
unless latest_course_dynamic.nil?
|
unless latest_course_dynamic.nil?
|
||||||
result << {:course_name => course.name,:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course), :course_id => course.id, :course_img_url => url_to_avatar(course), :course_time => course.time, :course_term => course.term,:message => "", :dynamics => latest_course_dynamics,
|
result << {:course_name => course.name,:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course), :course_id => course.id, :course_img_url => url_to_avatar(course), :course_time => course.time, :course_term => course.term,:message => "", :dynamics => latest_course_dynamics,
|
||||||
:course_student_num=>course ? course.members.count : 0,:time_from_now=> distance_of_time_in_words(Time.now, latest_course_dynamic[:time].to_time) << "前"}
|
:course_student_num=>course ? course.members.count : 0,:time_from_now=> distance_of_time_in_words(Time.now, latest_course_dynamic[:time].to_time) << "前",:time=>latest_course_dynamic[:time].to_time}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#返回数组集合
|
#返回数组集合
|
||||||
result.sort! { |order, newer| newer[:update_time] <=> order[:update_time] }
|
result.sort! { |order, newer| newer[:time] <=> order[:time] }
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -759,7 +759,7 @@ class CoursesService
|
||||||
|
|
||||||
# 获取某次作业的所有作业列表
|
# 获取某次作业的所有作业列表
|
||||||
def student_work_list params,current_user
|
def student_work_list params,current_user
|
||||||
is_teacher = User.current.allowed_to?(:as_teacher,Course.find(params[:course_id]))
|
is_teacher = current_user.allowed_to?(:as_teacher,Course.find(params[:course_id]))
|
||||||
homework = HomeworkCommon.find(params[:homework_id])
|
homework = HomeworkCommon.find(params[:homework_id])
|
||||||
student_works = []
|
student_works = []
|
||||||
#老师 || 非匿评作业 || 匿评结束 显示所有的作品
|
#老师 || 非匿评作业 || 匿评结束 显示所有的作品
|
||||||
|
|
|
@ -1,42 +1,4 @@
|
||||||
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
||||||
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html">
|
|
||||||
function regexName()
|
|
||||||
{
|
|
||||||
var name = $.trim($("#homework_attach_name").val());
|
|
||||||
|
|
||||||
if(name=="")
|
|
||||||
{
|
|
||||||
$("#homework_attach_name_span").text("作品名称不能为空");
|
|
||||||
$("#homework_attach_name_span").css('color','#ff0000');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#homework_attach_name_span").text("填写正确");
|
|
||||||
$("#homework_attach_name_span").css('color','#008000');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function regexDescription()
|
|
||||||
{
|
|
||||||
var name = $.trim($("#homework_attach_description").val());
|
|
||||||
|
|
||||||
if(name=="")
|
|
||||||
{
|
|
||||||
$("#homework_attach_description_span").text("作品描述不能为空");
|
|
||||||
$("#homework_attach_description_span").css('color','#ff0000');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#homework_attach_description_span").text("填写正确");
|
|
||||||
$("#homework_attach_description_span").css('color','#008000');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function submit_homework_form(){if(regexName()&®exDescription()){$('#new_homework_attach').submit();}}
|
|
||||||
</script>
|
|
||||||
<div class="container" id="content">
|
<div class="container" id="content">
|
||||||
<div class="Newwork">
|
<div class="Newwork">
|
||||||
<div id="tb_" class="tb_">
|
<div id="tb_" class="tb_">
|
||||||
|
@ -69,7 +31,7 @@
|
||||||
</span>
|
</span>
|
||||||
作品名称 :
|
作品名称 :
|
||||||
</label>
|
</label>
|
||||||
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onkeyup => "regexName();" %>
|
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onkeyup => "regexHomeworkCommonName();" %>
|
||||||
<span id="homework_attach_name_span"></span>
|
<span id="homework_attach_name_span"></span>
|
||||||
</p>
|
</p>
|
||||||
<p style="float:left;">
|
<p style="float:left;">
|
||||||
|
@ -79,7 +41,7 @@
|
||||||
</span>
|
</span>
|
||||||
作品描述 :
|
作品描述 :
|
||||||
</label>
|
</label>
|
||||||
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
|
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexHomeworkCommonDescription();"%>
|
||||||
<p id="homework_attach_description_span" style="padding-left: 100px;"></p>
|
<p id="homework_attach_description_span" style="padding-left: 100px;"></p>
|
||||||
</p>
|
</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 开发语言: </label>
|
<label class="label02"> 开发语言: </label>
|
||||||
<select class="fl mb10 h26 w150" >
|
<select class="fl mb10 h26 w150" >
|
||||||
<option>C++</option>
|
<option>C</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -89,11 +89,11 @@
|
||||||
<div>
|
<div>
|
||||||
<li>
|
<li>
|
||||||
<label class="label02"> 测试输入: </label>
|
<label class="label02"> 测试输入: </label>
|
||||||
<input type="text" class="fl h26 w186 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
|
<input type="text" class="fl h26 w200 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class=" fl f14 ml10"> 输出: </label>
|
<label class=" fl f14 ml10"> 输出: </label>
|
||||||
<input type="text" class="fl h26 w186 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
|
<input type="text" class="fl h26 w200 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
||||||
|
@ -107,11 +107,11 @@
|
||||||
<div>
|
<div>
|
||||||
<li>
|
<li>
|
||||||
<label class="label02"> 测试输入: </label>
|
<label class="label02"> 测试输入: </label>
|
||||||
<input type="text" class="fl h26 w186 mb10" name="input[0]" />
|
<input type="text" class="fl h26 w200 mb10" name="input[0]" />
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class=" fl f14 ml10"> 输出: </label>
|
<label class=" fl f14 ml10"> 输出: </label>
|
||||||
<input type="text" class="fl h26 w186 mb10" name="output[0]" />
|
<input type="text" class="fl h26 w200 mb10" name="output[0]" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
||||||
|
|
|
@ -1,27 +1,17 @@
|
||||||
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
||||||
|
<%= error_messages_for 'homework_common' %>
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2">
|
<h2 class="project_h2">
|
||||||
<%= l(:label_course_homework_new)%>
|
<%= l(:label_course_homework_new)%>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="hwork_new" id="hwork_new">
|
<div class="hwork_new">
|
||||||
<%= form_for("new_homework_common",:url => next_step_homework_common_index_path) do |f|%>
|
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
|
||||||
<input type="hidden" name="course" value="<%= @course.id%>">
|
<%= hidden_field_tag "course",@course.id%>
|
||||||
<h3 class="c_blue f16 mb10">
|
<%= 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>
|
||||||
</h3>
|
<%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
|
||||||
<input type="radio" class="mb10 fl" name="homework_common_type" value="1" id="homework_detail_manual_radio" checked/>
|
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
|
||||||
<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++程序的自动评分)
|
|
||||||
</span>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<a href="javascript:void(0);" class=" orange_btn" onclick="$(this).parent().submit();">
|
|
||||||
下一步
|
|
||||||
</a>
|
|
||||||
<% end%>
|
<% end%>
|
||||||
</div><!--hwork_new end-->
|
</div><!--hwork_new end-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -35,14 +35,105 @@
|
||||||
<li>
|
<li>
|
||||||
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
|
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<% if User.current.admin? %>
|
<% if User.current.admin? %>
|
||||||
<%= link_to l(:label_project_dts) ,:controller => "projects", :action => "dts_repos", :id => @project.id %>
|
<%= link_to l(:label_project_dts_yun) ,yun_dep_project_path(@project), data: { confirm:'你确定要对本项目进行云化部署吗?' } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</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>
|
||||||
|
<%#= 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>
|
||||||
|
<%#= 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) %>
|
||||||
|
<% 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">可信度评估工具 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>-->
|
<!--<li>-->
|
||||||
<!--<%# unless @project.enabled_modules.where("name = 'dts'").empty? %>-->
|
<!--<%# unless @project.enabled_modules.where("name = 'dts'").empty? %>-->
|
||||||
<!--<%#= link_to l(:project_module_dts) ,share_show_path(@project) %>-->
|
<!--<%#= link_to l(:project_module_dts) ,share_show_path(@project) %>-->
|
||||||
<!--<%# end %>-->
|
<!--<%# end %>-->
|
||||||
<!--</li>-->
|
<!--</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>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h22"><%= l(:label_project_dts_new) %></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--JS进度条-->
|
||||||
|
<style type="text/css">
|
||||||
|
#out{}
|
||||||
|
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
||||||
|
#font_color{background:yellow;text-align:center;color:white;}
|
||||||
|
</style>
|
||||||
|
<div style="padding-left: 200px;">
|
||||||
|
<div id='out'>
|
||||||
|
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">代码上传分析中...</p>
|
||||||
|
<div style="width:300px;height:20px;background:#EEE;">
|
||||||
|
<div id="in" style="width:1%">1%</div>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
i=0;
|
||||||
|
$(function(){
|
||||||
|
ba=setInterval("begin()",70);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
||||||
|
});
|
||||||
|
function begin()
|
||||||
|
{
|
||||||
|
i+=1;
|
||||||
|
if(i<=100)
|
||||||
|
{
|
||||||
|
document.getElementById("in").style.width=i+"%";
|
||||||
|
document.getElementById("in").innerHTML=i+"%";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clearInterval(ba);
|
||||||
|
$("#show_content_div").show();
|
||||||
|
$("#out").hide();
|
||||||
|
// document.getElementById("out").style.display="none";
|
||||||
|
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="show_content_div" style="display: none;padding-top: 10px;">
|
||||||
|
<p class="fr f14 ">语言:<span style="color: red">Java</span> 总文件数:<span style="color: red">361</span> 代码行数:<span style="color: red">48662</span></p>
|
||||||
|
|
||||||
|
<% @dts.each do |dt| %>
|
||||||
|
<table width="600" border="2" style="padding-top: 10px; padding-left: 30px;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" bgcolor="#999999" style="width: 80px"><strong>错误变量</strong></td>
|
||||||
|
<td style="width: 120px"><%= dt.Variable %></td>
|
||||||
|
<td align="center" bgcolor="#999999" style="width: 80px"><strong>起始行</strong></td>
|
||||||
|
<td style="width: 120px"><%= dt.StartLine %></td>
|
||||||
|
<td align="center" bgcolor="#999999" style="width: 80px"><strong>IP行</strong></td>
|
||||||
|
<td><%= dt.IPLine %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" bgcolor="#999999"><strong>缺陷代码</strong></td>
|
||||||
|
<td colspan="5"><%= dt.IPLineCode %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" bgcolor="#999999"><strong>错误描述</strong></td>
|
||||||
|
<td colspan="5"><%= dt.Description %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" bgcolor="#999999"><strong>文件</strong></td>
|
||||||
|
<td colspan="5"><%= dt.File %></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h22"><%= l(:label_project_online_dev) %></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--JS进度条-->
|
||||||
|
<style type="text/css">
|
||||||
|
#out{}
|
||||||
|
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
||||||
|
#font_color{background:yellow;text-align:center;color:white;}
|
||||||
|
</style>
|
||||||
|
<div style="padding-left: 200px;">
|
||||||
|
<div id='out'>
|
||||||
|
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">在线开发部署中...</p>
|
||||||
|
<div style="width:300px;height:20px;background:#EEE;">
|
||||||
|
<div id="in" style="width:1%">0%</div>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
i=0;
|
||||||
|
$(function(){
|
||||||
|
ba=setInterval("begin()",40);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
||||||
|
});
|
||||||
|
function begin()
|
||||||
|
{
|
||||||
|
i+=1;
|
||||||
|
if(i<=100)
|
||||||
|
{
|
||||||
|
document.getElementById("in").style.width=i+"%";
|
||||||
|
document.getElementById("in").innerHTML=i+"%";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clearInterval(ba);
|
||||||
|
$("#show_content_div").show();
|
||||||
|
$("#out").hide();
|
||||||
|
// document.getElementById("out").style.display="none";
|
||||||
|
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="show_content_div" style="display: none;padding-top: 0px; ">
|
||||||
|
<p class="pl10 f14 "><span style="color: #7f7f7f;font-size: 14px; ">点击进入:</span>
|
||||||
|
<span><a href="http://rubyblog.forge.trustie.net/myblog" target="_Blank" style="color: #15BCCF;font-size: 14px;">在线开发平台</a></span></p>
|
||||||
|
</div>
|
|
@ -0,0 +1,46 @@
|
||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h22"><%= l(:label_project_soft_file) %></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--JS进度条-->
|
||||||
|
<style type="text/css">
|
||||||
|
#out{}
|
||||||
|
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
||||||
|
#font_color{background:yellow;text-align:center;color:white;}
|
||||||
|
</style>
|
||||||
|
<div style="padding-left: 200px;">
|
||||||
|
<div id='out'>
|
||||||
|
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">软件资源库部署中...</p>
|
||||||
|
<div style="width:300px;height:20px;background:#EEE;">
|
||||||
|
<div id="in" style="width:1%">0%</div>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
i=0;
|
||||||
|
$(function(){
|
||||||
|
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
||||||
|
});
|
||||||
|
function begin()
|
||||||
|
{
|
||||||
|
i+=1;
|
||||||
|
if(i<=100)
|
||||||
|
{
|
||||||
|
document.getElementById("in").style.width=i+"%";
|
||||||
|
document.getElementById("in").innerHTML=i+"%";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clearInterval(ba);
|
||||||
|
$("#show_content_div").show();
|
||||||
|
$("#out").hide();
|
||||||
|
// document.getElementById("out").style.display="none";
|
||||||
|
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
||||||
|
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
||||||
|
</div>
|
|
@ -0,0 +1,46 @@
|
||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h22"><%= l(:label_project_soft_knowledge) %></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--JS进度条-->
|
||||||
|
<style type="text/css">
|
||||||
|
#out{}
|
||||||
|
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
||||||
|
#font_color{background:yellow;text-align:center;color:white;}
|
||||||
|
</style>
|
||||||
|
<div style="padding-left: 200px;">
|
||||||
|
<div id='out'>
|
||||||
|
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
|
||||||
|
<div style="width:300px;height:20px;background:#EEE;">
|
||||||
|
<div id="in" style="width:1%">0%</div>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
i=0;
|
||||||
|
$(function(){
|
||||||
|
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
||||||
|
});
|
||||||
|
function begin()
|
||||||
|
{
|
||||||
|
i+=1;
|
||||||
|
if(i<=100)
|
||||||
|
{
|
||||||
|
document.getElementById("in").style.width=i+"%";
|
||||||
|
document.getElementById("in").innerHTML=i+"%";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clearInterval(ba);
|
||||||
|
$("#show_content_div").show();
|
||||||
|
$("#out").hide();
|
||||||
|
// document.getElementById("out").style.display="none";
|
||||||
|
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
||||||
|
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
||||||
|
</div>
|
|
@ -0,0 +1,46 @@
|
||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h22"><%= l(:label_project_soft_service) %></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--JS进度条-->
|
||||||
|
<style type="text/css">
|
||||||
|
#out{}
|
||||||
|
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
||||||
|
#font_color{background:yellow;text-align:center;color:white;}
|
||||||
|
</style>
|
||||||
|
<div style="padding-left: 200px;">
|
||||||
|
<div id='out'>
|
||||||
|
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
|
||||||
|
<div style="width:300px;height:20px;background:#EEE;">
|
||||||
|
<div id="in" style="width:1%">0%</div>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
i=0;
|
||||||
|
$(function(){
|
||||||
|
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
||||||
|
});
|
||||||
|
function begin()
|
||||||
|
{
|
||||||
|
i+=1;
|
||||||
|
if(i<=100)
|
||||||
|
{
|
||||||
|
document.getElementById("in").style.width=i+"%";
|
||||||
|
document.getElementById("in").innerHTML=i+"%";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clearInterval(ba);
|
||||||
|
$("#show_content_div").show();
|
||||||
|
$("#out").hide();
|
||||||
|
// document.getElementById("out").style.display="none";
|
||||||
|
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
||||||
|
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
||||||
|
</div>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h22"><%= l(:label_project_dts_yun) %></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--JS进度条-->
|
||||||
|
<style type="text/css">
|
||||||
|
#out{}
|
||||||
|
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
||||||
|
#font_color{background:yellow;text-align:center;color:white;}
|
||||||
|
</style>
|
||||||
|
<div style="padding-left: 200px;">
|
||||||
|
<div id='out'>
|
||||||
|
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
|
||||||
|
<div style="width:300px;height:20px;background:#EEE;">
|
||||||
|
<div id="in" style="width:1%">0%</div>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
i=0;
|
||||||
|
$(function(){
|
||||||
|
ba=setInterval("begin()",50);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
||||||
|
});
|
||||||
|
function begin()
|
||||||
|
{
|
||||||
|
i+=1;
|
||||||
|
if(i<=100)
|
||||||
|
{
|
||||||
|
document.getElementById("in").style.width=i+"%";
|
||||||
|
document.getElementById("in").innerHTML=i+"%";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clearInterval(ba);
|
||||||
|
$("#show_content_div").show();
|
||||||
|
$("#out").hide();
|
||||||
|
// document.getElementById("out").style.display="none";
|
||||||
|
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="show_content_div" style="display: none;padding-top: 0px; ">
|
||||||
|
<p class="pl10 f14 "><span style="color: #7f7f7f;font-size: 14px; ">点击进入:</span>
|
||||||
|
<span><a href="http://rubyblog.forge.trustie.net/myblog" target="_Blank" style="color: #15BCCF;font-size: 14px;">云化部署平台</a></span></p>
|
||||||
|
</div>
|
|
@ -49,6 +49,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="td_50 c_red"><%= test.student_work_test.nil? ? "正在编译" : test.student_work_test.status_to_s%></td>
|
<td class="td_50 c_red"><%= test.student_work_test.nil? ? "正在编译" : test.student_work_test.status_to_s%></td>
|
||||||
<td class="td_50 "><%= test.student_work_test.nil? ? "0" : test.student_work_test.test_score%></td>
|
<td class="td_50 "><%= test.student_work_test.nil? ? "0" : test.student_work_test.test_score%></td>
|
||||||
|
<input type="hidden" value="<%= test.student_work_test.result if test.student_work_test%>">
|
||||||
</tr>
|
</tr>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
|
@ -72,4 +73,5 @@
|
||||||
<% end%>
|
<% end%>
|
||||||
</div><!---ping_box end--->
|
</div><!---ping_box end--->
|
||||||
<a href="javascript:void(0);" class="fr c_blue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
|
<a href="javascript:void(0);" class="fr c_blue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
|
||||||
|
<div class="cl"></div>
|
||||||
</div><!---show_hwork end--->
|
</div><!---show_hwork end--->
|
|
@ -1,26 +1,26 @@
|
||||||
<% if @journal_destroyed.nil? %>
|
<% if @journal_destroyed.nil? %>
|
||||||
alert('<%=l(:notice_failed_delete)%>');
|
alert('<%=l(:notice_failed_delete)%>');
|
||||||
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
||||||
<% if @user && @jours_count%>
|
<% if @is_user%>
|
||||||
$("#nh_jours_<%= @journal_destroyed.id %>",$("div[nhname='container']",$("#nh_messages"))).remove();
|
$("#nh_jours_<%= @journal_destroyed.id %>",$("div[nhname='container']",$("#nh_messages"))).remove();
|
||||||
var params = init_list_more_div_params($("#nh_messages"));
|
var params = init_list_more_div_params($("#nh_messages"));
|
||||||
change_status_4_list_more_div(params);
|
change_status_4_list_more_div(params);
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<% if @bid && @jours_count %>
|
||||||
<% if @bid && @jours_count %>
|
$('#jours_count').html("<%= @jours_count %>");
|
||||||
$('#jours_count').html("<%= @jours_count %>");
|
<% elsif @course && @jours_count%>
|
||||||
<% elsif @course && @jours_count%>
|
$('#course_jour_count').html("(<%= @jours_count %>)");
|
||||||
$('#course_jour_count').html("(<%= @jours_count %>)");
|
<% elsif @user && @jours_count%>
|
||||||
<% elsif @user && @jours_count%>
|
$('#jour_count').html("<%= @jours_count %>");
|
||||||
$('#jour_count').html("<%= @jours_count %>");
|
<% end %>
|
||||||
<% end %>
|
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
||||||
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
destroyedItem.fadeOut(600,function(){
|
||||||
destroyedItem.fadeOut(600,function(){
|
destroyedItem.remove();
|
||||||
destroyedItem.remove();
|
});
|
||||||
});
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#message').html('<%= escape_javascript(render(:partial => 'words/message', :locals => {:jour => @jour, :state => false, :user => @user, :feedback_pages => @feedback_pages})) %>');
|
$('#message').html('<%= escape_javascript(render(:partial => 'words/message', :locals => {:jour => @jour, :state => false, :user => @user, :feedback_pages => @feedback_pages})) %>');
|
||||||
$('#new_form_reference_user_id').val("");
|
$('#new_form_reference_user_id').val("");
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,13 @@ zh:
|
||||||
label_project_tool_response: 用户反馈
|
label_project_tool_response: 用户反馈
|
||||||
label_project_news: 项目新闻
|
label_project_news: 项目新闻
|
||||||
|
|
||||||
label_project_dts: DTS测试
|
label_project_dts_new: DTS缺陷测试
|
||||||
|
label_project_dts_statics: DTS缺陷报告
|
||||||
|
label_project_dts_yun: 云化部署
|
||||||
|
label_project_soft_knowledge: 软件知识库
|
||||||
|
label_project_soft_file: 软件资源库
|
||||||
|
label_project_online_dev: 在线开发平台
|
||||||
|
label_project_soft_service: 软工服务平台
|
||||||
|
|
||||||
label_project_overview: "项目简介"
|
label_project_overview: "项目简介"
|
||||||
label_expend_information: 展开更多信息
|
label_expend_information: 展开更多信息
|
||||||
|
|
|
@ -385,6 +385,15 @@ RedmineApp::Application.routes.draw do
|
||||||
|
|
||||||
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
||||||
get 'watcherlist', :action=> 'watcherlist'
|
get 'watcherlist', :action=> 'watcherlist'
|
||||||
|
|
||||||
|
# 添加dts测试工具
|
||||||
|
get 'dts_dep', :action=> 'dts_dep'
|
||||||
|
get 'yun_dep', :action=> 'yun_dep'
|
||||||
|
get 'soft_knowledge', :action=> 'soft_knowledge'
|
||||||
|
get 'soft_file', :action=> 'soft_file'
|
||||||
|
get 'online_dev', :action=> 'online_dev'
|
||||||
|
get 'soft_service', :action=> 'soft_service'
|
||||||
|
|
||||||
get 'invite_members', :action=> 'invite_members'
|
get 'invite_members', :action=> 'invite_members'
|
||||||
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
|
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
|
||||||
# get 'dts_repos', :aciton => 'dts_repos'
|
# get 'dts_repos', :aciton => 'dts_repos'
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
class CreateDts < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :dts do |t|
|
||||||
|
t.string :IPLineCode
|
||||||
|
t.string :Description
|
||||||
|
t.string :Num
|
||||||
|
t.string :Variable
|
||||||
|
t.string :TraceInfo
|
||||||
|
t.string :Method
|
||||||
|
t.string :File
|
||||||
|
t.string :IPLine
|
||||||
|
t.string :Review
|
||||||
|
t.string :Category
|
||||||
|
t.string :Defect
|
||||||
|
t.string :PreConditions
|
||||||
|
t.string :StartLine
|
||||||
|
t.integer :project_id
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
47
db/schema.rb
47
db/schema.rb
|
@ -11,12 +11,14 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20150715070534) do
|
ActiveRecord::Schema.define(:version => 20150719092427) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
t.string "act_type", :null => false
|
t.string "act_type", :null => false
|
||||||
t.integer "user_id", :null => false
|
t.integer "user_id", :null => false
|
||||||
|
t.integer "activity_container_id"
|
||||||
|
t.string "activity_container_type", :default => ""
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type"
|
add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type"
|
||||||
|
@ -473,6 +475,25 @@ ActiveRecord::Schema.define(:version => 20150715070534) do
|
||||||
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
||||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||||
|
|
||||||
|
create_table "dts", :force => true do |t|
|
||||||
|
t.string "IPLineCode"
|
||||||
|
t.string "Description"
|
||||||
|
t.string "Num"
|
||||||
|
t.string "Variable"
|
||||||
|
t.string "TraceInfo"
|
||||||
|
t.string "Method"
|
||||||
|
t.string "File"
|
||||||
|
t.string "IPLine"
|
||||||
|
t.string "Review"
|
||||||
|
t.string "Category"
|
||||||
|
t.string "Defect"
|
||||||
|
t.string "PreConditions"
|
||||||
|
t.string "StartLine"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "enabled_modules", :force => true do |t|
|
create_table "enabled_modules", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "name", :null => false
|
t.string "name", :null => false
|
||||||
|
@ -1340,7 +1361,7 @@ ActiveRecord::Schema.define(:version => 20150715070534) do
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "user_extensions", :force => true do |t|
|
create_table "user_extensions", :force => true do |t|
|
||||||
t.integer "user_id", :null => false
|
t.integer "user_id", :null => false
|
||||||
t.date "birthday"
|
t.date "birthday"
|
||||||
t.string "brief_introduction"
|
t.string "brief_introduction"
|
||||||
t.integer "gender"
|
t.integer "gender"
|
||||||
|
@ -1348,8 +1369,8 @@ ActiveRecord::Schema.define(:version => 20150715070534) do
|
||||||
t.string "occupation"
|
t.string "occupation"
|
||||||
t.integer "work_experience"
|
t.integer "work_experience"
|
||||||
t.integer "zip_code"
|
t.integer "zip_code"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.string "technical_title"
|
t.string "technical_title"
|
||||||
t.integer "identity"
|
t.integer "identity"
|
||||||
t.string "student_id"
|
t.string "student_id"
|
||||||
|
@ -1357,6 +1378,7 @@ ActiveRecord::Schema.define(:version => 20150715070534) do
|
||||||
t.string "student_realname"
|
t.string "student_realname"
|
||||||
t.string "location_city"
|
t.string "location_city"
|
||||||
t.integer "school_id"
|
t.integer "school_id"
|
||||||
|
t.string "description", :default => ""
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "user_grades", :force => true do |t|
|
create_table "user_grades", :force => true do |t|
|
||||||
|
@ -1462,6 +1484,17 @@ ActiveRecord::Schema.define(:version => 20150715070534) do
|
||||||
add_index "versions", ["project_id"], :name => "versions_project_id"
|
add_index "versions", ["project_id"], :name => "versions_project_id"
|
||||||
add_index "versions", ["sharing"], :name => "index_versions_on_sharing"
|
add_index "versions", ["sharing"], :name => "index_versions_on_sharing"
|
||||||
|
|
||||||
|
create_table "visitors", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "master_id"
|
||||||
|
t.datetime "updated_on"
|
||||||
|
t.datetime "created_on"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "visitors", ["master_id"], :name => "index_visitors_master_id"
|
||||||
|
add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on"
|
||||||
|
add_index "visitors", ["user_id"], :name => "index_visitors_user_id"
|
||||||
|
|
||||||
create_table "watchers", :force => true do |t|
|
create_table "watchers", :force => true do |t|
|
||||||
t.string "watchable_type", :default => "", :null => false
|
t.string "watchable_type", :default => "", :null => false
|
||||||
t.integer "watchable_id", :default => 0, :null => false
|
t.integer "watchable_id", :default => 0, :null => false
|
||||||
|
|
|
@ -506,14 +506,51 @@ function submit_homework(id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function regexHomeworkCommonName()
|
||||||
|
{
|
||||||
|
var name = $.trim($("#homework_attach_name").val());
|
||||||
|
|
||||||
|
if(name=="")
|
||||||
|
{
|
||||||
|
$("#homework_attach_name_span").text("作品名称不能为空");
|
||||||
|
$("#homework_attach_name_span").css('color','#ff0000');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#homework_attach_name_span").text("填写正确");
|
||||||
|
$("#homework_attach_name_span").css('color','#008000');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function regexHomeworkCommonDescription()
|
||||||
|
{
|
||||||
|
var name = $.trim($("#homework_attach_description").val());
|
||||||
|
|
||||||
|
if(name=="")
|
||||||
|
{
|
||||||
|
$("#homework_attach_description_span").text("作品描述不能为空");
|
||||||
|
$("#homework_attach_description_span").css('color','#ff0000');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#homework_attach_description_span").text("填写正确");
|
||||||
|
$("#homework_attach_description_span").css('color','#008000');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function submit_homework_form(){if(regexHomeworkCommonName()&®exHomeworkCommonDescription()){$('#new_homework_attach').submit();}}
|
||||||
|
|
||||||
//增加测试结果
|
//增加测试结果
|
||||||
function add_programing_test(obj) {
|
function add_programing_test(obj) {
|
||||||
var now = new Date().getTime();
|
var now = new Date().getTime();
|
||||||
obj.after("<div><li><label class='label02'> 测试输入: </label><input type='text' class='fl h26 w186 mb10' name='input[" + now +"]'' />" +
|
obj.after("<div><li><label class='label02'> 测试输入: </label><input type='text' class='fl h26 w200 mb10' name='input[" + now +"]'' />" +
|
||||||
"</li><li ><label class='fl f14 ml10'> 输出: </label><input type='text' class='fl h26 w186 mb10' name='output[" + now +"]' />" +
|
"</li><li ><label class='fl f14 ml10'> 输出: </label><input type='text' class='fl h26 w200 mb10' name='output[" + now +"]' />" +
|
||||||
"</li><li><a class='icon_add ml10' href='javascript:void(0);' title='添加测试' onclick='add_programing_test($(this).parent().parent())'></a>" +
|
"</li><li><a class='icon_add ml10' href='javascript:void(0);' title='添加测试' onclick='add_programing_test($(this).parent().parent())'></a>" +
|
||||||
"<a class='icon_remove' href='javascript:void(0);' title='删除测试' onclick='remove_programing_test($(this).parent().parent())'></a>" +
|
"<a class='icon_remove' href='javascript:void(0);' title='删除测试' onclick='remove_programing_test($(this).parent().parent())'></a>" +
|
||||||
"<span class='green_btn fl ml5 mt1'>测试</span></li><div class='cl'></div></div>");
|
"</li><div class='cl'></div></div>");
|
||||||
}
|
}
|
||||||
//删除测试结果
|
//删除测试结果
|
||||||
function remove_programing_test(obj) {
|
function remove_programing_test(obj) {
|
||||||
|
|
|
@ -609,6 +609,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
||||||
.w547{ width:544px;}
|
.w547{ width:544px;}
|
||||||
.w196{ width:196px;}
|
.w196{ width:196px;}
|
||||||
.w186{ width:186px;}
|
.w186{ width:186px;}
|
||||||
|
.w200{width: 200px;}
|
||||||
.w459{ width:459px;}
|
.w459{ width:459px;}
|
||||||
.hwork_new_set{border:1px dashed #CCC; background:#f5f5f5; text-align:center; padding:10px 0; margin-bottom:10px;}
|
.hwork_new_set{border:1px dashed #CCC; background:#f5f5f5; text-align:center; padding:10px 0; margin-bottom:10px;}
|
||||||
.hwork_new_grey{background:#dbdbdb; width:610px; padding:10px 20px; margin:0 auto; text-align:left; margin-bottom:5px;}
|
.hwork_new_grey{background:#dbdbdb; width:610px; padding:10px 20px; margin:0 auto; text-align:left; margin-bottom:5px;}
|
||||||
|
|
|
@ -12,6 +12,7 @@ a:hover.lg-foot{ color:#787b7e;}
|
||||||
/*右侧内容--动态*/
|
/*右侧内容--动态*/
|
||||||
.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||||
.project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
|
.project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
|
||||||
|
.project_h22{ background:#64bdd9; color:#fff; height:33px; width:124px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
|
||||||
.project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;}
|
.project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;}
|
||||||
.project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;}
|
.project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;}
|
||||||
a.more{ float:right; font-size:12px; font-weight:normal; color:#a9a9a9; margin-top:3px;}
|
a.more{ float:right; font-size:12px; font-weight:normal; color:#a9a9a9; margin-top:3px;}
|
||||||
|
@ -752,3 +753,4 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
||||||
|
|
||||||
#about_newtalk{ display:none;}
|
#about_newtalk{ display:none;}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.w60{ width:60px;}
|
.w60{ width:60px;}
|
||||||
.w70{ width:70px;}
|
.w70{ width:70px;}
|
||||||
.w90{ width:90px;}
|
.w90{ width:90px;}
|
||||||
|
.w100{width: 100px;}
|
||||||
.w210{ width:210px;}
|
.w210{ width:210px;}
|
||||||
.w150{ width:150px;}
|
.w150{ width:150px;}
|
||||||
.w280{ width:280px;}
|
.w280{ width:280px;}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#RSide{ min-height:860px;}
|
#RSide{ min-height:1px;}
|
||||||
/* 左侧信息*/
|
/* 左侧信息*/
|
||||||
.users_info{background:#fff; padding:10px; width:230px; padding-right:0px; margin-bottom:10px; }
|
.users_info{background:#fff; padding:10px; width:230px; padding-right:0px; margin-bottom:10px; }
|
||||||
.pic_head{ width:214px; height:214px; border:1px solid #cbcbcb; padding:2px; position:relative;}
|
.pic_head{ width:214px; height:214px; border:1px solid #cbcbcb; padding:2px; position:relative;}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
FactoryGirl.define do
|
||||||
|
factory :dt, :class => 'Dts' do
|
||||||
|
IPLineCode "MyString"
|
||||||
|
Description "MyString"
|
||||||
|
Num "MyString"
|
||||||
|
Variable "MyString"
|
||||||
|
TraceInfo "MyString"
|
||||||
|
Method "MyString"
|
||||||
|
File "MyString"
|
||||||
|
IPLine "MyString"
|
||||||
|
Review "MyString"
|
||||||
|
Category "MyString"
|
||||||
|
Defect "MyString"
|
||||||
|
PreConditions "MyString"
|
||||||
|
StartLine "MyString"
|
||||||
|
project_id 1
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe Dts, :type => :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
Loading…
Reference in New Issue