Merge branch 'rep_quality' into develop

This commit is contained in:
huang 2016-07-11 17:02:25 +08:00
commit 22745edb9b
3 changed files with 26 additions and 34 deletions

View File

@ -114,7 +114,7 @@ class QualityAnalysisController < ApplicationController
end end
end end
rescue => e rescue => e
puts e @message = e.message
end end
respond_to do |format| respond_to do |format|
if @current_build_status == "success" if @current_build_status == "success"

View File

@ -1,14 +1,6 @@
<% if @name_flag %> <% if @name_flag %>
<%= render :partial => "result_list" %> <%= render :partial => "result_list" %>
<% else %> <% else %>
<% if params[:current_build_status].nil? || params[:current_build_status] == "success" %>
<%= render :partial => "show", :locals => {:branch => @branch} %> <%= render :partial => "show", :locals => {:branch => @branch} %>
<% else %>
<% if params[:build_console_result] %>
运行结果超时
<% else %>
<%= render :partial => "console_output" %>
<% end %>
<% end %>
<% end %> <% end %>

View File

@ -1,5 +1,5 @@
<% if ma.class == CourseMessage %> <% if ma.class == CourseMessage %>
<% if ma.course_message_type == "News" %> <% if ma.course_message_type == "News" && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li> <li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li>
@ -19,7 +19,7 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "Comment" %> <% if ma.course_message_type == "Comment" && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li> <li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
@ -39,7 +39,7 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil?%> <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
@ -98,7 +98,7 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + '老师', <li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + '老师',
@ -133,7 +133,7 @@
</ul> </ul>
<% end %> <% end %>
<!--作品开启匿评 待整合:时间紧--> <!--作品开启匿评 待整合:时间紧-->
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a> <a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
@ -168,7 +168,7 @@
</ul> </ul>
<% end %> <% end %>
<!--作品关闭匿评--> <!--作品关闭匿评-->
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
@ -199,7 +199,7 @@
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a> <a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
@ -229,24 +229,24 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 && ma.course_message %>
<ul class="homepageNewsList fl" id="course_message_homework_<%=ma.id %>"> <ul class="homepageNewsList fl" id="course_message_homework_<%=ma.id %>">
<%= render :partial => 'apply_homework_course_message', :locals => {:ma => ma} %> <%= render :partial => 'apply_homework_course_message', :locals => {:ma => ma} %>
</ul> </ul>
<% end %> <% end %>
<!--资源申请--> <!--资源申请-->
<% if ma.course_message_type == "ApplyResource" && ma.status == 0 %> <% if ma.course_message_type == "ApplyResource" && ma.status == 0 && ma.course_message %>
<ul class="homepageNewsList fl" id="apply_resource_message_<%=ma.id %>"> <ul class="homepageNewsList fl" id="apply_resource_message_<%=ma.id %>">
<%= render :partial => 'apply_resource_course_message', :locals => {:ma => ma} %> <%= render :partial => 'apply_resource_course_message', :locals => {:ma => ma} %>
</ul> </ul>
<% end %> <% end %>
<!--资源申请回复--> <!--资源申请回复-->
<% if ma.course_message_type == "ApplyResource" && ma.status == 1 %> <% if ma.course_message_type == "ApplyResource" && ma.status == 1 && ma.course_message %>
<ul class="homepageNewsList fl" id="apply_resource_message_<%=ma.id %>"> <ul class="homepageNewsList fl" id="apply_resource_message_<%=ma.id %>">
<%= render :partial => 'apply_resource_course_message_reply', :locals => {:ma => ma} %> <%= render :partial => 'apply_resource_course_message_reply', :locals => {:ma => ma} %>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 6 %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 6 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag(url_to_avatar(User.find(ma.apply_user_id)), width: "30px", height: "30px", class: "mt3") %></div></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag(url_to_avatar(User.find(ma.apply_user_id)), width: "30px", height: "30px", class: "mt3") %></div></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
@ -271,7 +271,7 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "Poll" %> <% if ma.course_message_type == "Poll" && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li> <li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li>
@ -287,7 +287,7 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "Message" %> <% if ma.course_message_type == "Message" && !ma.nil? && !ma.course_message.nil? %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
@ -376,7 +376,7 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "JournalsForMessage" %> <% if ma.course_message_type == "JournalsForMessage" && ma.course_message %>
<% if ma.course_message.jour_type == 'Course' %> <% if ma.course_message.jour_type == 'Course' %>
<% if params[:type] != 'homework' %> <% if params[:type] != 'homework' %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
@ -459,7 +459,7 @@
<% end %> <% end %>
<% end %> <% end %>
<!-- 作业迟交,不能参与匿评提醒消息 --> <!-- 作业迟交,不能参与匿评提醒消息 -->
<% if ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) %> <% if ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
@ -493,7 +493,7 @@
<% end %> <% end %>
<% if ma.course_message_type == "StudentWork" && ma.status == 1 %> <% if ma.course_message_type == "StudentWork" && ma.status == 1 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a> <a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
@ -514,7 +514,7 @@
</ul> </ul>
<% end %> <% end %>
<!-- 学生追加作品附件 --> <!-- 学生追加作品附件 -->
<% if ma.course_message_type == "StudentWork" && ma.status == 2 %> <% if ma.course_message_type == "StudentWork" && ma.status == 2 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a> <a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
@ -534,7 +534,7 @@
</ul> </ul>
<% end %> <% end %>
<!-- 创建课程消息 --> <!-- 创建课程消息 -->
<% if ma.course_message_type == "Course" %> <% if ma.course_message_type == "Course" && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a> <a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a>
@ -569,7 +569,7 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ma.course_message_type == "JoinCourseRequest" && !ma.nil? %> <% if ma.course_message_type == "JoinCourseRequest" && !ma.nil? && ma.course_message %>
<ul class="homepageNewsList fl" id="course_message_join_<%=ma.id %>"> <ul class="homepageNewsList fl" id="course_message_join_<%=ma.id %>">
<%= render :partial => 'join_course_course_message', :locals => {:ma => ma} %> <%= render :partial => 'join_course_course_message', :locals => {:ma => ma} %>
</ul> </ul>
@ -607,7 +607,7 @@
<% end %> <% end %>
<!--被老师拉入课程--> <!--被老师拉入课程-->
<% if ma.course_message_type == "JoinCourse" and ma.status == 0 %> <% if ma.course_message_type == "JoinCourse" and ma.status == 0 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a>
@ -641,7 +641,7 @@
<% end %> <% end %>
<!--被老师拉入课程--> <!--被老师拉入课程-->
<% if ma.course_message_type == "JoinCourse" and ma.status == 1 %> <% if ma.course_message_type == "JoinCourse" and ma.status == 1 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a> <a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a>
@ -675,7 +675,7 @@
<% end %> <% end %>
<!--被老师移出课程--> <!--被老师移出课程-->
<% if ma.course_message_type == "RemoveFromCourse" %> <% if ma.course_message_type == "RemoveFromCourse" && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a>
@ -710,7 +710,7 @@
<% end %> <% end %>
<!--老师发布测验 发给学生看--> <!--老师发布测验 发给学生看-->
<% if ma.course_message_type == "Exercise" && ma.status == 2 %> <% if ma.course_message_type == "Exercise" && ma.status == 2 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
@ -747,7 +747,7 @@
<% end %> <% end %>
<% if ma.course_message_type == "Exercise" && ma.status == 3 %> <% if ma.course_message_type == "Exercise" && ma.status == 3 && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">