diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index 61760f462..0286fcad6 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -382,42 +382,22 @@ class HomeworkAttachController < ApplicationController if User.current.admin? || User.current.member_of_course?(@homework.bid.courses.first) # 打分统计 stars_reates = @homework. rates(:quality) - #stars_reates_count = stars_reates.count == 0 ? 1 : stars_reates.count - #stars_status = stars_reates.select("stars, count(*) as scount").group("stars") - #@stars_status_map = Hash.new(0.0) - #stars_status.each do |star_status| - # percent = (star_status.scount * 1.0/ stars_reates_count) * 100.to_f - # percent_m = format("%.2f", percent) - # @stars_status_map["star#{star_status.stars.to_i}".to_sym] = - # percent_m.to_s + "%" - #end #是否已经进行过评价 temp = HomeworkAttach.find_by_sql("SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = #{@homework.id} AND rater_id = #{User.current.id}").first @m_score = temp.nil? ? 0:temp.stars @has_evaluation = stars_reates.where("rater_id = ?",User.current).count > 0 - #是否开启互评功能 - #@is_evaluation = @homework.bid.is_evaluation == 1 || @homework.bid.is_evaluation == nil - #@limit = 10 #@jours留言 is null条件用以兼容历史数据 @jours = @homework.journals_for_messages.where("is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null").order("created_on DESC") @cur_page = params[:cur_page] || 1 @cur_type = params[:cur_type] || 5 @jour = paginateHelper @jours,5 - #@feedback_count = @jours.count - #@feedback_pages = Paginator.new @feedback_count, @limit, params['page'] - #@offset ||= @feedback_pages.offset - #@jour = @jours[@offset, @limit] - #@comprehensive_evaluation教师评论 - #@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1").order("created_on DESC") + teachers = searchTeacherAndAssistant @course @comprehensive_evaluation = [] teachers.each do|teacher| temp = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1 and user_id = #{teacher.user_id}").order("created_on DESC").first @comprehensive_evaluation << temp if temp end - #@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1 and user_id in #{convert_array(teachers)}").order("created_on DESC") - #@anonymous_comments 匿评 - #@anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2").order("created_on DESC") annymous_users = @homework.homework_evaluations.map(&:user) unless annymous_users.nil? || annymous_users.count == 0 @anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2 and user_id in #{convert_array(annymous_users)}").order("created_on DESC") diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index d73b8de3a..0b7cbbb5f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -843,7 +843,10 @@ class ProjectsController < ApplicationController end def show_projects_score - render :layout => false + respond_to do |format| + format.html { render :layout => "project_base"} + format.js + end end def issue_score_index diff --git a/app/helpers/homework_attach_helper.rb b/app/helpers/homework_attach_helper.rb index 750a71f6a..6965eca07 100644 --- a/app/helpers/homework_attach_helper.rb +++ b/app/helpers/homework_attach_helper.rb @@ -60,7 +60,7 @@ module HomeworkAttachHelper memberships = User.current.memberships.all(:conditions => cond) projects = memberships.map(&:project) not_have_project = [] - not_have_project << "<>" + not_have_project << "NO PROJECT" not_have_project << 0 type = [] type << not_have_project diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index aadc93fa4..8a6b276b3 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -27,8 +27,8 @@ background: #15bccf; color: #fff; text-align: center; - padding-top: 3px; - padding-left: 3px; + padding: 5px !important; + display: none; } .span_wping a:hover{ background-color:#03a1b3;} diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index cd682deb0..12393c558 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -40,7 +40,7 @@

<%= f.select :is_evaluation, is_evaluation_option %>

-

+

<%= f.select :proportion, proportion_option %>

diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 036289b0a..23f7070b2 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -22,7 +22,7 @@ <%= link_to "留言", get_homework_jours_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%> (<%= @jours_count %>) -

  • +
  • <%= link_to "作品打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "tb_all" unless @bid.homeworks.empty? %>
  • diff --git a/app/views/courses/_homework_form.html.erb b/app/views/courses/_homework_form.html.erb index 8ce6be3fe..2d20ecf07 100644 --- a/app/views/courses/_homework_form.html.erb +++ b/app/views/courses/_homework_form.html.erb @@ -45,7 +45,7 @@

    <%= f.select :is_evaluation, is_evaluation_option %>

    -

    +

    <%= f.select :proportion, proportion_option %>

    diff --git a/app/views/homework_attach/_homework.html.erb b/app/views/homework_attach/_homework.html.erb index c4be4777c..b821e2495 100644 --- a/app/views/homework_attach/_homework.html.erb +++ b/app/views/homework_attach/_homework.html.erb @@ -51,7 +51,7 @@ <% if is_my_homework %> <% if @bid.comment_status == 0 %> -

  • +
  • <%= link_to l(:button_edit), edit_homework_attach_path(homework) %> <% if homework.user == User.current || User.current.admin? %> diff --git a/app/views/homework_attach/new.html.erb b/app/views/homework_attach/new.html.erb index a1e5028dc..5a512c800 100644 --- a/app/views/homework_attach/new.html.erb +++ b/app/views/homework_attach/new.html.erb @@ -2,11 +2,11 @@
    @@ -55,13 +72,14 @@

    -

    diff --git a/app/views/homework_attach/show.html.erb b/app/views/homework_attach/show.html.erb index 5f631c26a..d2f096bae 100644 --- a/app/views/homework_attach/show.html.erb +++ b/app/views/homework_attach/show.html.erb @@ -1,175 +1,2 @@ -<%= render :partial => 'layouts/base_homework_attach', :locals => {:homework_attach => @homework} %> - -<% is_student = is_cur_course_student @homework.bid.courses.first %> -<% is_teacher = is_course_teacher User.current,@homework.bid.courses.first %> -

    <%= notice %>

    -
    - - - - - - - - - - - - - - - - - - - - -
    作业基础信息<%=@count %>
    - 发布人员:<%= link_to @homework.user, user_path(@homework.user)%> - - 所属任务:<%= link_to(@homework.bid.name, course_for_bid_path(@homework.bid))%> -
    - 作业下载: - <% if @is_evaluation || is_teacher%> - <% options = {:author => true } %> - <%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %> - <% else %> - <%= l(:label_cant_download) %> - <% end %> - - 参与人员: - <% @homework.users.each do |homework_user| %> - <%= link_to homework_user, user_path(homework_user)%> - <% if @homework.users.count > 1 && homework_user != @homework.users.last %> -
                     - <% end %> - <% end %> -
    平均评分: - <%= render :partial => 'show_score', :locals => {:stars => @totle_score} %> - 发布时间:<%=format_time @homework.created_at %>
    - - -
    -
    - -
    - - - - - - - - - - - -
    作业描述:
    -
    - <% if @homework.description != nil && @homework.description != "" %> - <%= @homework.description %> - <% else %> -
    - 该作业无任何描述! -
    - <% end %> -
    -
    - - -
    -
    - -
    -
    - 作业得分: -
    -
    -
    -
    得分比例
    -
    - <% 100.step(20,-20) do |star| %> -
    -
    -
    -
    -
    -
    - <%= @stars_status_map["star#{(star/20).to_s}".to_sym] %> -
    - <% end %> -
    -
    -
    -
    最终得分
    -
    - <%= @totle_score %>分 -
    -
    - <%= render :partial => 'show_score', :locals => {:stars => @totle_score} %> -
    -
    -
    -
    打分总人数
    -
    - - <%= @homework.raters(:quality).count%> - -
    -
    -
    -
    -
    - - -
    - <%= render :partial => 'comprehensive_evaluation', :locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework, :teaher_score => @teaher_score} %> -
    - -
    - - -<% if !users_for_homework(@homework).include?(User.current) %> -
    -
    作业评论:
    - <% if is_student %> - <% if @is_evaluation %> - <% if @has_evaluation %> -
    - <%= l(:lable_has_evaluation)%> -
    - <% else %> - <%= render :partial => 'evaluation', :locals => {:homework => @homework} %> - <% end %> - <% else %> -
    - <%= l(:lable_close_evaluation)%> -
    - <% end %> - <% end %> -
    -<% end %> - -<% if !is_teacher %> - -
    - <%= render :partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0, :is_comprehensive_evaluation => nil} %> -
    -<% end %> - - - -
    - <%= render :partial => 'showjour', :locals => {:jour => @jour,:homework => @homework} %> -
    - -
    -
    +<%= stylesheet_link_tag 'css', :media => 'all' %> +<%= render :partial => "show"%> \ No newline at end of file diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 86f48fbd7..6de46d2fe 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -24,7 +24,7 @@ - +<%= render :partial => 'courses/course_ad' %>
    diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index b3336fb46..811540323 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -21,6 +21,18 @@ <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> + + <% course = @bid.courses.first %> @@ -107,7 +119,7 @@ <% if @bid.open_anonymous_evaluation == 1%> - + <% case @bid.comment_status %> <% when 0 %> <%= link_to '启动匿评', alert_anonymous_comment_bid_path(@bid), id: "#{@bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %> @@ -149,31 +161,30 @@
    -
    - - - - - - +
    - - <%= l(:label_attachment) %> : - -
    - <% if @bid.attachments.any?%> + <% unless @bid.attachments.empty? %> +
    + + + + + + - - - - - -
    + + <%= l(:label_attachment) %> : + +
    <% options = {:author => true,:deletable => (@bid.author.id == User.current.id || User.current.admin? ? true : false),:wrap => true,:length => 7} %> <%= render :partial => 'attachments/links', :locals => {:attachments => @bid.attachments, :options => options} %> - <% end %> -
    -
    +
    +
    + <% end%>
    diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 5222b466f..0330b65e4 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -8,8 +8,12 @@ <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
    -
    <%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %>
    -

    <%=link_to @memo.author.name, user_path(@memo.author) %>

    +
    + <%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %> +
    +

    + <%=link_to @memo.author.name, user_path(@memo.author) %> +

    @@ -55,7 +59,8 @@
    - <%= label_tag l(:field_subject) %>: <%=h @memo.subject %> + <%= label_tag l(:field_subject) %>: + <%=h @memo.subject %>
    <%= textAreailizable(@memo,:content) %> @@ -67,7 +72,9 @@

    -
    <%= authoring @memo.created_at, @memo.author %>
    +
    + <%= authoring @memo.created_at, @memo.author %> +

    diff --git a/app/views/projects/show_projects_score.html.erb b/app/views/projects/show_projects_score.html.erb index 7f3f05cce..836e0a05c 100644 --- a/app/views/projects/show_projects_score.html.erb +++ b/app/views/projects/show_projects_score.html.erb @@ -66,6 +66,6 @@
    - <%= render :partial => 'projects/project_score_index', :locals => {:index => 0 } %> + <%= render :partial => 'projects/project_score_index', :locals => {:index => 0,:project => @project } %>
    <% end %> \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index bad27274f..7d6cc85b2 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2203,5 +2203,5 @@ zh: label_submit_comments: 提交评论 field_evaluation_num: 匿评分配数量 label_my_score: 我的评分 - field_open_anonymous_evaluation: 是否开启匿评 + field_open_anonymous_evaluation: 是否使用匿评 label_course_empty_select: 尚未选择课程! diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1b1580d8c..8d60c06a2 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2202,7 +2202,7 @@ button.tab-right { padding-bottom: 2px; text-align: center; border: 1px solid #15BCCF; - border-bottom: 0px solid #15BCCF; + border-bottom: 1px solid #15BCCF; color:#606060; font-weight:bold; diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css index 2eb401dfd..19b68743a 100644 --- a/public/stylesheets/css.css +++ b/public/stylesheets/css.css @@ -1,5 +1,5 @@ /* CSS Document */ -body{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;} +body{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; background:#fff; font-style:normal;} div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea{ margin:0; padding:0;} div,img,tr,td,textarea{ border:0;} table,tr,td{border:0; cellspacing:0; cellpadding:0;} @@ -15,7 +15,7 @@ a:hover{ text-decoration:underline;} /* TAB 切换效果 */ .tb_{ background-color: #eaeaea; height:40px; } .tb_ ul{height:40px; } -.tb_ li{float:left;height:35px;width: 90px;cursor:pointer; font-size:14px; padding-top:5px; text-align:center; } +.tb_ li{float:left;height:30px;width: 90px;cursor:pointer; font-size:14px; padding-top:10px; text-align:center; } a.tb_all{ margin-left:235px; font-size:12px; display:block; height:23px; padding-top:4px; width:90px; color:#7a7a7a; border:1px solid #cbcbcb; background:#fff; text-align: center;} a:hover.tb_all{ background:#eaeaea; text-decoration:none;} @@ -38,13 +38,13 @@ a:hover.tb_all{ background:#eaeaea; text-decoration:none;} .pic_head a{ text-align:center; width:42px; overflow:hidden;text-overflow:ellipsis; white-space:nowrap;} .pic_head img{ border:1px solid #fff;} .pic_head img:hover{border:1px solid #15bccf;} -.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;} -.dis ul li.wdown a{padding-top:22px; color:#3d7ec2; margin-right:35px;} -.wscore{ padding-top:22px; color:#888888; width:96px;} +.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:25px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;} +.dis ul li.wdown a{padding-top:25px; color:#3d7ec2; margin-right:35px;} +.wscore{ padding-top:25px; color:#888888; width:96px;} .dis ul li.wping{margin-left:12px; } .dis ul li.wping a{ margin-top:18px; margin-bottom:3px; width:43px; height:23px; background:#15bccf; color:#fff; text-align:center; padding-top:3px;} .dis ul li.wping a:hover{ background-color:#03a1b3;} -ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } +ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px;line-height: 1.9; } .wlist span{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;} .wlist a{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;} .wlist a:hover{ background:#15bccf; color:#fff; text-decoration:none;} @@ -92,7 +92,7 @@ a:hover.ping_sub{ background:#14a8b9;} .recall_head img{ height:30px; width:30px;} .recall_head a:hover{border:1px solid #15bccf;} .recall_head img:hover{border:1px solid #15bccf;} -.recall_con{ float:left;color:#777777;max-width: 530px;width: 90%; margin-left:10px; } +.recall_con{ float:left;color:#777777;max-width: 530px;width: 80%; margin-left:10px; } .recall_con a{ color:#15bccf; } .ping_list{ margin-top:15px;} @@ -128,7 +128,7 @@ a:hover.ping_sub{ background:#14a8b9;} .w430{ width:430px;} .w350{ width:350px;} -.w620{ width:580px; height:160px; border:1px solid #CCC;} +.w620{ width:580px; height:160px; border:1px solid #CCC !important; padding-left: 3px !important;} .bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;} a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;} a:hover.tijiao{ background:#0f99a9 !important;} diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index 50a1de7c4..1ef7c8dd7 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -649,14 +649,14 @@ input[class='nyan-clean-gray']:active, .nyan-clean-gray:active { } .tools a:visited { - color: #fffbff; + color: #116699; text-decoration: none; padding: 3px 5px 0px 5px; width: 100px; } .tools a:hover { - color: #fffbff; + color: white; padding: 3px 3px 0px 20px; width: 88px; text-decoration: none; diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index f683607cf..e10c5a91b 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -498,7 +498,7 @@ color: #000000; #sidebar a,#sidebar a.selected { display:inline-block; - padding:4px 4px 4px 21px !important; + padding:4px 4px 4px 21px; transition:all .2s linear; -moz-transition:all .2s linear; -o-transition:all .2s linear; @@ -1641,7 +1641,7 @@ div.left_wf a { #sidebar a, #sidebar a.selected{ display: inline-block; - padding: 0px !important; + padding: 0px; transition: all 0.2s linear 0s; }