Merge branch 'educoder' into develop

dev_bj
daiao 6 years ago
commit dfc63bedad

@ -53,7 +53,7 @@ class Message < ActiveRecord::Base
has_many :tidings, :as => :container , :dependent => :destroy
belongs_to :reply, :class_name => 'Message', :foreign_key => 'reply_id'
has_one :message_detail, :dependent => :destroy
#has_one :message_detail, :dependent => :destroy
#转发表
has_many :forwards, :as => :from, :dependent => :destroy

@ -252,7 +252,7 @@ class Tiding < ActiveRecord::Base
if self.tiding_type == "Mentioned"
"@了你:" + message_content(container.notes)
elsif self.tiding_type == "Comment"
"评论了你" + (container.parent.present? ? "的回复:" : "发布的项目issue") + message_content(container.notes)
container.present? ? ("评论了你" + (container.parent.present? ? "的回复:" : "发布的项目issue") + message_content(container.notes)) : ""
else
"更新了Issue#{container.issue.subject}"
end

@ -568,7 +568,6 @@ class GamesService
testCases = Base64.urlsafe_encode64(testSet.to_json) unless testSet.blank?
# 注意:这个地方的参数写的时候不能换行
content_modified = params[:content_modified] # 决定文件内容是否有修改有修改如果中间成pull没有更新则轮询等待更新
params = {:tpiID => "#{myshixun.id}", :tpiGitURL => "#{gitUrl}", :buildID => "#{taskId}",:instanceChallenge => "#{step}",

@ -72,7 +72,8 @@
<p class="enter_btn mb40 clearfix">
<%
is_start = Time.now > first_section.start_time
btn_url = is_start ? "#{entry.url}" : "javascript:void(0);"
competition_url = User.current.logged? ? "#{entry.url}?eid=#{User.current.id}" : "#{entry.url}"
btn_url = is_start ? "#{competition_url}" : "javascript:void(0);"
%>
<a class="setNewBnt <%= is_start ? 'active' : '' %>"
href="javascript:void(0);"

@ -34,8 +34,8 @@
<%= link_to exercise.user.show_real_name, user_path(exercise.user),:class=>"color-grey-3" %>
</td>
<% member = @course.members.where(:user_id => exercise.user_id).first %>
<td title="<%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %>">
<span class="task-hide" style="display: block;max-width: 120px;"><%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %></span>
<td title="<%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.try(:name) %>">
<span class="task-hide" style="display: block;max-width: 120px;"><%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.try(:name) %></span>
</td>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<td title="<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id %>">

@ -68,7 +68,7 @@
</p>
<div class="mt10">
<p class="color-grey-6 clearfix">
<%= link_to object.owner.show_name, user_path(object), :class => "fl color-grey-9", :target => "_blank" %>
<%= link_to object.owner.show_name, user_path(object.owner), :class => "fl color-grey-9", :target => "_blank" %>
<span class="fr squareIconSpan"><i class="iconfont icon-liulanyan fl mr5" data-tip-down="访问量"></i><%= object.visits %></span>
</p>
</div>

Loading…
Cancel
Save