Merge branch 'develop' into educoder

dev_haigong
cxt 6 years ago
commit 442277519b

@ -128,9 +128,9 @@ class ShixunsService
manager = current_user.manager_of_shixun?(dis, current_user) manager = current_user.manager_of_shixun?(dis, current_user)
game_url = game_url =
if manager if manager
challenge_id = dis.challenges.where(position: d.position).pluck(:id).first position = d.position.nil? ? 1 : d.position
game_identifier = Game.where(user_id: current_user, game_identifier = Game.find_by_sql("SELECT g.identifier FROM games g JOIN challenges c on g.challenge_id = c.id
challenge_id: challenge_id).pluck(:identifier).first WHERE c.shixun_id = #{dis.id} AND c.position = #{position} AND g.user_id = #{d.user_id}").first.try(:identifier)
"/tasks/#{game_identifier}" "/tasks/#{game_identifier}"
else else
"" ""

@ -10,13 +10,12 @@
<%= heads_for_theme %> <%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %> <%= call_hook :view_layouts_base_html_head %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/edu-common','educoder/edu-main','educoder/edu-all', 'css/edu-public', 'css/font-awesome', 'css/edu-class', 'css/magic-check'%> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/edu-common','educoder/edu-main','educoder/edu-all', 'css/edu-public', 'css/font-awesome', 'css/edu-class', 'css/magic-check'%>
<%#= javascript_heads %> <%= javascript_heads %>
<%= javascript_include_tag "edu/application",'educoder/edu_application'%> <%= javascript_include_tag "edu/application", 'educoder/edu_application'%>
</head> </head>
<body onload="prettyPrint();" style="height: 100%; background: #fff;"> <body style="height: 100%; background: #fff;">
<div class="newContainer" style="width: 1000px;"> <!-- 页面全部内容 --> <div class="newContainer" style="width: 1000px;"> <!-- 页面全部内容 -->
<div class="clearfix" style="width: 1000px;"> <!-- 主题部分 --> <div class="clearfix" style="width: 1000px;"> <!-- 主题部分 -->
<%= render_flash_messages %>
<%= yield %> <%= yield %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

@ -38,7 +38,7 @@
<td><%= user.try(:authentication_status) %></td> <td><%= user.try(:authentication_status) %></td>
<td><%= user.try(:professional_status) %></td> <td><%= user.try(:professional_status) %></td>
<td ><span class="edu-txt-w140 task-hide2" title="<%= user.try(:user_extensions).try(:school).try(:name) %>"><%= user.try(:user_extensions).try(:school).try(:name).blank? ? "--" : user.try(:user_extensions).try(:school) %></span></td> <td ><span class="edu-txt-w140 task-hide2" title="<%= user.try(:user_extensions).try(:school).try(:name) %>"><%= user.try(:user_extensions).try(:school).try(:name).blank? ? "--" : user.try(:user_extensions).try(:school) %></span></td>
<td ><span class="edu-txt-w140 task-hide2"><%= user.try(:user_extensions).department ? user.try(:user_extensions).try(:department).try(:name).to_s : '--' %></span></td> <td ><span class="edu-txt-w140 task-hide2"><%= user.try(:user_extensions).try(:department) ? user.try(:user_extensions).try(:department).try(:name).to_s : '--' %></span></td>
<td><%= user.last_login_on.blank? ? "--" : (format_time user.last_login_on) %></td> <td><%= user.last_login_on.blank? ? "--" : (format_time user.last_login_on) %></td>
<td><%= identity_authentication_status(user) %></td> <td><%= identity_authentication_status(user) %></td>
<td class="homepage_teacher"> <td class="homepage_teacher">

@ -93,7 +93,7 @@
<%#= render :partial => "student_work/echart_of_shixun_skills" %> <%#= render :partial => "student_work/echart_of_shixun_skills" %>
</div> </div>
</div>--> </div>-->
<% if true %> <% unless params[:pdf] %>
<div class="bor-grey-e mt20"> <div class="bor-grey-e mt20">
<p class="pt10 pb10 pl15 pr15 clearfix bor-bottom-greyE"> <p class="pt10 pb10 pl15 pr15 clearfix bor-bottom-greyE">
<span class="fl font-bd">图形统计</span> <span class="fl font-bd">图形统计</span>

@ -277,6 +277,12 @@ class Comments extends Component {
</a> </a>
<span className="t_area fl">{item.time}</span> <span className="t_area fl">{item.time}</span>
{ item.position && <span className="fl color-light-green font-14 ml15">[{item.position}]</span> } { item.position && <span className="fl color-light-green font-14 ml15">[{item.position}]</span> }
{ item.game_url ?
<Tooltip title={ `点击查看TA的代码页面` } disableFocusListener={true}>
<a href={item.game_url} target="_blank" className="fl font-14 ml15"
style={{ color: "#4CACFF", cursor: "pointer" }}
>查看</a>
</Tooltip> : ""}
{ {
item.reward ? item.reward ?
<Tooltip title={ `已奖励金币${item.reward}` } disableFocusListener={true}> <Tooltip title={ `已奖励金币${item.reward}` } disableFocusListener={true}>
@ -303,7 +309,7 @@ class Comments extends Component {
<div className="comment_content clearfix" id={`reply_content_${item.id}`}> <div className="comment_content clearfix" id={`reply_content_${item.id}`}>
<div className="color-grey-3 break_word_comments" id={`reply_content_${item.id}`}> <div className="color-grey-3 break_word_comments" id={`reply_content_${item.id}`}>
{ item.hidden && item.admin === false && item.manager === false { item.hidden && item.admin === false && (item.manager === false || item.manager == undefined)
? <p className="color-orange font-16">违规评论已被屏蔽</p> ? <p className="color-orange font-16">违规评论已被屏蔽</p>
: <div dangerouslySetInnerHTML={{__html: _content}}></div> : <div dangerouslySetInnerHTML={{__html: _content}}></div>
} }

Loading…
Cancel
Save