Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
ouyangxuhua 2015-09-24 15:09:27 +08:00
commit c17a1555bf
65 changed files with 910 additions and 925 deletions

View File

@ -5,9 +5,9 @@ class HomeworkCommonController < ApplicationController
layout "base_courses"
include StudentWorkHelper
before_filter :find_course, :only => [:index,:new,:create,:next_step]
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
before_filter :find_course, :only => [:index,:new,:create]
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr]
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr]
before_filter :member_of_course, :only => [:index]
def index
@ -23,116 +23,11 @@ class HomeworkCommonController < ApplicationController
#新建作业,在个人作业列表创建作业
def new
render_404
# @homework_type = "1"
#
# @homework = HomeworkCommon.new
# @homework.safe_attributes = params[:homework_common]
# @homework.late_penalty = 2
# @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 = 2
# @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
end
#新建作业,在个人作业列表创建作业
def create
redirect_to user_homeworks_user_path(User.current.id)
# if params[:homework_common]
# homework = HomeworkCommon.new
# homework.name = params[:homework_common][:name]
# homework.description = params[:homework_common][:description]
# homework.end_time = params[:homework_common][:end_time]
# homework.publish_time = params[:homework_common][:publish_time]
# homework.homework_type = params[:homework_common][:homework_type]
# homework.late_penalty = params[:late_penalty]
# homework.user_id = User.current.id
# homework.course_id = @course.id
#
# homework.save_attachments(params[:attachments])
# render_attachment_warning_if_needed(homework)
#
# if homework.homework_type == 2
# homework_detail_programing = HomeworkDetailPrograming.new
# homework_detail_programing.language = params[:language]
# 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[:input] = []
# question[:output] = []
# if params[:input] && params[:output] && params[:result]
# params[:input].each do |k,v|
# if params[:output].include? k
# homework_test = HomeworkTest.new
# homework_test.input = v
# homework_test.output = params[:output][k]
# homework_test.result = params[:result][k]
# homework_test.error_msg = params[:error_msg]
# homework.homework_tests << homework_test
# question[:input] << homework_test.input
# question[:output] << homework_test.output
# end
# end
# end
#
# # uri = URI('http://192.168.80.21:8080/api/questions.json')
# # body = question.to_json
# # res = Net::HTTP.new(uri.host, uri.port).start do |client|
# # request = Net::HTTP::Post.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
#
# homework.homework_detail_programing = homework_detail_programing
# else
# #匿评作业相关属性
# homework_detail_manual = HomeworkDetailManual.new
# homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
# homework_detail_manual.comment_status = 1
# homework_detail_manual.evaluation_start = params[:evaluation_start]
# homework_detail_manual.evaluation_end = params[:evaluation_end]
# homework_detail_manual.evaluation_num = params[:evaluation_num]
# homework_detail_manual.absence_penalty = params[:absence_penalty]
# homework.homework_detail_manual = homework_detail_manual
# end
#
# if homework.save
# homework_detail_programing.save if homework_detail_programing
# homework_detail_manual.save if homework_detail_manual
# respond_to do |format|
# format.html {
# flash[:notice] = l(:notice_successful_create)
# redirect_to homework_common_index_path(:course => @course.id)
# }
# end
# return
# end
# end
#
# respond_to do |format|
# format.html {
# flash[:notice] = l(:notice_failed_create)
# redirect_to new_homework_common_path(:course => @course.id)
# }
# end
end
def edit
@ -150,6 +45,10 @@ class HomeworkCommonController < ApplicationController
@homework.end_time = params[:homework_common][:end_time] || Time.now
@homework.course_id = params[:course_id]
homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new
homework_detail_manual.evaluation_start = params[:evaluation_start].blank? ? @homework.end_time + 7 : params[:evaluation_start]
homework_detail_manual.evaluation_end = params[:evaluation_end].blank? ? homework_detail_manual.evaluation_start + 7 : params[:evaluation_end]
@homework.save_attachments(params[:attachments])
render_attachment_warning_if_needed(@homework)
@ -290,6 +189,27 @@ class HomeworkCommonController < ApplicationController
end
end
#启动匿评参数设置
def start_evaluation_set
end
#设置匿评参数
def set_evaluation_attr
if @homework_detail_manual
unless params[:evaluation_start].to_s == @homework_detail_manual.evaluation_start.to_s
@homework_detail_manual.evaluation_start = params[:evaluation_start]
end
unless @homework_detail_manual.evaluation_end.to_s == params[:evaluation_end].to_s
@homework_detail_manual.evaluation_end = params[:evaluation_end]
end
@homework_detail_manual.evaluation_num = params[:evaluation_num]
@homework_detail_manual.save
end
end
private
#获取课程
def find_course

View File

@ -188,7 +188,7 @@ class ProjectsController < ApplicationController
@project.safe_attributes = params[:project]
@project.organization_id = params[:organization_id]
@project.user_id = User.current.id
@project.project_new_type = 1
@project.project_new_type = params[:project_new_type]
if validate_parent_id && @project.save
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
# Add current user as a project member if he is not admin

View File

@ -77,28 +77,60 @@ class StudentWorkController < ApplicationController
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
@is_evaluation = @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评
@show_all = false
if @is_teacher #老师 || 超级管理员 显示所有列表
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
@show_all = true
elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
@stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表
my_work = @homework.student_works.where(:user_id => User.current.id)
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
if my_work.empty?
@stundet_works = []
course_group = CourseGroup.find_by_id(@group) if @group
if course_group
group_students = course_group.users
if group_students.empty?
student_in_group = '(0)'
else
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')'
end
if @is_teacher #老师 || 超级管理员 显示所有列表
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name
@show_all = true
elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
@stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表
my_work = @homework.student_works.where(:user_id => User.current.id)
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
if my_work.empty?
@stundet_works = []
else
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name
@show_all = true
end
else
@stundet_works = []
end
else
@stundet_works = []
if @is_teacher #老师 || 超级管理员 显示所有列表
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
@show_all = true
elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
@stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表
my_work = @homework.student_works.where(:user_id => User.current.id)
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
if my_work.empty?
@stundet_works = []
else
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
@show_all = true
end
else
@stundet_works = []
end
end
@score = @b_sort == "desc" ? "asc" : "desc"
respond_to do |format|
format.js
format.html
format.xls {
send_data(homework_to_xls(@stundet_works), :type => "text/excel;charset=utf-8; header=present",

View File

@ -480,8 +480,8 @@ class UsersController < ApplicationController
homework_detail_manual = HomeworkDetailManual.new
homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.3
homework_detail_manual.comment_status = 1
homework_detail_manual.evaluation_start = Time.now
homework_detail_manual.evaluation_end = Time.now
homework_detail_manual.evaluation_start = params[:evaluation_start].blank? ? homework.end_time + 7 : params[:evaluation_start]
homework_detail_manual.evaluation_end = params[:evaluation_end].blank? ? homework_detail_manual.evaluation_start + 7 : params[:evaluation_end]
homework_detail_manual.evaluation_num = params[:evaluation_num] || 3
homework_detail_manual.absence_penalty = 5
homework.homework_detail_manual = homework_detail_manual

View File

@ -2306,7 +2306,7 @@ module ApplicationHelper
when 2
link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink'
when 3
link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束"
# link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束"
end
else
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于2时才可以启动匿评"

View File

@ -94,6 +94,18 @@ module ProjectsHelper
type
end
# 项目类型描述
def project_newtype_descrption
case params
when 1
value = l(:label_type_des_development)
when 2
value = l(:label_type_des_research)
when 3
value = l(:label_type_des_friend)
end
end
# 被邀请成员的状态
def status_for_ivitied(ivite_list, project)
if ivite_list.user.member_of?(project)

View File

@ -45,7 +45,7 @@ class StudentWorkTest < ActiveRecord::Base
private
def get_success_count
self.results.inject(0) do |sum, result|
sum += (result["status"].to_i == 0 ? 1 : 0)
sum += (result["status"] && result["status"].to_i == 0 ? 1 : 0)
end || 0
end

View File

@ -99,7 +99,7 @@
// }
});
</script>
<div class="project_board_content break_word f14" id="content_<%=topic.id%>">
<div class="project_board_content break_word f14 list_style" id="content_<%=topic.id%>">
<div id="contentmessage<%=topic.id %>" class="upload_img">
<%= topic.content.html_safe %>
<!-- -->
@ -165,7 +165,7 @@
<div class="Msg_txt">
<%= link_to User.current.member_of_course?(@board.course) ? "#{message.author.show_name}(#{message.author.login})" : "#{message.author}", user_path(message.author),:class => 'fl c_orange f14 ' %>
<br/>
<div class="fl break_word f14">
<div class="fl break_word f14 list_style">
<%= textAreailizable message,:content,:attachments => message.attachments %>
<!-- -->
</div>

View File

@ -92,7 +92,7 @@
</script>
<div class="cl"></div>
<div class="project_board_content break_word f14" id="content_<%=topic.id%>">
<div class="project_board_content break_word f14 list_style" id="content_<%=topic.id%>">
<div id="contentmessage<%=topic.id %>" class="upload_img">
<%= topic.content.html_safe %>
<!-- -->
@ -150,7 +150,7 @@
<div class="Msg_txt">
<%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %>
<br/>
<div class="fl break_word f14">
<div class="fl break_word f14 list_style">
<%= textAreailizable message,:content,:attachments => message.attachments %>
<!-- -->
</div>

View File

@ -7,7 +7,7 @@
<a class="problem_pic fl">
<%= image_tag(url_to_avatar(activity.user), :width => "42", :height => "42") %>
</a>
<div class="problem_txt fl mt5 upload_img">
<div class="problem_txt fl mt5 upload_img list_style">
<%= link_to_user_header(activity.user,false,:class => 'problem_name c_orange fl') %>
<span class="fl"> &nbsp;</span>
<span class="fl"> <%= activity.course_act_type == "Course" ? "创建了课程" : l(:label_new_activity) %></span>

View File

@ -1,110 +0,0 @@
<ul class="hwork_new_basic mb10">
<li>
<label class="label02 mb20">
<span class="c_red">*</span>
&nbsp;<%= l(:field_name)%>&nbsp;
</label>
<input type="text" name="homework_common[name]" id="homework_name" class="w548 h26 fl" maxlength="255" onkeyup="regex_homework_name();" value="<%= homework.name%>" >
<p id="homework_name_span" class="c_red ml110"></p>
</li>
<div class="cl"></div>
<li >
<label class="label02 ">&nbsp;&nbsp;&nbsp;<%= l(:field_quote)%>&nbsp;</label>
<div style="width: 83%;float: left;">
<% if edit_mode %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
<% else %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor' %>
<% end %>
</div>
</li>
<div class="cl"></div>
<li class="mt10">
<label class="label02">&nbsp;&nbsp;附件:&nbsp;</label>
<%= render :partial => 'attachments/new_form', :locals => {:container => homework} %>
</li>
<div class="cl"></div>
<li class="fl">
<label class="label02">
<span class="c_red">*</span>
&nbsp;<%= l(:label_limit_time)%>&nbsp;
</label>
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.end_time%>" >
<%= calendar_for('homework_end_time')%>
<div class="cl"></div>
</li>
<li class="fl ml100" style="display: none;">
<label class="label02">&nbsp;发布日期:&nbsp;</label>
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.publish_time%>" >
<%= calendar_for('homework_publish_time')%>
<div class="cl"></div>
</li>
<div class="cl"></div>
</ul><!--hwork_new_basic end--->
<div class="hwork_new_set" >
<p class="fl ml20 f14 mb10 c_orange">基本规则设置总分为100分</p>
<div class="cl"></div>
<ul class="ml10">
<li>
<label class="label02">迟交扣分:&nbsp;</label>
<%#= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
<input type="number" value="<%= homework.late_penalty%>" min="0" max="50" class="fl mb10 h26 w70" name="late_penalty" onkeyup="check_late_penalty()">
<span class="fl mt5">&nbsp;分</span>
<div class="cl"></div>
</li>
<li style="display: none;">
<label class="label02" >是否匿评:&nbsp;</label>
<%= f.check_box :homework_type, :class => "mb10 mt5 fl" %>
<div class="cl"></div>
</li>
<li >
<label class="label02">评分比例:&nbsp;</label>
<%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_manual.ta_proportion), {:class => "fl mb10 h26 w70"} %>
<span class="ml5 fl mt5">×&nbsp;教辅评分</span>
<span class="ml5 fl mt5">&nbsp;&nbsp;+&nbsp;&nbsp;</span>
<input type="text" id="student_proportion" value="<%= (100 - homework.homework_detail_manual.ta_proportion* 100).to_i%>%" class="fl mb10 h26 w70" readonly>
<span class="ml5 fl mt5">×&nbsp;匿评得分</span>
<span class="ml5 fl mt5">=&nbsp;学生得分</span>
<div class="cl"></div>
</li>
<li >
<label class="label02" >&nbsp;&nbsp;</label>
<span class=" fl c_red">如果教师对学生作品进行了评分,则教师评分为学生最终得分。</span>
<div class="cl"></div>
</li>
</ul>
</div><!--hwork_new_set end-->
<div class="hwork_new_set" id="evaluation_setting" >
<p class="fl ml20 f14 mb10 c_orange">学生互评设置</p>
<div class="cl"></div>
<ul class="ml10">
<li style="display: none;">
<label class="label02">互评启动时间:&nbsp;</label>
<input type="text" name="evaluation_start" id="evaluation_start_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_start%>" >
<%= calendar_for('evaluation_start_time')%>
<div class="cl"></div>
</li>
<li style="display: none;">
<label class="label02">互评结束时间:&nbsp;</label>
<input type="text" name="evaluation_end" id="evaluation_end_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_end%>" >
<%= calendar_for('evaluation_end_time')%>
<div class="cl"></div>
</li>
<li >
<label class="label02">匿评分配数:&nbsp;</label>
<input type="text" name="evaluation_num" id="evaluation_num" class=" hwork_input02 fl" value="<%= homework.homework_detail_manual.evaluation_num%>" maxlength="2" onkeyup="regex_evaluation_num()">
<p class="ml5 fl mt5" id="evaluation_num_notice">每个学生将收到<span class="c_red">&nbsp;3&nbsp;</span>份待匿评作品</p>
<div class="cl"></div>
</li>
<li>
<label class="label02">缺评扣分:&nbsp;</label>
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
<span class="fl mt5">&nbsp;分</span>
<p class="ml5 fl mt5">学生漏评1个作品将扣<span class="c_red" id="absence_penalty_notice">&nbsp;<%= homework.homework_detail_manual.absence_penalty%>&nbsp;</span>分</p>
<div class="cl"></div>
</li>
</ul> <!-- h1 end--->
</div><!--hwork_new_set end-->

View File

@ -1,193 +0,0 @@
<ul class="hwork_new_basic">
<li >
<label class="label02 mb20">
<span class="c_red">*</span>
&nbsp;<%= l(:field_name)%>&nbsp;
</label>
<input type="text" name="homework_common[name]" id="homework_name" class="w548 h26 fl" maxlength="255" onkeyup="regex_homework_name();" value="<%= homework.name%>" >
<p id="homework_name_span" class="c_red ml110"></p>
</li>
<div class="cl"></div>
<li >
<label class="label02 ">&nbsp;&nbsp;&nbsp;<%= l(:field_quote)%>&nbsp;</label>
<div style="width: 83%;float: left;">
<% if edit_mode %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
<% else %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor' %>
<% end %>
</div>
</li>
<div class="cl"></div>
<li class="mt10">
<label class="label02">&nbsp;&nbsp;附件:&nbsp;</label>
<%= render :partial => 'attachments/new_form', :locals => {:container => homework} %>
</li>
<div class="cl"></div>
<li class="fl">
<label class="label02">
<span class="c_red">*</span>
&nbsp;<%= l(:label_limit_time)%>&nbsp;
</label>
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.end_time%>" >
<%= calendar_for('homework_end_time')%>
<div class="cl"></div>
</li>
<li class="fl ml100" style="display: none;">
<label class="label02">&nbsp;发布日期:&nbsp;</label>
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.publish_time%>" >
<%= calendar_for('homework_publish_time')%>
<div class="cl"></div>
</li>
<li>
<label class="label02">迟交扣分:&nbsp;</label>
<%#= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
<input type="number" value="<%= homework.late_penalty%>" min="0" max="50" class="fl mb10 h26 w70" name="late_penalty" onkeyup="check_late_penalty()">
<span class="fl mt5">&nbsp;分</span>
<div class="cl"></div>
</li>
</ul><!--hwork_new_basic end--->
<div class="cl"></div>
<div class="hwork_new_set">
<p class="fl ml20 f14 mb10 c_orange">编程评测设置</p>
<div class="cl"></div>
<ul>
<li >
<label class="label02">&nbsp;开发语言:&nbsp;</label>
<%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language.to_i), {:class => "fl mb10 h26 w70",:onchange => "homework_language_change($(this));"} %>
<div class="cl"></div>
</li>
<li >
<label class="label02">评分比例:&nbsp;</label>
<%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_programing.ta_proportion), {:class => "fl mb10 h26 w70"} %>
<span class="ml5 fl mt5">×&nbsp;教辅评分</span>
<span class="ml5 fl mt5">&nbsp;&nbsp;+&nbsp;&nbsp;</span>
<input type="text" id="student_proportion" value="<%= (100 - homework.homework_detail_programing.ta_proportion* 100).to_i%>%" class="fl mb10 h26 w70" readonly>
<span class="ml5 fl mt5">×&nbsp;系统评分</span>
<span class="ml5 fl mt5">=&nbsp;学生得分</span>
<div class="cl"></div>
</li>
<li >
<label class="label02" >&nbsp;&nbsp;</label>
<span class=" fl c_red">如果教师对学生作品进行了评分,则教师评分为学生最终得分。</span>
<div class="cl"></div>
</li>
<li >
<label class="label02">&nbsp;标准代码:&nbsp;</label>
<textarea name="standard_code" class=" w547 h400 mb10 fl" oninput="init_programing_test();" onpropertychange="init_programing_test()"><%= homework.homework_detail_programing.standard_code || c_stantard_code_teacher%></textarea>
<div class="cl"></div>
</li>
<% if edit_mode %>
<% homework.homework_tests.each do |homework_test|%>
<div>
<li>
<label class="label02">&nbsp;测试输入:&nbsp;</label>
<input type="text" class="fl h26 w190 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
</li>
<li >
<label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label>
<input type="text" class="fl h26 w190 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
</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>
<% if homework_test.result && !homework_test.result.to_s.empty?%>
<% if homework_test.result == 0%>
<a class="green_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">正确</a>
<% else%>
<a class="red_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">错误</a>
<% end%>
<% else%>
<a class="blue_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">测试</a>
<% end%>
<input type="hidden" id="test_result_<%= homework_test.id%>" name="result[<%= homework_test.id%>]" value="<%= homework_test.result%>"/>
</li>
<div class="cl"></div>
</div>
<% end%>
<% else %>
<div>
<li>
<label class="label02">&nbsp;测试输入:&nbsp;</label>
<input type="text" class="fl h26 w190 mb10" name="input[0]" value="1 2"/>
</li>
<li >
<label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label>
<input type="text" class="fl h26 w190 mb10" name="output[0]" value="3"/>
</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="blue_btn fl ml5 mt programing_test" onclick="programing_test('0')" id="test_send_0">测试</a>
<input type="hidden" id="test_result_0" name="result[0]" />
</li>
<div class="cl"></div>
</div>
<% end %>
<input type="hidden" name="error_msg" id="homework_test_error_msg" value="<%= homework.homework_tests.first.error_msg if homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg%>">
<table class="border_ce" cellpadding="0" cellspacing="0" id="homework_work_test_show" style="display: <%= homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg && !homework.homework_tests.first.error_msg.empty? ? "block" : "none"%>">
<tbody>
<tr class="border_t" >
<td class="td_end fb c_red w60 td_board_left">
错误信息:
</td>
<td class="td_end wl" id="homework_work_test_desc">
<% if homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg %>
<%= homework.homework_tests.first.error_msg%>
<% end%>
</td>
</tr>
</tbody>
</table>
</ul>
</div>
<script type="text/javascript">
//点击测试,发送
function programing_test(obj) {
$.post(
'<%= programing_test_homework_common_index_path%>',
{
src: $("textarea[name='standard_code']").val(),
input: $("input[name='input[" + obj +"]']").val(),
output: $("input[name='output[" + obj + "]']").val(),
language: $("select[name='language']").val(),
index: obj
},
function (data) {
}
);
}
function init_programing_test()
{
$(".programing_test").each(function(){
$(this).removeClass("green_btn red_btn").addClass("blue_btn").text("测试");
$(this).next("input").val("");
});
}
function homework_language_change(obj)
{
if(obj.val() == "1")
{
// alert(1);
$("textarea[name='standard_code']").val("<%= escape_javascript c_stantard_code_teacher%>");
}
else if(obj.val() == "2")
{
// alert(2);
$("textarea[name='standard_code']").val("<%= escape_javascript c_stantard_code_teacher_%>");
}
}
</script>

View File

@ -1,74 +0,0 @@
<div class="homepageRight">
<div class="HomeWork">
<div class="RightBanner">
<div class="NewsBannerName">发布作业</div>
</div>
<div class="HomeWorkCon">
<div class="mt15">
<textarea class="InputBox W700 " placeholder="请输入作业标题" name="homework_common[name]" id="homework_name" maxlength="255" onkeyup="regex_homework_name();" value="<%= homework.name%>"></textarea>
</div>
<div class=" mt10">
<a href="javascript:void(0);" class="BlueCirBtn fl mr10">导入作业</a>
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="InputBox fl W120 date-input" readonly="readonly" value="<%= homework.end_time%>" placeholder="截止日期"></input>
<div class="fl DateBorder mr10"><a href="javascript:void(0);" class="pic_date"></a></div>
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="InputBox fl W120 date-input" readonly="readonly" value="<%= homework.publish_time%>" placeholder="发布日期"></input>
<div class="fl DateBorder"><a href="javascript:void(0);" class="pic_date"></a></div>
<div class="cl"></div>
</div>
<div class="mt10">
<% if edit_mode %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
<% else %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor' %>
<% end %>
</div>
<div class="mt10">
<textarea class="InputBox W700 SearchIcon" placeholder="发送到课程" style="margin-top: 0px; margin-bottom: 0px; height: 29px;"></textarea>
</div>
<div class="mt5">
<a href="javascript:void(0);" class="AnnexBtn fl mt3 mr20">上传附件</a>
<a href="javascript:void(0);" class="FilesBtn fl mr15 mt3">资源库</a>
<div class="cl"></div>
</div>
<div class="mt10">
<a href="javascript:void(0);" class=" fl DropBtn">高级功能</a>
<div class="DropLine"></div>
<div class="cl"></div>
</div>
<div class="advanced_option" style="display:none;">
<div class="mt10">
<select class="InputBox W120" required="true">
<option value="语言选择">语言选择</option>
<option value="C语言">C语言</option>
<option value="C++">C++</option>
</select>
</div>
<div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" required></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" required></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
<div class="cl"></div>
</div>
</div>
<div class="mt10">
<a href="javascript:void(0);" onClick="submit_homework('new_homework_common');" class="BlueCirBtnMini fr">发布</a>
<span class="fr mr10 mt3">或</span><%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'fr mr10 mt3'%>
<div class="cl"></div>
</div>
</div>
</div><!----HomeWork end-->
</div>
<script id="t:test-answer-list" type="text/html">
<div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" required></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" required></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
<div class="cl"></div>
</div>
</script>

View File

@ -0,0 +1,53 @@
<div class="markPopup" id="popbox02">
<%= form_for('new_form',:url => {:controller => 'homework_common',:action => 'set_evaluation_attr',:homework => @homework.id},:method => "post",:remote => true) do |f|%>
<span class="uploadText">匿评设置</span>
<div class="cl"></div>
<div class="mt15">
<span class="f14 fontGrey3 fl mt5">开启匿评</span>
<div class="calendar_div fl ml10">
<input type="text" name="evaluation_start" id="evaluation_start_time" placeholder="开启匿评日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= @homework_detail_manual.evaluation_start%>"/>
<%= calendar_for('evaluation_start_time')%>
</div>
<div class="cl"></div>
<p id="homework_evaluation_start_time" class="c_red"></p>
</div>
<div class="cl"></div>
<div class="mt15">
<span class="f14 fontGrey3 fl mt5">关闭匿评</span>
<div class="calendar_div fl ml10">
<input type="text" name="evaluation_end" id="evaluation_end_time" placeholder="关闭匿评日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= @homework_detail_manual.evaluation_end%>"/>
<%= calendar_for('evaluation_end_time')%>
</div>
<div class="cl"></div>
<p id="homework_evaluation_end_time" class="c_red"></p>
</div>
<div class="cl"></div>
<div class="mt15 mb10">
<span class="f14 fontGrey3 mr10 fl mt5">匿评人数</span>
<input type="text" name="evaluation_num" id="evaluation_num" placeholder="默认匿评人数为3" maxlength="2" class="markInput fl" value="<%= @homework_detail_manual.evaluation_num%>"/>
<div class="cl"></div>
<p id="evaluation_num_notice" class="c_red"></p>
</div>
<div class="cl"></div>
<div class="mb20 none">
<span class="f14 fontGrey3 mr10">禁用匿评</span>
<input type="checkbox" />
<span class="f12 c_red ml10">禁用后将无法进行学生互评</span>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<a href="javascript:void(0);" class="sendSourceText" onclick="submit_set_evaluation_attr('<%= @homework.end_time%>');">确定</a>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText linkGrey6" onclick="clickCanel();">取消</a>
</div>
</div>
<div class="cl"></div>
<% end%>
</div>

View File

@ -25,9 +25,9 @@
( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )
</p>
<% if @is_teacher%>
<%= homework_anonymous_comment(homework)%>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework,:is_in_course => 1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
<%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit") %>
<%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit ml10") %>
<%= homework_anonymous_comment(homework)%>
<% elsif @is_student%>
<%= student_anonymous_comment homework %>
<%= student_new_homework homework %>
@ -37,7 +37,7 @@
$(function(){if($("#bid_description_<%= homework.id%>_content").height()>360){$("#bid_show_more_des_button<%= homework.id%>").show();}});
</script>
<div id="bid_description_<%= homework.id%>" class="news_description mt5">
<div id="bid_description_<%= homework.id%>_content" class="upload_img">
<div id="bid_description_<%= homework.id%>_content" class="upload_img list_style">
<%= homework.description.html_safe %>
</div>
</div>

View File

@ -1,17 +0,0 @@
<%= 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">
<%= 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>

View File

@ -1,30 +0,0 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<%= error_messages_for 'homework_common' %>
<div class="project_r_h">
<h2 class="project_h2">
<%= l(:label_course_homework_new)%>
</h2>
</div>
<% if @homework_type == "1"%>
<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-->
<% elsif @homework_type == "2"%>
<div class="hwork_new">
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
<%= hidden_field_tag "course",@course.id%>
<%= hidden_field_tag "homework_common[homework_type]","2"%>
<%= render :partial => 'homework_common/homework_detail_programing_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>
<% end%>

View File

@ -0,0 +1 @@
clickCanel();

View File

@ -0,0 +1,6 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_common/set_evalutation_att') %>');
showModal('ajax-modal', '350px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed");

View File

@ -1,2 +1,2 @@
$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('<a class="postOptionLink" title="匿评结束" href="javascript:void(0);">匿评结束</a>');
$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('');
alert('关闭成功');

View File

@ -45,13 +45,134 @@
<div class="cl"></div>
<!--属性-->
<<<<<<< .mine
<%= render :partial => 'attributes_show' %>
<!--pro_info_box 属性 end-->
=======
<div class="pro_info_box mb10">
<%= issue_fields_rows do |rows| %>
<ul class="fl">
<li><p class="label03">&nbsp;状态&nbsp;&nbsp;:&nbsp;</p>
<p class="pro_info_p"><%= @issue.status.name %></p>
</li>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('assigned_to_id') %>
<li><p class="label03">&nbsp;指派给&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p"><%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %></span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<ul class="fl">
<li><p class="label03">&nbsp;优先级&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p" style="width:50px;"><%= @issue.priority.name %></span>
</li>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('done_ratio') %>
<li><p class="label03">&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p" style="width:50px;"><%= @issue.done_ratio %>%</span>
</li>
<% end %>
<div class="cl"></div>
</ul>
>>>>>>> .theirs
<<<<<<< .mine
<%# 该应用是对issue主题内容的引用对应:to => 'journals#new %>
<!--<div class="cl"></div>-->
<!--<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %>-->
<div class="cl"></div>
=======
<ul class="fl ">
<% unless @issue.disabled_core_fields.include?('start_date') %>
<li><p class="label03" style="width:50px;">&nbsp;开始&nbsp;&nbsp;:&nbsp;</p>
<p class="pro_info_p"><%= format_date(@issue.start_date) %></p>
</li>
<% end %>
<div class="cl"></div>
>>>>>>> .theirs
<<<<<<< .mine
=======
<% unless @issue.disabled_core_fields.include?('estimated_hours') %>
<li><p class="label03" style="width:50px;">&nbsp;周期&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p"><%= l_hours(@issue.estimated_hours) %></span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<ul class="fl ">
<% unless @issue.disabled_core_fields.include?('due_date') %>
<li><p class="label03">&nbsp;计划完成&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p" style="width:120px;"><%= format_date(@issue.due_date) ? format_date(@issue.due_date) : "--" %></span>
</li>
<% end %>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
<li><p class="label03">&nbsp;目标版本&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p" style="width:120px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<% end %><!--pro_info_box end-->
<%#= render_custom_fields_rows(@issue) %>
<%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
>>>>>>> .theirs
</div>
<!--problem_main end-->

View File

@ -1,9 +1,9 @@
<style type="text/css">
html{ overflow-x:hidden;}
.scrollsidebar{ position:fixed;bottom:1px; right:1px; background:none; }
.scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; }
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
.side_content .side_list {width:154px;overflow:hidden;}
.show_btn{ width:0; height:112px; overflow:hidden; float:left;margin-top: 200px; cursor:pointer;}
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;}
.show_btn span { display:none;}
.close_btn{width:24px;height:24px;cursor:pointer;}
.side_title,.side_bottom,.close_btn,.show_btn {background:url(/images/sidebar_bg.png) no-repeat; }
@ -13,21 +13,21 @@
.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;}
.close_btn span { display:none;}
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
.msgserver { margin:2px 0px 0px 4px; padding-top: 0px}
.msgserver a { padding-left:4px;}
.opnionText{ width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;}
.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;}
.opnionButton:hover{background: #0fa9bb; }
/* blue skin as the default skin */
.side_title {background-position:-195px 0;}
.side_center {background:url(/images/blue_line.png) repeat-y center;}
.side_bottom {background-position:-195px -50px;}
.close_btn {background-position:-44px 0;}
.close_btn:hover {background-position:-66px 0;}
.show_btn {background-position:-119px 0;}
.msgserver a {color:#15bccf; }
.msgserver a:hover { text-decoration:underline; }
.msgserver { margin:10px 0 0px 5px;}
.msgserver a { background:url(/images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; }
.opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}
a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;}
a.opnionButton:hover{background: #297fb8; }
/* blue skin as the default skin */
.side_title {background-position:-195px 0;}
.side_center {background:url(/images/blue_line.png) repeat-y center; }
.side_bottom {background-position:-195px -50px;}
.close_btn {background-position:-44px 0;}
.close_btn:hover {background-position:-66px 0;}
.show_btn {background-position:-119px 0;}
.msgserver a {color:#269ac9; }
.msgserver a:hover { text-decoration:underline; }
.closeSidebar {background:url(/images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;}
</style>
<head>
@ -39,7 +39,7 @@
minStatue : true,
skin : 'blue',
durationTime : 1000
}
};
var options = $.extend(defaults, options);
this.each(function(){
@ -56,13 +56,13 @@
if(options.minStatue == "true"){
$(".show_btn").css("float", options.float);
sideContent.css('width', 0);
show_btn.css('width', 25);
show_btn.css('width', 29);
}
//close
closeBtn.bind("click",function(){
sideContent.animate({width: '0px'},"fast");
show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast");
show_btn.stop(true, true).delay(300).animate({ width: '29px'},"fast");
cookiesave('minStatue','true','','','');
});
//show
@ -83,14 +83,10 @@ $(function(){
$("#button1").click(function(){
myTips("<%= l(:label_feedback_success) %>","success");
});
});
function f_submit()
{
// var subject = $("#memo_subject").val();
// var content = $("#memo_content_1").val();
// $("#memo_subject").val(subject+""+ content.substr(0,18)+"...");
$("#new_memo").submit();
}
@ -169,15 +165,15 @@ function cookieget(n)
<div class="side_center">
<div class="custom_service">
<% get_memo %>
<% if @public_forum %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
<% end %>
<% end %>
<% if @public_forum %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
<% end %>
<% end %>
</div>
<div class="msgserver">
<a target="hiddentab" href="http://wpa.qq.com/msgrd?v=1&uin=1554253403&site=qq&menu=yes" style="color: #15BCCF;">
@ -188,6 +184,9 @@ function cookieget(n)
<div class="side_bottom"></div>
</div>
</div>
<div class="show_btn"><span><%= l(:label_submit)%></span></div>
<div class="show_btn">
<%= l(:label_submit)%>
<a href="#" class="closeSidebar"></a>
</div>
</div>
</body>

View File

@ -30,6 +30,7 @@
</div>
</div>
<div class="show_btn">
<span>在线客服</span>
<span><%= l(:label_submit)%></span>
<a href="javascript:void(0)" class="closeSidebar"></a>
</div>
</div>

View File

@ -170,9 +170,9 @@
<div class=" mt10">
<h3 class="mb10 c_blue">请选择项目类型:</h3>
<ul class="mb10" id="project_type">
<li><input type="radio" name="project_type" <%= @project.project_new_type == 1 ? 'checked' : ''%> id="development_group"/><label class="f14">&nbsp;&nbsp;开发模式:<span class="f12 ml5 c_grey">为团队开发提供一系列在线协同工具。</span></label></li>
<li><input type="radio" name="project_type" <%= @project.project_new_type == 2 ? 'checked' : ''%> id="research_group"/><label class="f14">&nbsp;&nbsp;研讨模式:<span class="f12 ml5 c_grey">为小组研究提供阶段汇报和交流工具。</span></label></li>
<li><input type="radio" name="project_type" <%= @project.project_new_type == 3 ? 'checked' : ''%> id="friend_organization"/><label class="f14">&nbsp;&nbsp;圈子模式:<span class="f12 ml5 c_grey">为朋友圈提供简洁的交流和分享工具。</span></label></li>
<li><input type="radio" name="project_type" <%= @project.project_new_type == 1 ? 'checked' : ''%> id="development_group"/><label class="f14">&nbsp;&nbsp;开发模式:<span class="f12 ml5 c_grey">面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。</span></label></li>
<li><input type="radio" name="project_type" <%= @project.project_new_type == 2 ? 'checked' : ''%> id="research_group"/><label class="f14">&nbsp;&nbsp;研讨模式:<span class="f12 ml5 c_grey">面向小组研究,支持任务分工、论坛交流、资源分享等。</span></label></li>
<li><input type="radio" name="project_type" <%= @project.project_new_type == 3 ? 'checked' : ''%> id="friend_organization"/><label class="f14">&nbsp;&nbsp;圈子模式:<span class="f12 ml5 c_grey">面向好友分享,支持论坛交流、资源分享等。</span></label></li>
</ul>
<a href="javascript:void(0)" class="orange_btn" onclick="click_ok('<%= change_project_type_project_path @project%>');" >确定</a>
</div>

View File

@ -7,7 +7,7 @@
<% 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">
<div class="problem_txt fl mt5 list_style">
<%= 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) %>

View File

@ -4,7 +4,7 @@
</div>
<div class="problem_main">
<%= 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">
<div class="problem_txt fl mt5 list_style">
<h4 class="r_txt_tit mb5">
<%=h @news.title %>
</h4>
@ -51,7 +51,7 @@
<div class="ping_C mb10">
<div><%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author), :class => "problem_pic fl"%></div>
<div class="ping_discon">
<div class="ping_distop upload_img break_word">
<div class="ping_distop upload_img break_word list_style">
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %>
<span class="c_grey fr">
<%= format_time(comment.created_on) %>

View File

@ -31,7 +31,7 @@
<% @newss.each do |news| %>
<div class="problem_main">
<%= 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">
<div class="problem_txt fl mt5 list_style">
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %>
<span class="fl"> <%= l(:label_add_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_news" %><br />

View File

@ -14,7 +14,7 @@
<div class="problem_main">
<%= 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">
<div class="problem_txt fl mt5 list_style">
<h4 class="r_txt_tit mb5"> <%=h @news.title %></h4>
<%#= watcher_link(@news, User.current) %>
<%= link_to(l(:button_edit),

View File

@ -22,3 +22,21 @@
<div class="cl"></div>
</div><!--编辑头部 end-->
<% end%>
<script type="text/javascript">
$(function(){
if($('#polls_description_div').html().trim() == '') {
$('#polls_description_div').html("<p style='color:#999999'>问卷描述</p>");
}
});
$('#polls_description_div').focus(function(){
//alert($('#polls_description_div').html().trim());
if(/^\s*<\w*\s*\w*\=\"\w*\:\s*\#\d*\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test($('#polls_description_div').html().trim())) {
$('#polls_description_div').html('');
}
}).blur(function(){
if($('#polls_description_div').html().trim() == '') {
$('#polls_description_div').html("<p style='color:#999999'>问卷描述</p>");
}
});
</script>

View File

@ -17,7 +17,8 @@
<div class="cl"></div>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_type_project)%>&nbsp;&nbsp;</label>
<%= select_tag :project_new_type, options_for_select(project_type_select, @project.project_new_type) %><span class=" ml15 c_orange">开发模式开发模式开发模式开发模式开发模式开发模式开发模式开发模</span>
<%= select_tag :project_new_type, options_for_select([["开发模式", "1"], ["研讨模式", "2"], ["圈子模式", "3"]]) %>
<span class=" ml15 c_orange" id = "project_newtype_select"><%=l(:label_type_des_development) %></span>
</li>
<div class="cl"></div>
<li class="ml45">
@ -89,5 +90,23 @@
$("#new_project").submit();
}
}
$(function(){
$('#project_new_type').change(function(){
var type = $('#project_new_type').val();
if(type == '1'){
$(this).next().html("<%= l(:label_type_des_development)%>");
}
else if(type == '2'){
$(this).next().html("<%= l(:label_type_des_research)%>");
}
else if(type == '3'){
$(this).next().html("<%= l(:label_type_des_friend)%>");
}
// var p1=$(this).children('option:selected').val("研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。");//这就是selected的值
// var p2=$('#param2').val();//获取本页面其他标签的值
})
})
</script>

View File

@ -5,9 +5,8 @@
<%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
<div class="cl"></div>
</li>
<li >
<label class="label02"><span class="c_red">*</span>&nbsp;名称&nbsp;&nbsp;</label>
<label class="label02"><span class="c_red">*</span>&nbsp;项目名称&nbsp;&nbsp;</label>
<!--<input id="project_name" name="project[name]" class=" w543" type="text" value="<%#= @project.name%>">-->
<input type="text" name="project[name]" id="project_name" class="w543" maxlength="100" onkeyup="regex_project_name();" value="<%= @project.name %>">
<span class="c_red ml110" id="project_name_notice" style="display: none;">项目名称不能为空!</span>
@ -15,7 +14,7 @@
<div class="cl"></div>
<li >
<label class="label02" >&nbsp;&nbsp;描述&nbsp;&nbsp;</label>
<label class="label02" >&nbsp;&nbsp;项目描述&nbsp;&nbsp;</label>
<textarea class="w543" id="project_description" name="project[description]" rows="8" placeholder="最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>
<div class="cl"></div>
</li>
@ -24,11 +23,6 @@
<input id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
<div class="cl"></div>
</li>
<li >
<label class="label02">隐藏代码库&nbsp;&nbsp;</label>
<input id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
<div class="cl"></div>
</li>
</ul>
<a href="javascript:void(0)" class="blue_btn ml110" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
<% end %>

View File

@ -24,7 +24,7 @@
<% if e.forge_act_type == "Issue" %>
<div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(act.author), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5 break_word">
<div class="problem_txt fl mt5 break_word list_style">
<a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to act.author, user_path(act.author), :class => "problem_name c_orange fl" %><span class="fl"> <%= l(:label_new_activity) %> </span>
@ -60,7 +60,7 @@
<% elsif e.forge_act_type == "Message" %>
<div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5 break_word">
<div class="problem_txt fl mt5 break_word list_style">
<a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span>
@ -79,7 +79,7 @@
<% elsif e.forge_act_type == "News" %>
<div class="problem_main">
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
<div class="problem_txt fl mt5 break_word">
<div class="problem_txt fl mt5 break_word list_style">
<a class="problem_name fl ">
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> </span>

View File

@ -1,8 +1,15 @@
<ul class="hworkUl b_grey">
<li class="hworkList380 width625">
<span class="c_dark f14 fb fl ml10">作品信息</span>
<ul class="hworkUl">
<li class="hworkList340 hworkH30 width505">
<span class="HomeworkNameTitle f14 fb fl">作品名称</span>
<span class="HomeworkStuTitle f14 fb fl">姓名</span>
<span class="HomeworkStuTitle f14 fb fl">学号</span>
</li>
<li class="hworkList80 mr10" >
<span class="c_dark f14 fb fl ml10">我的评分</span>
<li class="hworkList130 hworkH30 fb ml10">
时间
</li>
<li class="hworkList50 hworkH30 fb mr10 ml10">
我的评分
</li>
</ul>

View File

@ -1,37 +1,51 @@
<ul class="hworkUl b_grey">
<li class="hworkList380 <%= @homework.homework_type == 2 ? '' : 'width455'%>">
<span class="c_dark f14 fb fl ml10">作品信息</span>
<ul class="hworkUl">
<li class="hworkList340 hworkH30 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
<span class="c_dark f14 fb fl <%= @homework.homework_type == 2 ? 'mr60 ml80' : 'mr95 ml100'%>">作品名称</span>
<span class="c_dark f14 fb fl mr50">姓名</span>
<span class="c_dark f14 fb fl">学号</span>
</li>
<li class="hworkList80" >
<%= link_to "教师评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
<li class="hworkList130 hworkH30">
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>
<% if @show_all && @order == "created_at"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
<% end%>
</li>
<li class="hworkList50 hworkH30" >
<%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10" ,:remote => true%>
<% if @show_all && @order == "teacher_score"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
<% end%>
</li>
<li class="hworkList80">
<%= link_to "教辅评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
<li class="hworkList50 hworkH30">
<%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
<% if @show_all && @order == "teaching_asistant_score"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
<% end%>
</li>
<% if @homework.homework_type == 2%>
<li class="hworkList80">
<%= link_to "系统评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
<li class="hworkList50 hworkH30">
<%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
<% if @show_all && @order == "system_score"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
<% end%>
</li>
<% end%>
<li class="hworkList50">
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
<li class="hworkList50 hworkH30">
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
<% if @show_all && @order == "student_score"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
<% end%>
</li>
<li class="hworkList50">
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
<li class="hworkList50 hworkH30">
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
<% if @show_all && @order == "score"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
<% end%>
</li>
</ul>

View File

@ -1,46 +1,50 @@
<!-- 匿评作品列表,显示某一个作品的信息 -->
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
<li class="hworkList380 <%= @homework.homework_type == 2 ? '' : 'width455'%>">
<li class="hworkList340 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
<ul>
<li class="hworkName mt12">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%>
</li>
<div class="cl"></div>
<li>
<ul class="mt12">
<li class="hworkDetail mr15">
姓名:<%= student_work.user.show_name%>
</li>
<li class="hworkDetail mr15">
学号:
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</li>
<li class="hworkDate">
时间:
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
<span class="c_red">迟交</span>
<% else%>
<%= format_time student_work.created_at%>
<% end %>
</li>
</ul>
<li class="hworkPortrait mt15 mr10">
<%= link_to(image_tag(url_to_avatar(User.current),:width =>"40",:height => "40"),user_activities_path(User.current.id))%>
</li>
<div onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<li class="hworkName mt15 mr15 <%= @homework.homework_type == 2 ? '' : 'width165'%>">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<div>
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
</div>
</li>
<li>
<ul class="mt10 fl">
<li class="hworkStName mr10 mt16" title="姓名">
<%= student_work.user.show_name%>
</li>
<li class="hworkStID mt16" title="学号">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</li>
</ul>
</li>
</div>
</ul>
</li>
<li class="hworkList80 <%= score_color student_work.teacher_score%>">
<li class="hworkList130 c_grey" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
<span class="c_red">[迟交]</span>
<% end %>
</li>
<li class="hworkList50 <%= score_color student_work.teacher_score%>">
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
</li>
<li class="hworkList80 <%= score_color student_work.teaching_asistant_score%>">
<li class="hworkList50 <%= score_color student_work.teaching_asistant_score%>">
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
</li>
<% if @homework.homework_type == 2%>
<!-- 系统评分 -->
<li class="hworkList80 <%= score_color student_work.system_score%>">
<li class="hworkList50 <%= score_color student_work.system_score%>">
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
</li>
<% end%>
<li class="hworkList50 <%= score_color student_work.student_score%> student_score_info">
<%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%>
<% unless student_work.student_score.nil?%>
@ -73,4 +77,5 @@
</div>
<% end%>
</li>
</ul>
</ul>

View File

@ -1,51 +1,62 @@
<!-- 匿评作品列表,显示某一个作品的信息 -->
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
<% is_my_work = student_work.user == User.current%>
<li class="hworkList380 width620">
<li class="hworkList340 width525">
<ul>
<li class="hworkName mt12 m_width620">
<% if is_my_work%>
<% if is_my_work%>
<li class="hworkPortrait mt15 mr10">
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
</li>
<li class="hworkName mt15 mr15 width285">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%>
<% else%>
<%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%>
<% end%>
</li>
<div class="cl"></div>
<li>
<ul class="mt12">
<li class="hworkDetail mr15">
姓名:
<% if is_my_work%>
<div>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
</div>
</li>
<li>
<ul class="mt10 fl">
<li class="hworkStName mr10 mt16" title="姓名">
<%= student_work.user.show_name%>
<% else%>
匿名
<% end%>
</li>
<li class="hworkDetail mr15">
学号:
<% if is_my_work%>
<span>
</li>
<li class="hworkStID mt16" title="学号">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</span>
<% else%>
--
<% end%>
</li>
</ul>
</li>
<li class="hworkDate">
时间:
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
<span class="c_red">迟交</span>
<% else%>
<%= format_time student_work.created_at%>
<% end %>
<% else%>
<li class="hworkPortrait mt15 mr10">
<%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
</li>
</ul>
</li>
<li class="hworkName mt15 mr15 width285">
<div>
<%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
</div>
</li>
<li>
<ul class="mt10 fl">
<li class="hworkStName mr10 mt16" title="姓名">
匿名
</li>
<li class="hworkStID mt16" title="学号">
--
</li>
</ul>
</li>
<% end%>
</ul>
</li>
<li class="hworkList130 c_grey">
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
<span class="c_red">[迟交]</span>
<% end %>
</li>
<!-- 成绩 -->
<% my_score = student_work_score(student_work,User.current) %>
<li class="hworkList80 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10">
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10">
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
</li>
</ul>
</ul>

View File

@ -0,0 +1,36 @@
<div class="fl" style="border-bottom:1px solid #eaeaea; padding-bottom:10px; width:720px;">
<span class="c_dark f14 fb fl mr30">
作品
<font class="f12 c_red">
<%= @stundet_works.count%>
</font>
</span>
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%>
<div class="hworkSearchBox">
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="姓名、学号、邮箱" class="hworkSearchInput" onkeypress="SearchByName('<%= student_work_index_path(:homework => @homework.id)%>',event);"/>
<a class="hworkSearchIcon" id="search_in_student_work" onclick="SearchByName_1('<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
</div>
<%= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %>
<% end%>
</div>
<div class="cl"></div>
<div class="fl">
<% if @is_evaluation && !@stundet_works.empty?%>
<%= render :partial => "evaluation_title"%>
<% else%>
<%= render :partial => "evaluation_un_title"%>
<% end%>
</div>
<div class="cl"></div>
<% @stundet_works.each do |student_work|%>
<% if @is_evaluation%>
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work}%>
<% else%>
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%>
<% end%>
<div class="cl"></div>
<div id="about_hwork_<%= student_work.id%>"></div>
<div class="cl"></div>
<% end%>

View File

@ -56,7 +56,7 @@
<a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="hworkMenu">
<li>
<%= link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey'%>
<%= link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :group => @group, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => "export_student_work"%>
</li>
<li>
<% if @homework.student_works.empty?%>
@ -82,45 +82,15 @@
<% end%>
<div class="cl"></div>
</div>
<div class="hworkListContainer">
<div class="ctt2">
<div class="dis" id="tbc_01">
<div class="codeList">
<span class="fl mt3">
<%= link_to "所有作品<font class='f12 c_red'>[共#{@stundet_works.count}份]</font>".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%>
</span>
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%>
<div class="resourcesSearchloadBox fr">
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="姓名、学号、邮箱" class="searchResource" onkeypress="SearchByName('<%= student_work_index_path(:homework => @homework.id)%>',event);"/>
<a class="homepageSearchIcon" onclick="SearchByName_1('<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
</div>
<% end%>
<div class="cl"></div>
</div>
<!---code_list end--->
<div class="fl">
<% if @is_evaluation && !@stundet_works.empty?%>
<%= render :partial => "evaluation_title"%>
<% else%>
<%= render :partial => "evaluation_un_title"%>
<% end%>
</div>
<!---hwork_ul end--->
<div class="cl"></div>
<% @stundet_works.each do |student_work|%>
<% if @is_evaluation%>
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work}%>
<% else%>
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%>
<% end%>
<div class="cl"></div>
<!---hwork_ul end--->
<div id="about_hwork_<%= student_work.id%>"></div>
<div class="cl"></div>
<% end%>
<div class="dis" id="homework_student_work_list">
<%= render :partial => "student_work/student_work_list"%>
</div>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,2 @@
$("#homework_student_work_list").html("<%= escape_javascript(render :partial => 'student_work/student_work_list') %>");
$("#export_student_work").replaceWith("<%= escape_javascript( link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :group => @group, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => 'export_student_work') %>");

View File

@ -7,7 +7,7 @@
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","30%").css("left","40%");
$('#ajax-modal').parent().css("top","65%").css("left","60%");
$('#ajax-modal').parent().addClass("anonymos_work");
});
<% end%>

View File

@ -42,7 +42,7 @@
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %></div>
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style" id="activity_description_<%= user_activity_id%>">
<%= activity.description.html_safe %>
</div>
<div class="homepagePostSetting" style="visibility: hidden" id="act-<%=user_activity_id %>">

View File

@ -24,7 +24,7 @@
发帖时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style" id="activity_description_<%= user_activity_id%>">
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
<% else %>
@ -45,15 +45,16 @@
</div>
<div class="cl"></div>
</div>
<% count=0 %>
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
<% count=activity.children.count%>
<% end %>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count=0 %>
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
<% count=activity.children.count%>
<% end %>
<%= count %>
)</div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
@ -86,7 +87,7 @@
<% end %>
<%= format_time(reply.created_on) %>
</div>
<div class="homepagePostReplyContent break_word">
<div class="homepagePostReplyContent break_word list_style">
<%= reply.content.html_safe %>
</div>
</div>
@ -99,14 +100,14 @@
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mt3 mb10">
<div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left; margin-left: 5px; padding-top:3px;"></div>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="margin-top:6px;">发送</a>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>

View File

@ -18,15 +18,16 @@
<div class="homepagePostDate">
发布时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">
<div class="homepagePostIntro break_word upload_img list_style" id="activity_description_<%= user_activity_id %>">
<%= activity.description.html_safe %>
</div>
</div>
<div class="cl"></div>
</div>
<% count=activity.comments.count %>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count=activity.comments.count %>
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">
回复(<%= count %>
</div>
@ -59,7 +60,7 @@
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word"><%= comment.comments.html_safe %></div>
<div class="homepagePostReplyContent break_word list_style"><%= comment.comments.html_safe %></div>
</div>
<div class="cl"></div>
</li>
@ -70,13 +71,13 @@
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mt3 mb10">
<div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="margin-top:6px;">发送</a>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>

View File

@ -33,7 +33,7 @@
<%=format_time(activity.created_on) %>
</div>
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id %>">
<div class="homepagePostIntro break_word upload_img list_style" id="activity_description_<%= user_activity_id %>">
<% if activity.description? %>
<%= textAreailizable activity, :description, :attachments => activity.attachments %>
<% end %>
@ -63,10 +63,10 @@
</div>
<div class="cl"></div>
</div>
<% count = activity.journals.count %>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count = activity.journals.count %>
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(<%= count %></div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
<% if count > 2 %>
@ -115,13 +115,13 @@
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mt3 mb10">
<div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="margin-top:6px;">发送</a>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>

View File

@ -26,7 +26,7 @@
<div class="homepagePostDate">
时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style" id="activity_description_<%= user_activity_id%>">
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
<% else %>
@ -36,15 +36,16 @@
</div>
<div class="cl"></div>
</div>
<% count = 0 %>
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
<% count=activity.children.count%>
<% end %>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count = 0 %>
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
<% count=activity.children.count%>
<% end %>
<%=count %>
)</div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
@ -73,7 +74,7 @@
<% end %>
<%= format_time(reply.created_on) %>
</div>
<div class="homepagePostReplyContent break_word"><%= reply.content.html_safe %></div>
<div class="homepagePostReplyContent break_word list_style"><%= reply.content.html_safe %></div>
</div>
<div class="cl"></div>
</li>
@ -84,14 +85,14 @@
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mt3 mb10">
<div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="margin-top:6px;">发送</a>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>

View File

@ -36,7 +36,7 @@
}
$(function() {
init_activity_KindEditor_data(<%= user_activity.id%>,"","87%");
init_activity_KindEditor_data(<%= user_activity.id%>,null,"87%");
});
</script>
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>

View File

@ -41,7 +41,7 @@
<%= l(:label_end_time)%><%= homework_common.end_time%>
</div>
</div>
<div class="homepagePostIntro upload_img break_word">
<div class="homepagePostIntro upload_img break_word list_style">
<%= homework_common.description.html_safe %>
</div>
<div class="mt10">
@ -60,6 +60,9 @@
<li>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
</li>
<li>
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true) if homework_common.homework_detail_manual.comment_status == 1%>
</li>
<li>
<%= homework_anonymous_comment homework_common %>
</li>

View File

@ -7,10 +7,6 @@
homework_description_editor.html("");
$("#homework_editor").toggle();
}
function checkAllBox(doc){
}
</script>
<div class="homepageRightBanner mb10">
<div class="NewsBannerName">作业</div>
@ -21,6 +17,7 @@
<!-- 老师身份才可以发布作业 -->
<div class="HomeWork mb10">
<% homework = HomeworkCommon.new %>
<% homework.homework_detail_manual = HomeworkDetailManual.new%>
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
<div id="HomeWorkCon">
<%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>

View File

@ -61,6 +61,9 @@ zh:
label_research_group: 研讨模式
label_development_team: 开发模式
label_type_project: 项目类型
label_type_des_development: 开发模式:面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。
label_type_des_research: 研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。
label_type_des_friend: 圈子模式:面向好友分享,支持论坛交流、资源分享等。
label_member: 成员
project_module_attachments: 资源

View File

@ -101,6 +101,8 @@ RedmineApp::Application.routes.draw do
get 'start_anonymous_comment'
get 'stop_anonymous_comment'
get 'alert_anonymous_comment'
get 'start_evaluation_set'
post 'set_evaluation_attr'
end
collection do
post 'next_step'

View File

@ -476,13 +476,6 @@ ActiveRecord::Schema.define(:version => 20150918134804) do
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
create_table "discuss_demos", :force => true do |t|
t.string "title"
t.text "body"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "documents", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.integer "category_id", :default => 0, :null => false
@ -497,23 +490,26 @@ ActiveRecord::Schema.define(:version => 20150918134804) do
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
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"
create_table "dts", :primary_key => "Num", :force => true do |t|
t.string "Defect", :limit => 50
t.string "Category", :limit => 50
t.string "File"
t.string "IPLine"
t.string "Review"
t.string "Category"
t.string "Defect"
t.string "PreConditions"
t.string "StartLine"
t.string "Method"
t.string "Module", :limit => 20
t.string "Variable", :limit => 50
t.integer "StartLine"
t.integer "IPLine"
t.string "IPLineCode", :limit => 200
t.string "Judge", :limit => 15
t.integer "Review", :limit => 1
t.string "Description"
t.text "PreConditions", :limit => 2147483647
t.text "TraceInfo", :limit => 2147483647
t.text "Code", :limit => 2147483647
t.integer "project_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "id", :null => false
end
create_table "enabled_modules", :force => true do |t|
@ -916,6 +912,7 @@ ActiveRecord::Schema.define(:version => 20150918134804) do
t.datetime "created_on"
t.integer "comments_count", :default => 0, :null => false
t.integer "course_id"
t.datetime "updated_on"
end
add_index "news", ["author_id"], :name => "index_news_on_author_id"

View File

@ -0,0 +1,54 @@
#coding=utf-8
namespace :homework_evaluation do
desc "start and end evaluation"
def get_assigned_homeworks(student_works, n, index)
student_works += student_works
student_works[index + 1 .. index + n]
end
#自动开启匿评的任务
task :start_evaluation => :environment do
homework_detail_manuals = HomeworkDetailManual.where("evaluation_start = '#{Date.today}'")
homework_detail_manuals.each do |homework_detail_manual|
homework_common = homework_detail_manual.homework_common
if homework_detail_manual.comment_status == 1 #新建状态才可开启匿评
student_works = homework_common.student_works
if student_works && student_works.size >= 2
student_works.each_with_index do |work, index|
user = work.user
n = homework_detail_manual.evaluation_num
n = n < student_works.size ? n : student_works.size - 1
assigned_homeworks = get_assigned_homeworks(student_works, n, index)
assigned_homeworks.each do |h|
student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id)
student_works_evaluation_distributions.save
end
end
homework_detail_manual.update_column('comment_status', 2)
# 匿评开启消息邮件通知
else
#作业数小于2启动失败
end
end
end
end
#自动关闭匿评的任务
task :end_evaluation => :environment do
homework_detail_manuals = HomeworkDetailManual.where("evaluation_end = '#{Date.today}'")
homework_detail_manuals.each do |homework_detail_manual|
homework_common = homework_detail_manual.homework_common
if homework_detail_manual.comment_status == 2 #开启匿评状态才可关闭匿评
#计算缺评扣分
work_ids = "(" + homework_common.student_works.map(&:id).join(",") + ")"
homework_common.student_works.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manuals.absence_penalty : 0
student_work.save
end
homework_detail_manual.update_column('comment_status', 3)
# 匿评关闭消息邮件通知
end
end
end
end

View File

@ -264,7 +264,7 @@ K.options = {
minHeight : 100,
minChangeSize : 50,
zIndex : 811213,
items : ['code', 'emoticons','fontname',
items : ['emoticons','fontname',
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
'formatblock', 'fontsize', '|','indent', 'outdent',
'|','imagedirectupload','table', 'media', 'preview',"more"
@ -4986,8 +4986,7 @@ KEditor.prototype = {
htmlList.unshift('<div style="display:block" id="define"/>')
htmlList.push('</div>')
var htmlListFull = [];
var fullItems = ['code',
'emoticons','fontname',
var fullItems = ['emoticons','fontname',
'forecolor', 'hilitecolor', 'bold','|', 'justifyleft', 'justifycenter', 'insertorderedlist', 'insertunorderedlist', '|',
'formatblock', 'fontsize', '|', 'indent', 'outdent',
'|','imagedirectupload','table', 'media', 'preview', "less",

View File

@ -38,8 +38,11 @@ pre.prettyprint { padding: 2px;
border-right: 1px solid #ccc,
border-top: 1px solid #ccc }
pre li,ul,ol {
list-style-type: none;
pre li,ol li {
list-style-type: decimal;
}
ul li{
list-style-type: disc;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
@ -50,7 +53,7 @@ li.L3,
li.L5,
li.L6,
li.L7,
li.L8 { list-style-type: none }
li.L8 { list-style-type: decimal }
/* Alternate shading for lines */
li.L1,
li.L3,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -940,20 +940,49 @@ function SearchByName(url,event)
{
var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == '13'){
location.href = url + "&name=" + $("#course_student_name").val() + "&group=" + $("#late_penalty").val();
$.get(
url,
{
name : $("#course_student_name").val(),
group : $("#student_work_in_group").val()
},
function (data) {
}
);
}
}
function SearchByName_1(url)
{
if($("#late_penalty").val() == null){
location.href = url + "&name=" + $("#course_student_name").val()
}
else{
location.href = url + "&name=" + $("#course_student_name").val() + "&group=" + $("#late_penalty").val();
}
//alert($("#student_work_in_group").val());
$.get(
url,
{
name : $("#course_student_name").val(),
group : $("#student_work_in_group").val()
},
function (data) {
}
);
}
$(function(){
$("#student_work_in_group").live("change",function(){
$("#search_in_student_work").click();
});
});
//新建作业临时弹框
function new_homework_alert(){
alert("您好!课程内直接发布作业的功能正在改进中,请直接点击\n顶部导航栏的“作业”向本课程发送作业。谢谢如有问\n题可参见帮助中心。");
}
function show_student_work(url){
$.get(
url,
{
},
function (data) {
}
);
}

View File

@ -5,7 +5,7 @@
minStatue : true,
skin : 'blue',
durationTime : 1000
}
};
var options = $.extend(defaults, options);
this.each(function(){
@ -13,17 +13,13 @@
var thisBox = $(this),
closeBtn = thisBox.find('.close_btn' ),
show_btn = thisBox.find('.show_btn' ),
sideContent = thisBox.find('.side_content'),
sideList = thisBox.find('.side_list')
;
sideContent = thisBox.find('.side_content');
var defaultTop = thisBox.offset().top; //????????top
thisBox.css(options.float, 0);
if(options.minStatue == "true"){
$(".show_btn").css("float", options.float);
show_btn.css("float", options.float);
sideContent.css('width', 0);
show_btn.css('width', 25);
}
//close
closeBtn.bind("click",function(){
@ -37,26 +33,12 @@
sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast");
cookiesave('minStatue','false','','','');
});
}); //end this.each
};
})(jQuery);
$(function(){
$("#button1").click(function(){
myTips("<%= l(:label_feedback_success) %>","success");
});
});
function f_submit()
{
// var subject = $("#memo_subject").val();
// var content = $("#memo_content").val();
// $("#memo_subject").val(subject+""+ content.substr(0,18)+"...");
$("#new_memo").submit();
}
@ -68,11 +50,8 @@ function cookiesave(n, v, mins, dn, path)
if(!mins) mins = 365 * 24 * 60;
if(!path) path = "/";
var date = new Date();
date.setTime(date.getTime() + (mins * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
if(dn) dn = "domain=" + dn + "; ";
document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path;
@ -86,34 +65,31 @@ function cookieget(n)
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(name) == 0){
return c.substring(name.length,c.length);}
return c.substring(name.length,c.length);
}
}
return false;
}
$(function(){
$(".closeSidebar").click(function(){
$(".show_btn").css("display","none");
$("#scrollsidebar").css("display","none");
return false;
});
$("#button1").click(function(){
myTips("<%= l(:label_feedback_success) %>","success");
myTips("反馈成功","success");
});
});
$(document).ready(function () {
$(function () {
$("#scrollsidebar").fix({
float: 'right', //default.left or right
minStatue: cookieget('minStatue'),
skin: 'green', //default.gray or blue
durationTime: 600
});
$("#scrollsidebar").fix({
float: 'right', //default.left or right
minStatue: cookieget('minStatue'),
skin: 'green', //default.gray or blue
durationTime: 600
});
});
$(document).ready(function(){
$("#subject").keydown(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
@ -123,8 +99,7 @@ $(document).ready(function(){
else{
$("#textCount").text(50-$("#subject").val().length)
}
})
$("#subject").keyup(function(){
}).keyup(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
var num=$("#subject").val().substr(0,50);
@ -133,5 +108,5 @@ $(document).ready(function(){
else{
$("#textCount").text(50-$("#subject").val().length)
}
})
})
});
});

View File

@ -6,42 +6,49 @@ function init_editor(params){
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"95%",
height:"30px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"30px",// == undefined ? "30px":paramsHeight+"px",
height:"33px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
items:['emoticons'],
afterChange:function(){//按键事件
var edit = this.edit;
var body = edit.doc.body;
edit.iframe.height(paramsHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + (paramsHeight == undefined ? 30:paramsHeight), paramsHeight));
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + paramsHeight , paramsHeight));
},
afterBlur:function(){
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
if(this.edit.html()=="") {
this.edit.html('<span id="hint" style="color: #808080">我要回复</span>');
this.edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>");
}
//params.toolbar_container.hide();
$('#reply_image_' + id).addClass('imageFuzzy');
//this.resize("95%", null);
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
params.submit_btn.hide();
this.resize("95%", null);
}else if(edit.html().val().trim() != ""){
params.submit_btn.show();
}
//params.submit_btn.css("display","none");
},
afterFocus: function(){
var edit = this.edit;
var body = edit.doc.body;
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\#\d*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
edit.html('');
}
params.submit_btn.show();
params.contentmsg.hide();
// params.toolbar_container.show();
$('#reply_image_' + id).removeClass('imageFuzzy');
//edit.iframe.width(paramsWidth);
this.resize(paramsWidth, null);
params.submit_btn.show();
//params.submit_btn.show();
},
afterCreate:function(){
params.submit_btn.css("display","none");
//params.submit_btn.hide();
var toolbar = $("div[class='ke-toolbar']",params.div_form);
toolbar.css('width',24);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
@ -52,12 +59,10 @@ function init_editor(params){
edit.iframe[0].scroll = 'no';
body.style.overflowY = 'hidden';
//reset height
var edit = this.edit;
var body = edit.doc.body;
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
edit.iframe.height(paramsHeight);
edit.html('<span id="hint" style="color: #808080">我要回复</span>');
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ (paramsHeight == undefined ? 30:paramsHeight) , paramsHeight));
edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>");
this.resize(null,Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight));// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
// params.toolbar_container.hide();
}
@ -74,7 +79,7 @@ function nh_check_field(params){
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty() || /^\&\w*\;\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\#\d*\;\"\&\w*\;[\u4e00-\u9fa5]*\&\w*\;\/\w*\&\w*\;$/.test(params.textarea.html())){
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
@ -152,5 +157,5 @@ function init_activity_KindEditor_data(id){
});
});
$(".ke-edit").css("height","25px");
$(".ke-edit").css("height","33px");
}

View File

@ -56,18 +56,20 @@ function show_more_project(url){
}
//老师提交 新建/修改 作业
function submit_homework(id)
{
if(!regex_homework_name())
{
function submit_homework(id){
if(!regex_homework_name()){
$("#homework_name").focus();
}
else if(!regex_homework_end_time())
{
else if(!regex_homework_end_time()){
$("#homework_end_time").focus();
}
else if(!regex_course_id())
{
//else if(!regex_evaluation_start()){
// $("#evaluation_start_time").focus()
//}
//else if(!regex_evaluation_end()){
// $("#evaluation_end_time").focus()
//}
else if(!regex_course_id()){
$("#course_id").focus();
}
else{
@ -134,6 +136,83 @@ function search_homework_by_name(url){
);
}
//提交匿评参数设置
function submit_set_evaluation_attr(end_time){
if(!regex_evaluation_start(end_time)){
$("#evaluation_start_time").focus();
}
else if(!regex_evaluation_end()){
$("#evaluation_end_time").focus();
}
else if(!regex_evaluation_num()){
$("#evaluation_num").focus();
}
else{
$('#popbox02 form').submit();
}
}
//验证匿评开启时间:大于截止时间,或者为空
function regex_evaluation_start(end_time){
var evaluation_start = $.trim($("#evaluation_start_time").val());
if(evaluation_start == ""){
$("#homework_evaluation_start_time").text("开启匿评日期不能为空");
return false;
}
var end_time = new Date(end_time);
var evaluation_start_time = new Date(evaluation_start);
if(evaluation_start_time > end_time){
$("#homework_evaluation_start_time").text("");
return true;
}else{
$("#homework_evaluation_start_time").text("开启匿评日期必须大于截止日期");
return false;
}
}
//验证匿评结束时间:大于匿评开启时间,或者为空。当匿评开启时间为空时,匿评结束时间必须为空
function regex_evaluation_end(){
var evaluation_start = $.trim($("#evaluation_start_time").val());
var evaluation_end = $.trim($("#evaluation_end_time").val());
if(evaluation_end == ""){
$("#homework_evaluation_end_time").text("关闭匿评日期不能为空");
return true;
}
var evaluation_start_time = new Date(evaluation_start);
var evaluation_end_time = new Date(evaluation_end);
if(evaluation_end_time > evaluation_start_time){
$("#homework_evaluation_end_time").text("");
return true;
}else{
$("#homework_evaluation_end_time").text("关闭匿评日期必须大于开启匿评日期");
return false;
}
}
//验证匿评数量
function regex_evaluation_num(){
var evaluation_num = $.trim($("#evaluation_num").val());
var regex = /^\d+$/;
if(evaluation_num==""){
$("#evaluation_num_notice").text("匿评人数不能为空");
return false;
}
else if(regex.test(evaluation_num)){
if(evaluation_num > 0){
$("#evaluation_num_notice").html("");
return true;
}
else{
$("#evaluation_num_notice").text("匿评人数必须为大于0");
return false;
}
}
else{
$("#evaluation_num_notice").text("匿评人数只能为数字");
return false;
}
}
//提交新建作品
function new_student_work()
{

View File

@ -31,8 +31,8 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
/*右侧内容新*/
.ctt2{clear:both; }
.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px; margin-left:5px;}
.hworkListContainer {float:left; clear:both; width:720px; margin-left:5px;}
.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px;}
.hworkListContainer {float:left; clear:both; width:720px;}
.showHwork{ border:2px solid #269ac9; width:696px; padding:10px; color:#666666; padding-bottom:0px; }
.showHworkP{ width:630px; float:left;}
.showHwork ul li {margin-bottom: 5px;}
@ -41,17 +41,21 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.pingBoxTit{ float:left; width:625px; margin-left:10px;}
.pingText{border:1px solid #CCCCCC; margin:5px; padding:5px; width:610px; height:20px; }
.pingBackTit{ float:left; width:573px; margin-left:10px; }
.hworkUl{ height:50px; border-bottom:1px solid #eaeaea; line-height:50px; vertical-align:middle;}
.hworkUl{ height:30px; border-bottom:1px solid #eaeaea; line-height:30px; vertical-align:middle; padding-bottom:5px;}
.hworkH30 {height:30px !important; line-height:30px !important;}
.hworkListRow {height:65px; border-bottom:1px solid #eaeaea; line-height:65px; vertical-align:middle;}
.hworkListRow:hover {background-color:#f6f6f7; cursor:pointer;}
.hworkListRow:hover {background-color:#f6f6f7;}
.hworkUl li{ float:left;}
.hworkListRow li{ float:left;}
.hworkList380 {width:375px; text-align:left; height:50px; line-height:50px;padding-left:5px;}
.hworkList340 {width:335px; text-align:left; height:50px; line-height:50px;padding-left:5px;}
.hworkList80 {width:80px; text-align:center;}
.hworkList50 {width:50px; text-align:center;}
.hworkList130 {width:130px; text-align:center;}
.codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; }
.hworkName {max-width:380px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:16px; line-height:16px;}
.hworkDetail {max-width:100px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;}
.hworkName {width:115px; float:left; line-height:18px;}
.hworkName div{max-height: 40px;overflow: hidden;}
.hworkStName {width:60px; max-width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
.hworkStID {width:80px; max-width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
.hworkDate {max-width:150px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;}
.hworkMenu {width:100px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-110px; font-size:12px; color:#888888; display:none; line-height:2;}
a.hworkExport {background:url(../images/homepage_icon2.png) -10px -401px no-repeat; padding-left:23px;}
@ -60,11 +64,25 @@ a.hworkSetting {background:url(../images/homepage_icon2.png) -10px -450px no-rep
.infoNi{ width:100px; padding:5px;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left; line-height:2; position:absolute; margin-top:-24px;margin-left: 40px;}
.problemTxt {width:660px; margin-left:10px; color:#777777; position:relative;}
.rTxtTit{width:560px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#269ac9; font-size:14px;}
.width620{width: 620px;}
.width625{width: 625px;}
.width455{width: 455px;}
.m_width620{max-width: 620px;}
.hworkSearchBox {border:1px solid #e6e6e6; width:185px; float:left; background-color:#ffffff;}
.hworkSearchInput {border:none; outline:none; background-color:#ffffff; width:145px; height:25px; padding-left:10px; display:block; float:left;}
.hworkSearchIcon {width:30px; height:25px; background:url(../images/nav_icon.png) -8px -1px no-repeat; float:left;}
a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-repeat;}
.classSplit {border:1px solid #e7e7e7; height:27px; line-height:27px; display:inline-block; margin-left:10px; padding-left:5px; cursor:pointer; outline:none; width:95px; max-width:95px;}
.classList {width:45px; border:1px solid #e7e7e7; float:left; position:absolute; background-color:#ffffff; left:-1px;}
.hworkPortrait {float:left; width:40px;}
.HomeworkNameTitle{width: 285px;text-align: center;margin-left: 50px;}
.HomeworkStuTitle{width: 80px;text-align: center;}
.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: center;height: 40px;}
.width385{width: 385px;}
.width505{width: 505px;}
.width165{width: 165px;}
.width180{width: 180px;}
.width525{width: 525px;}
.width285{width: 285px;}
.mr95{margin-right: 95px;}
.ml100{margin-left: 100px;}
.mt16{margin-top: 16px;}
/*邮件邀请*/
@ -262,6 +280,8 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;}
/* 创建作品 work */
.Newwork{ width:668px; height:418px;}
@ -637,7 +657,7 @@ a.Reply_pic{ display:block; width:30px; height:30px; padding:2px; border:1px sol
a:hover.Reply_pic{border:1px solid #64bdd9;}
.Msg_txt{ float:left; width:540px; margin-left:10px;}
.Msg_txt p{ }
.talkWrapMsg ul li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;}
.talkWrapMsg > ul > li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;}
.talkReply{ width:540px; margin-left:50px; border-top:1px dashed #d9d9d9; padding-top:10px; }
.Replybox{ float:left; width:495px; margin-left:5px;}
.talk_nextpage{ border:none; width:410px; margin:0 auto;}

View File

@ -120,7 +120,8 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_distop span{ float:left;}
.ping_distop p{ color:#5f5f5f;min-height: 24px;}
.ping_disfoot a{ float:right; color:#15bccf; margin-left:5px;}
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;}
.ping_distop span a{ float:right; /*width:20px;*/ height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}

View File

@ -58,6 +58,12 @@ h4{ font-size:14px; color:#3b3b3b;}
.clearfix{clear:both;zoom:1}
.break_word{ word-break:break-all; word-wrap: break-word;}
.white_space{white-space:nowrap;}
.fontGrey3 {color:#484848;}
a.linkGrey6 {color:#484848 !important;}
a.linkGrey6:hover {color:#ffffff !important;}
.markPopup {width:290px; height:auto; padding:5px 0px 15px 15px; background-color:#ffffff; z-index:1000;}
.markInput { outline:none; border:1px solid #e6e6e6; height:30px; width:140px; color:#3d3c3c;}
.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:70px; height:30px; outline:none; font-size:12px; color:#3d3c3c;}
/* Spacing */
.ml2{ margin-left:2px;}
@ -103,6 +109,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.mb8 {margin-bottom:8px !important;}
.mb10{ margin-bottom:10px !important;}
.mb12 {margin-bottom:12px !important;}
.mb15{margin-bottom: 15px;}
.mb20{ margin-bottom:20px;}
.pl15{ padding-left:15px;}
.w20{ width:20px;}
@ -529,7 +536,7 @@ a.homepageWhite:hover {color:#a1ebff}
a.newsGrey {color:#4b4b4b;}
a.newsGrey:hover {color:#000000;}
a.newsRed {color:red;}
a.newsRed:hovor {color:#888888;}
a.newsRed:hover {color:#888888;}
a.replyGrey {color:#888888; display:inline-block;}
a.replyGrey:hover {color:#4b4b4b;}
a.replyGrey1 {color:#888888;}
@ -570,6 +577,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
.borderBottomNone {border-bottom:none !important;}
.topBorder {border-top: 1px solid #e4e4e4;}
div.minHeight48{min-height: 48px;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
.homepagePostReplyBannerTime{width:85px; display:inline-block;}
@ -690,8 +698,6 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px;}
.AgreementTxt{text-indent:2em; margin-bottom:15px;}
.AgreementImg{ margin:0px auto; width:619px;}
.AgreementTxt{text-indent: 2em; margin-bottom: 15px;}
.AgreementImg{margin: 0px auto; width: 820px;}
/*底部*/
#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/
@ -707,7 +713,7 @@ html{ overflow-x:hidden;}
.scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; }
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
.side_content .side_list {width:154px;overflow:hidden;}
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;}
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;}
.show_btn span { display:none;}
.close_btn{width:24px;height:24px;cursor:pointer;}
.side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; }
@ -717,20 +723,21 @@ html{ overflow-x:hidden;}
.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;}
.close_btn span { display:none;}
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
.msgserver { margin-top:5px;}
.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; }
.msgserver { margin:10px 0 0px 5px;}
.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; }
.opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}
a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;}
a:hover.opnionButton{background: #0fa9bb; }
a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;}
a.opnionButton:hover{background: #297fb8; }
/* blue skin as the default skin */
.side_title {background-position:-195px 0;}
.side_center {background:url(../images/blue_line.png) repeat-y center; }
.side_bottom {background-position:-195px -50px;}
a.close_btn {background-position:-44px 0;}
a:hover.close_btn {background-position:-66px 0;}
.close_btn {background-position:-44px 0;}
.close_btn:hover {background-position:-66px 0;}
.show_btn {background-position:-119px 0;}
.msgserver a {color:#15bccf; }
.msgserver a {color:#269ac9; }
.msgserver a:hover { text-decoration:underline; }
.closeSidebar {background:url(../images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;}
/***** Ajax indicator ******/
@ -771,9 +778,6 @@ div.modal {
.ui-widget {
font-family: Verdana, sans-serif;
font-size: 1.1em;
width: 200px;
height: 14px;
background: #e2e2e2;
}
.ui-dialog .ui-dialog-content {
position: relative;
@ -1153,3 +1157,6 @@ a:hover.tijiao{ background:#0f99a9;}
a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;}

View File

@ -329,6 +329,8 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;}
/*上传资源弹出框样式*/
.popbox_polls{position:fixed !important;}
@ -863,7 +865,7 @@ a.Reply_pic{ display:block; width:30px; height:30px; padding:2px; border:1px sol
a:hover.Reply_pic{border:1px solid #64bdd9;}
.Msg_txt{ float:left; width:540px; margin-left:10px;}
.Msg_txt p{ }
.talkWrapMsg ul li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;}
.talkWrapMsg > ul > li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;}
.talkReply{ width:540px; margin-left:50px; border-top:1px dashed #d9d9d9; padding-top:10px; }
.Replybox{ float:left; width:495px; margin-left:5px;}
.talk_nextpage{ border:none; width:410px; margin:0 auto;}

View File

@ -91,8 +91,10 @@ h4{ font-size:14px; color:#3b3b3b;}
.mr45{margin-right: 45px;}
.mr50{margin-right: 50px;}
.mr55{margin-right: 55px;}
.mr60 {margin-right:60px;}
.mr70{margin-right: 70px;}
.mw15{margin:0 15px;}
.mr90 {margin-right:90px;}
.mw20{ margin: 0 20px;}
.mt1{margin-top: 1px;}
.mt-4 {margin-top:-4px;}
@ -102,9 +104,10 @@ h4{ font-size:14px; color:#3b3b3b;}
.mt8{ margin-top:8px;}
.mt10{ margin-top:10px !important;}
.mt30{ margin-top: 30px;}
.mt12 { margin-top:12px;}
.mt12 { margin-top:12px !important;}
.mt15 {margin-top:15px;}
.mt19 {margin-top:19px !important;}
.ml70{margin-left: 70px;}
.mb4{ margin-bottom:4px;}
.mb5{ margin-bottom:5px;}
.mb8 {margin-bottom:8px;}
@ -213,6 +216,8 @@ a.linkGrey5 {color:#484848;}
a.linkGrey5:hover {color:#3498db;}
a.linkGrey6 {color:#484848 !important;}
a.linkGrey6:hover {color:#ffffff !important;}
a.linkGrey7 {color:#888888;}
a.linkGrey7:hover {color:#269ac9;}
a.bBlue {background-color:#3498db;}
a.bBlue:hover {background-color:#297fb8;}
a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
@ -293,7 +298,7 @@ a:hover.bgreen_n_btn{background:#08a384;}
#Container{ width:1000px; margin:0 auto; }
/*头部导航*/
#Header{ margin:10px 0; background:#15bccf; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; }
#Header{ margin:10px 0; background:#15bccf; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; position: relative;}
.logo{ margin:5px 10px; }
#TopNav{}
#TopNav ul li{ margin-top:8px;}
@ -604,6 +609,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
.borderBottomNone {border-bottom:none !important;}
.topBorder {border-top: 1px solid #e4e4e4;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
.homepagePostReplyBannerTime{width:85px; display:inline-block;}
.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;}
@ -708,7 +714,7 @@ html{ overflow-x:hidden;}
.scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; }
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
.side_content .side_list {width:154px;overflow:hidden;}
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;}
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;}
.show_btn span { display:none;}
.close_btn{width:24px;height:24px;cursor:pointer;}
.side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; }
@ -718,21 +724,21 @@ html{ overflow-x:hidden;}
.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;}
.close_btn span { display:none;}
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
.msgserver { margin-top:5px;}
/*.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; }*/
.msgserver a { padding-left:4px; height:21px; display:block; }
.msgserver { margin:10px 0 0px 5px;}
.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; }
.opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}
a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;}
a:hover.opnionButton{background: #0fa9bb; }
a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;}
a.opnionButton:hover{background: #297fb8; }
/* blue skin as the default skin */
.side_title {background-position:-195px 0;}
.side_center {background:url(../images/blue_line.png) repeat-y center; }
.side_bottom {background-position:-195px -50px;}
a.close_btn {background-position:-44px 0;}
a:hover.close_btn {background-position:-66px 0;}
.close_btn {background-position:-44px 0;}
.close_btn:hover {background-position:-66px 0;}
.show_btn {background-position:-119px 0;}
.msgserver a {color:#15bccf; }
.msgserver a {color:#269ac9; }
.msgserver a:hover { text-decoration:underline; }
.closeSidebar {background:url(../images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;}
.hiddent{ overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
@ -852,7 +858,7 @@ div.flash.warning, .conflict {
/*弹出框*/
.black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);}
.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
.white_content02{display:none;position:fixed;top:15%;left:30%;width:310px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
.white_content02{display:none;position:fixed;top:15%;left:30%;width:450px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
.floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;}
a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;}
a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
@ -942,5 +948,8 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
.AgreementBox{margin: 20px 0; color: #666666; font-size: 14px; line-height: 1.9;}
.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px; border: none;}
.AgreementTxt{text-indent: 2em; margin-bottom: 15px;}
.AgreementImg{margin: 0px auto; width: 820px;}
.AgreementTxt{text-indent:2em; margin-bottom:15px;}
.AgreementImg{ margin:0px auto;}
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;}

View File

@ -794,4 +794,4 @@ div.flash.warning, .conflict {
.AgreementBox{ margin:20px 0; color:#666666; font-size:14px; line-height:1.9;}
.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px; border: none;}
.AgreementTxt{text-indent: 2em; margin-bottom: 15px;}
.AgreementImg{margin: 0px auto; width: 820px;}
.AgreementImg{margin: 0px auto;}