-
+
<%= render :partial => 'poll_list'%>
\ No newline at end of file
diff --git a/app/views/poll/publish_poll.js.erb b/app/views/poll/publish_poll.js.erb
index 91dcdc882..6e24cbc0a 100644
--- a/app/views/poll/publish_poll.js.erb
+++ b/app/views/poll/publish_poll.js.erb
@@ -1,4 +1,4 @@
-$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
+$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll, :index => @index}) %>");
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
showModal('ajax-modal', '250px');
//$('#ajax-modal').css('height','111px');
diff --git a/app/views/poll/republish_poll.js.erb b/app/views/poll/republish_poll.js.erb
index 1d025a5b2..27169a413 100644
--- a/app/views/poll/republish_poll.js.erb
+++ b/app/views/poll/republish_poll.js.erb
@@ -1,4 +1,4 @@
-$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
+$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll, :index => @index}) %>");
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
showModal('ajax-modal', '250px');
//$('#ajax-modal').css('height','80px');
diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css
index aeb817e76..931aeb39e 100644
--- a/public/stylesheets/css/common.css
+++ b/public/stylesheets/css/common.css
@@ -183,6 +183,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.mw380 {max-width: 380px !important;}
.mw400 {max-width: 400px !important;}
.mw450 {max-width: 450px !important;}
+.mw550 {max-width: 550px !important;}
.mt-20 {margin-top:-20px;}
.mt-10 {margin-top:-10px;}
.mt-4 {margin-top:-4px;}
diff --git a/public/stylesheets/css/courses.css b/public/stylesheets/css/courses.css
index 91a22a177..97ba3801f 100644
--- a/public/stylesheets/css/courses.css
+++ b/public/stylesheets/css/courses.css
@@ -594,9 +594,9 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
.exercise_status_end{ display:block; width:33px; height:22px; background:url(/images/sy/icons_sy.png) 0 -659px no-repeat; color:#fff; font-size:12px; padding-left:10px; line-height: 22px;}
.exercise_status_com{ display:block; width:33px; height:22px; background:url(/images/sy/icons_sy.png) 0 -681px no-repeat; color:#fff; font-size:12px; padding-left:10px; line-height: 22px;}
.exercise_status_nocom{ display:block; width:33px; height:22px; background:url(/images/sy/icons_sy.png) 0 -705px no-repeat; color:#fff; font-size:12px; padding-left:10px; line-height: 22px;}
-a.ex_icon_de{ background:url(/images/course/icons.png) 0px -342px no-repeat; width:16px; height:27px; display:block;float:right;}
+a.ex_icon_de{ background:url(/images/course/icons.png) 0px -342px no-repeat; width:16px; height:25px; display:block;float:right;}
a:hover.ex_icon_de{ background:url(/images/course/icons.png) -20px -342px no-repeat;}
-.ex_icon_edit{ background:url(/images/course/icons.png) 0px -276px no-repeat; width:16px; height:27px; display:block;float:right; margin-right:10px;}
+.ex_icon_edit{ background:url(/images/course/icons.png) 0px -276px no-repeat; width:16px; height:25px; display:block;float:right; margin-right:10px;}
a:hover.ex_icon_edit{ background:url(/images/course/icons.png) -21px -276px no-repeat;}
/*首页课程列表归档按钮提示*/
diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css
index 085acd80f..2ceb11f20 100644
--- a/public/stylesheets/polls.css
+++ b/public/stylesheets/polls.css
@@ -15,7 +15,7 @@ a.newbtn{ float:right; display:block; width:80px; height:27px; padding-top:3px;
a:hover.newbtn{ background:#55a1b9; text-decoration:none;}
.polls_list_ul{ padding-left:10px; border-bottom:1px dashed #c9c9c9; height:32px; padding-top:8px;}
a.polls_title{ font-weight:bold; color:#3e6d8e; margin-top:3px;}
-a.pollsbtn{ display:block; width:66px; height:20px; padding-top:2px; text-align:center; border:1px solid #64bdd9; color:#64bdd9;}
+a.pollsbtn{ display:block; height:20px; padding:0 9px; text-align:center; border:1px solid #64bdd9; color:#64bdd9;}
a:hover.pollsbtn{ background:#64bdd9; color:#fff; text-decoration:none;}
.polls_date{ color:#666666;margin-top:3px; }
.polls_de{ color:#6883b6; margin-top:3px;}
@@ -129,7 +129,7 @@ a.btn_de{ border:1px solid #ff5d31; color:#ff5d31; }
a:hover.btn_de{ background:#ff5d31;}
a.btn_pu{ border:1px solid #3cb761; color:#3cb761; }
a:hover.btn_pu{ background:#3cb761;}
-.pollsbtn_grey{ border:1px solid #b1b1b1; color:#b1b1b1; padding:0px 9px; height:19px; padding-top:3px; }
+.pollsbtn_grey{ border:1px solid #b1b1b1; color:#b1b1b1; padding:0px 9px; height:20px;}
.polls_title_w { max-width:280px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.polls_title_st { max-width:450px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.polls_de_grey{ color:#b1b1b1; margin-top:3px;}
From b48fc7ba3b979e071f1e5e001793005de6f7c566 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 2 Dec 2016 16:18:31 +0800
Subject: [PATCH 19/31] =?UTF-8?q?pullrequest=E5=8F=91=E9=80=81=E6=B6=88?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/pull_requests_controller.rb | 10 ++++++----
app/models/forge_message.rb | 2 +-
app/views/repositories/show.html.erb | 20 +++++++++----------
app/views/users/_user_message_forge.html.erb | 4 ++--
...02073523_add_aperate_idto_forge_message.rb | 5 +++++
5 files changed, 24 insertions(+), 17 deletions(-)
create mode 100644 db/migrate/20161202073523_add_aperate_idto_forge_message.rb
diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb
index b68db3563..6f245a92b 100644
--- a/app/controllers/pull_requests_controller.rb
+++ b/app/controllers/pull_requests_controller.rb
@@ -190,7 +190,7 @@ class PullRequestsController < ApplicationController
begin
status = @g.accept_merge_rquest(@project.gpid, params[:id], User.current.gid)
# 接受后,给用户发消息
- send_message_to_author(@project.id, status.author.try(:user_name), params[:id], 2)
+ send_message_to_author(@project.id, status.author.try(:username), params[:id], 2)
respond_to do |format|
format.js{redirect_to project_pull_request_path(status.id, :project_id => @project.id)}
@@ -220,8 +220,8 @@ class PullRequestsController < ApplicationController
user = User.find_by_login(request.author.try(:username))
status = params[:state] == "close" ? 4 : 3
send_message_to_manager(@project.id, params[:id], status)
- if !is_project_manager?(user.id, @project.id)
- send_message_to_author(@project, user.login, request.id, status)
+ if is_project_manager?(User.current.id, @project.id)
+ send_message_to_author(@project.id, user.login, request.id, status)
end
respond_to do |format|
format.html{redirect_to project_pull_request_path(params[:id], :project_id => @project.id)}
@@ -350,7 +350,9 @@ class PullRequestsController < ApplicationController
:forge_message_id => pull_request_id,
:forge_message_type => "PullRequest",
:viewed => true,
- :status => status)
+ :status => status,
+ :operate_user_id => User.current.id,
+ )
end
def authorize_logged
diff --git a/app/models/forge_message.rb b/app/models/forge_message.rb
index bc514025e..e131eb600 100644
--- a/app/models/forge_message.rb
+++ b/app/models/forge_message.rb
@@ -1,7 +1,7 @@
class ForgeMessage < ActiveRecord::Base
# status在不同的类中,作用不同
# Isseu: satus nil:发布了缺陷;:1:缺陷计划完成日志到了提醒
- attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key, :status
+ attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key, :status, :operate_user_id
belongs_to :forge_message ,:polymorphic => true
belongs_to :project
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index 282df48c3..05b8d40d0 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -27,17 +27,17 @@
<% unless @entries.nil? %>
ZIP下载
- <% if User.current.member_of?(@project) && @project.is_public? %>
- <% if quality_analysis(User.current.try(:login), @repository.id).nil? %>
- <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
- <% else %>
- <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
- <% end %>
- <% end %>
- <% end %>
- <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
- <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
+ <%# if User.current.member_of?(@project) && @project.is_public? %>
+ <%# if quality_analysis(User.current.try(:login), @repository.id).nil? %>
+ <%#= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
+ <%# else %>
+ <%#= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
+ <%# end %>
+ <%# end %>
<% end %>
+ <%# unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
+ <%#= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
+ <%# end %>
<%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>
diff --git a/app/views/users/_user_message_forge.html.erb b/app/views/users/_user_message_forge.html.erb
index 5204a9bff..10a14ffa9 100644
--- a/app/views/users/_user_message_forge.html.erb
+++ b/app/views/users/_user_message_forge.html.erb
@@ -200,12 +200,12 @@
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
- <% author = User.find(send_message_user[0].user_id) %>
+ <% author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
<%= link_to image_tag(url_to_avatar(author), :width => "30", :height => "30"), user_path(author), :target => '_blank' %>
- <%= link_to User.find(send_message_user[0].user_id).show_name, user_path(send_message_user[0].user_id),
+ <%= link_to User.find(author.id).show_name, user_path(author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
">
<%= pull_request_message_status(ma) %>
diff --git a/db/migrate/20161202073523_add_aperate_idto_forge_message.rb b/db/migrate/20161202073523_add_aperate_idto_forge_message.rb
new file mode 100644
index 000000000..c58fb5afd
--- /dev/null
+++ b/db/migrate/20161202073523_add_aperate_idto_forge_message.rb
@@ -0,0 +1,5 @@
+class AddAperateIdtoForgeMessage < ActiveRecord::Migration
+ def change
+ add_column :forge_messages, :operate_user_id, :integer
+ end
+end
From 56b6d4386261c63fb84616bf9b1b310f79def313 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 2 Dec 2016 17:08:09 +0800
Subject: [PATCH 20/31] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E6=97=B6=E5=85=B6?=
=?UTF-8?q?=E4=BB=96=E4=BA=BA=E7=9A=84=E8=AF=84=E5=88=86=E4=B8=8D=E5=8F=AF?=
=?UTF-8?q?=E8=A7=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/student_work_controller.rb | 7 ++++++-
app/views/student_work/_jour_replay.html.erb | 2 +-
app/views/student_work/_student_work_score.html.erb | 8 +++++---
app/views/student_work/add_score.js.erb | 7 ++++---
app/views/student_work/add_score_reply.js.erb | 2 +-
5 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 0c6b42ca5..7119d7c9f 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -691,7 +691,11 @@ class StudentWorkController < ApplicationController
def show
@score = student_work_score @work,User.current
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
- @student_work_scores = student_work_score_record(@work)
+ if @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @work.user != User.current
+ @student_work_scores = @work.student_works_scores.where("user_id = #{User.current.id} and reviewer_role = 3").order("updated_at desc")
+ else
+ @student_work_scores = student_work_score_record(@work)
+ end
respond_to do |format|
format.js
end
@@ -867,6 +871,7 @@ class StudentWorkController < ApplicationController
@score = StudentWorksScore.find params[:score_id]
@is_last = params[:is_last] == "true"
@jour = @score.journals_for_messages.new(:user_id => User.current.id,:notes =>params[:message], :reply_id => 0)
+ @show_real_name = User.current.allowed_to?(:as_teacher, @score.student_work.homework_common.course) || User.current.admin? || @score.reviewer_role != 3 || @jour.user == User.current
if @jour.save
@status = 1
else
diff --git a/app/views/student_work/_jour_replay.html.erb b/app/views/student_work/_jour_replay.html.erb
index 4b594d7f4..eba5b2c08 100644
--- a/app/views/student_work/_jour_replay.html.erb
+++ b/app/views/student_work/_jour_replay.html.erb
@@ -2,7 +2,7 @@
<%= link_to image_tag(url_to_avatar(jour.user), :width => "32", :height => "32"), user_path(jour.user),:class => "st_img fl" %>
- <%= link_to jour.user.show_name, user_path(jour.user), :title => jour.user.show_name, :class => "c_blue fl" %>
+ <%= link_to show_real_name ? jour.user.show_name : "匿名", user_path(jour.user), :title => jour.user.show_name, :class => "c_blue fl" %>
<% if jour.user==User.current || User.current.admin? %>
<%= link_to(l(:label_bid_respond_delete), destroy_score_reply_student_work_index_path(:jour_id => jour.id),
diff --git a/app/views/student_work/_student_work_score.html.erb b/app/views/student_work/_student_work_score.html.erb
index 3730c99fb..e7c201736 100644
--- a/app/views/student_work/_student_work_score.html.erb
+++ b/app/views/student_work/_student_work_score.html.erb
@@ -1,6 +1,7 @@
- <% show_real_name = @is_teacher || score.user == User.current || score.user.allowed_to?(:as_teacher,@course) || score.reviewer_role != 3 %>
+ <% show_real_name = @is_teacher || score.user == User.current || score.reviewer_role != 3 %>
<%= link_to image_tag(url_to_avatar(show_real_name ? score.user : ""), :width => "34", :height => "34"), show_real_name ? user_path(score.user) : "javascript:void(0)",:class => "ping_pic fl" %>
+ <% show_real_score = @homework.score_open == 1 || @is_teacher || score.student_work.user == User.current %>
<%= link_to show_real_name ? score.user.show_name : "匿名", show_real_name ? user_path(score.user) : "javascript:void(0)", :title => show_real_name ? score.user.show_name : "匿评用户", :class => "linkBlue fl" %>
@@ -9,7 +10,7 @@
<% unless score.score.nil? %>
评分:
- <%= score.score%>分
+ <%= show_real_score ? score.score : "**" %>分
<% end %>
回复
@@ -33,7 +34,8 @@
<% score.journals_for_messages.order("created_on desc").each do |jour|%>
- <%= render :partial => 'jour_replay',:locals => {:jour => jour}%>
+ <% show_real_name = @is_teacher || score.reviewer_role != 3 %>
+ <%= render :partial => 'jour_replay',:locals => {:jour => jour, :show_real_name => show_real_name || jour.user == User.current}%>
<% end%>
diff --git a/app/views/student_work/add_score.js.erb b/app/views/student_work/add_score.js.erb
index 03693bff4..9c974a57f 100644
--- a/app/views/student_work/add_score.js.erb
+++ b/app/views/student_work/add_score.js.erb
@@ -7,6 +7,7 @@ $('#score_<%= @work.id%>').peSlider({range: 'min'});
<%# else %>
//$("#work_score_<%#= @score.id%>").html("<%#= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @new_score,:is_last => @is_last}) %>");
<%# end%>
+<% score_open = @is_teacher || @homework.score_open == 1 || @work.user == User.current %>
$("#score_list_<%= @work.id%>").html("<%=escape_javascript(render :partial => 'student_work_score_records', :locals => {:student_work_scores => @student_work_scores, :is_member_work => is_member_work}) %>");
var num = $("#work_num_<%= @work.id%>").html();
@@ -19,14 +20,14 @@ $("#score_list_<%= @work.id%>").removeAttr("style");
$("#group_member_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'group_member_work', :locals => {:student_work => @work}) %>");
<% else %>
<% anon_count = @work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
- $("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_member_work', :locals => {:st => @work, :anon_count => anon_count}) %>");
+ $("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_member_work', :locals => {:st => @work, :anon_count => anon_count, :score_open => score_open}) %>");
<% end %>
<% else %>
- $("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work, :index => 1}) %>");
+ $("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work, :index => 1, :score_open => score_open}) %>");
$("#work_num_<%= @work.id%>").html(num);
<% end %>
<% else %>
- $("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work, :index => 1}) %>");
+ $("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work, :index => 1, :score_open => score_open}) %>");
$("#work_num_<%= @work.id%>").html(num);
<% end%>
diff --git a/app/views/student_work/add_score_reply.js.erb b/app/views/student_work/add_score_reply.js.erb
index f21870cd5..e4c5f26e9 100644
--- a/app/views/student_work/add_score_reply.js.erb
+++ b/app/views/student_work/add_score_reply.js.erb
@@ -1,6 +1,6 @@
$("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score,:is_last => @is_last}) %>");
<% if @status && @status == 1%>
- $("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour}) %>");
+ $("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour, :show_real_name => @show_real_name}) %>");
$("#add_score_reply_<%= @score.id%>").hide();
<% else%>
alert("回复内容不能为空");
From 28444e0af7bfbef34c03a5345559dfbbbc6d183d Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 2 Dec 2016 17:46:31 +0800
Subject: [PATCH 21/31] =?UTF-8?q?=E2=80=9C=E6=9C=AA=E8=AF=84=E5=88=86?=
=?UTF-8?q?=E2=80=9D=E6=94=B9=E4=B8=BA=E2=80=9C=E6=97=A0=E8=AF=84=E5=88=86?=
=?UTF-8?q?=E2=80=9D=EF=BC=8C=20=E8=AF=84=E5=88=86=E8=AE=BE=E7=BD=AE?=
=?UTF-8?q?=E7=9A=84=E7=BC=BA=E8=AF=84=E6=89=A3=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/student_work_controller.rb | 2 +-
app/views/homework_common/_set_score_rule_non_pro.html.erb | 4 ++--
app/views/homework_common/_set_score_rule_pro.html.erb | 4 ++--
.../student_work/_evaluation_un_group_member_work.html.erb | 2 +-
app/views/student_work/_evaluation_un_work.html.erb | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 7119d7c9f..596775045 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -987,7 +987,7 @@ class StudentWorkController < ApplicationController
end
end
- no_anon_penalty = params[:no_anon_penalty] ? 1 : 0
+ no_anon_penalty = params[:no_anon_penalty] ? 0 : 1
if no_anon_penalty != homework_detail_manual.no_anon_penalty
homework_detail_manual.no_anon_penalty = no_anon_penalty
if homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
diff --git a/app/views/homework_common/_set_score_rule_non_pro.html.erb b/app/views/homework_common/_set_score_rule_non_pro.html.erb
index 98f995a60..6afd5f1ee 100644
--- a/app/views/homework_common/_set_score_rule_non_pro.html.erb
+++ b/app/views/homework_common/_set_score_rule_non_pro.html.erb
@@ -17,8 +17,8 @@
- value="<%=homework.homework_detail_manual.no_anon_penalty%>"/>
- 不参加匿评扣分
+ value="<%=homework.homework_detail_manual.no_anon_penalty%>"/>
+ 扣分(不参加匿评)
最终得分 :
diff --git a/app/views/homework_common/_set_score_rule_pro.html.erb b/app/views/homework_common/_set_score_rule_pro.html.erb
index f21c4d614..0a2c01b6f 100644
--- a/app/views/homework_common/_set_score_rule_pro.html.erb
+++ b/app/views/homework_common/_set_score_rule_pro.html.erb
@@ -17,8 +17,8 @@
- value="<%=homework.homework_detail_manual.no_anon_penalty%>"/>
- 不参加匿评扣分
+ value="<%=homework.homework_detail_manual.no_anon_penalty%>"/>
+ 扣分(不参加匿评)
最终得分 :
diff --git a/app/views/student_work/_evaluation_un_group_member_work.html.erb b/app/views/student_work/_evaluation_un_group_member_work.html.erb
index 257f1070c..d98e1b6a8 100644
--- a/app/views/student_work/_evaluation_un_group_member_work.html.erb
+++ b/app/views/student_work/_evaluation_un_group_member_work.html.erb
@@ -48,7 +48,7 @@
<% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %>
待匿评
<% elsif @homework.homework_detail_manual.comment_status == 3 && work.student_works_evaluation_distributions.count != 0 %>
- 未评分
+ 无评分
<% else %>
迟交
<% end %>
diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb
index ef3f670af..304625702 100644
--- a/app/views/student_work/_evaluation_un_work.html.erb
+++ b/app/views/student_work/_evaluation_un_work.html.erb
@@ -79,7 +79,7 @@
<% elsif @homework.homework_detail_manual.comment_status == 2 && student_work.student_works_evaluation_distributions.count != 0 %>
待匿评
<% elsif @homework.homework_detail_manual.comment_status == 3 && student_work.student_works_evaluation_distributions.count != 0 %>
- 未评分
+ 无评分
<% end %>
<% else %>
--
From e4e57380cf3de42909bd7cf040b283a6b108174e Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 2 Dec 2016 17:52:02 +0800
Subject: [PATCH 22/31] =?UTF-8?q?pull=20request=E6=8F=90=E4=BA=A4=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E5=88=86=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/pull_requests/_pull_request_commits.html.erb | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/app/views/pull_requests/_pull_request_commits.html.erb b/app/views/pull_requests/_pull_request_commits.html.erb
index 79db43a83..8691fcea9 100644
--- a/app/views/pull_requests/_pull_request_commits.html.erb
+++ b/app/views/pull_requests/_pull_request_commits.html.erb
@@ -16,6 +16,15 @@
<% end %>
+
+
+
+ <%= pagination_links_full @pages, @count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
+
+
+
+
+
From cad06701be14de57ef7384ff4d49134b4d3df72b Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 2 Dec 2016 19:07:06 +0800
Subject: [PATCH 23/31] =?UTF-8?q?=E9=9D=9E=E5=8C=BF=E8=AF=84=E9=98=B6?=
=?UTF-8?q?=E6=AE=B5=E5=BA=94=E7=9C=8B=E5=88=B0=E8=AF=84=E8=AF=AD=E5=9B=9E?=
=?UTF-8?q?=E5=A4=8D=E7=9A=84=E7=94=A8=E6=88=B7=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/student_work/_student_work_score.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/student_work/_student_work_score.html.erb b/app/views/student_work/_student_work_score.html.erb
index e7c201736..a8facff30 100644
--- a/app/views/student_work/_student_work_score.html.erb
+++ b/app/views/student_work/_student_work_score.html.erb
@@ -34,7 +34,7 @@
<% score.journals_for_messages.order("created_on desc").each do |jour|%>
- <% show_real_name = @is_teacher || score.reviewer_role != 3 %>
+ <% show_real_name = @is_teacher || score.reviewer_role != 3 || @homework.homework_detail_manual.comment_status != 2 %>
<%= render :partial => 'jour_replay',:locals => {:jour => jour, :show_real_name => show_real_name || jour.user == User.current}%>
<% end%>
From 585d1ebb0d5f842c5c31789bdbdadd118c43d505 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 2 Dec 2016 19:14:09 +0800
Subject: [PATCH 24/31] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8A=A0=E5=85=A5?=
=?UTF-8?q?=E7=8F=AD=E7=BA=A7=EF=BC=8C=E5=B0=86=E8=AF=BE=E7=A8=8B=E6=94=B9?=
=?UTF-8?q?=E4=B8=BA=E7=8F=AD=E7=BA=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/repositories/show.html.erb | 20 +++++++++----------
.../_join_course_course_message.html.erb | 9 +++++----
app/views/users/user_organizations.html.erb | 2 +-
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index 05b8d40d0..282df48c3 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -27,17 +27,17 @@
<% unless @entries.nil? %>
ZIP下载
- <%# if User.current.member_of?(@project) && @project.is_public? %>
- <%# if quality_analysis(User.current.try(:login), @repository.id).nil? %>
- <%#= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
- <%# else %>
- <%#= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
- <%# end %>
- <%# end %>
+ <% if User.current.member_of?(@project) && @project.is_public? %>
+ <% if quality_analysis(User.current.try(:login), @repository.id).nil? %>
+ <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
+ <% else %>
+ <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
+ <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
<% end %>
- <%# unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
- <%#= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
- <%# end %>
<%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>
diff --git a/app/views/users/_join_course_course_message.html.erb b/app/views/users/_join_course_course_message.html.erb
index eacbfac8c..78a6f2ecd 100644
--- a/app/views/users/_join_course_course_message.html.erb
+++ b/app/views/users/_join_course_course_message.html.erb
@@ -5,7 +5,7 @@
- <% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
+ <% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
<%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
@@ -17,9 +17,10 @@
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
真实姓名:<%= User.find(ma.course_message_id).realname %>
- 申请课程:<%= Course.find(ma.course_id).name%>
- 课程描述:
- <%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %>
申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "教辅"%>
+ 申请班级:<%= Course.find(ma.course_id).name%>
+ 班级描述:
+ <%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %>
+ 申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "助教"%>
diff --git a/app/views/users/user_organizations.html.erb b/app/views/users/user_organizations.html.erb
index 7e4b28393..6f1b7db2f 100644
--- a/app/views/users/user_organizations.html.erb
+++ b/app/views/users/user_organizations.html.erb
@@ -3,7 +3,7 @@
-
s
+
组织列表
新建组织
<%#= form_tag url_for(:controller => 'users', :action => 'search_user_orgs', :id => User.current.id), :method => 'get', :id => "search_org_form", :class=>"resourcesSearchloadBox", :style=>"float:right; margin-top:-5px;" do %>
From 7baa5be7eefeffa4b375fb961fc7733d96913f15 Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 2 Dec 2016 20:00:15 +0800
Subject: [PATCH 25/31] =?UTF-8?q?pull=20request=E6=80=BB=E6=95=B0=E8=8E=B7?=
=?UTF-8?q?=E5=8F=96=E6=96=B9=E5=BC=8F=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E7=9B=B8=E5=BA=94?=
=?UTF-8?q?=E7=9A=84=E5=88=86=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/pull_requests_controller.rb | 4 ++--
app/views/pull_requests/_pull_requests_list.html.erb | 11 ++++++++++-
app/views/pull_requests/index.html.erb | 10 ----------
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb
index 6f245a92b..b6fdd1fee 100644
--- a/app/controllers/pull_requests_controller.rb
+++ b/app/controllers/pull_requests_controller.rb
@@ -38,12 +38,12 @@ class PullRequestsController < ApplicationController
@requests_merged_count = merge_requests.select{|request| request.state == "merged"}.count
@requests_closed_count = merge_requests.select{|request| request.state == "closed"}.count
- @limit = 10
+ @limit = 20
@is_remote = true
@count = type_count(type, @requests_opened_count, @requests_merged_count, @requests_closed_count)
@pages = Paginator.new @count, @limit, params['page'] || 1
@offset ||= @pages.offset
- @requests = paginateHelper @requests, 10
+ @requests = paginateHelper @requests, 20
respond_to do |format|
format.html
format.js
diff --git a/app/views/pull_requests/_pull_requests_list.html.erb b/app/views/pull_requests/_pull_requests_list.html.erb
index c594a2e56..9600cb135 100644
--- a/app/views/pull_requests/_pull_requests_list.html.erb
+++ b/app/views/pull_requests/_pull_requests_list.html.erb
@@ -14,8 +14,17 @@
由 <%= link_to get_user_by_login_and(request.author.try(:username)).try(:show_name), user_path(get_user_by_login_and(request.author.try(:username))), :class => "linkBlue2" %> 创建于<%= time_tag(request.created_at) %>前
<%= time_tag(request.updated_at) %>前更新
-
<%= find_gitlab_project(request.source_project_id)+"/"+request.source_branch %>合并到 <%= find_gitlab_project(request.target_project_id)+"/"+request.target_branch %>
+
<%#= find_gitlab_project(request.source_project_id)+"/"+request.source_branch %>合并到 <%#= find_gitlab_project(request.target_project_id)+"/"+request.target_branch %>
<% end %>
+
+
+
+ <%= pagination_links_full @pages, @count, :per_page_links => false, :remote => true, :flag => true, :is_new => true%>
+
+
+
+
+
<% end %>
\ No newline at end of file
diff --git a/app/views/pull_requests/index.html.erb b/app/views/pull_requests/index.html.erb
index 4053e6739..749135a15 100644
--- a/app/views/pull_requests/index.html.erb
+++ b/app/views/pull_requests/index.html.erb
@@ -28,16 +28,6 @@
<%= render "pull_requests/pull_requests_list" %>
-
-
-
-
- <%= pagination_links_full @pages, @count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
-
-
-
-
-