Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into dev_aliyun

dev_aliyun
cxt 5 years ago
commit 742f76b810

@ -1746,7 +1746,7 @@ end
# 删除 # 删除
def delete_applied_departments def delete_applied_departments
transaction do ActiveRecord::Base.transaction do
applied_department = ApplyAddDepartment.find params[:depart_id] applied_department = ApplyAddDepartment.find params[:depart_id]
applied_message = AppliedMessage.where(:applied_id => applied_department.id, :applied_type => "ApplyAddDepartment") applied_message = AppliedMessage.where(:applied_id => applied_department.id, :applied_type => "ApplyAddDepartment")
applied_message.update_all(:status => 3) applied_message.update_all(:status => 3)

@ -9,9 +9,9 @@ module EcMajorSchoolsHelper
subitem_ids = ec_year.ec_graduation_subitems.reorder(nil).pluck(:id) subitem_ids = ec_year.ec_graduation_subitems.reorder(nil).pluck(:id)
relations = EcGraduationRequirementCalculation.joins(ec_course_support: :ec_graduation_subitem_courses).where('ec_graduation_subitem_id in (?)', subitem_ids) relations = EcGraduationRequirementCalculation.joins(ec_course_support: :ec_graduation_subitem_courses).where('ec_graduation_subitem_courses.ec_graduation_subitem_id in (?)', subitem_ids)
reached_map = relations.where(status: true).group('ec_graduation_subitem_id').count reached_map = relations.where(status: true).group('ec_graduation_subitem_courses.ec_graduation_subitem_id').count
reached_map.keys.size reached_map.keys.size
end end

@ -11,7 +11,8 @@ class CompetitionTeam < ActiveRecord::Base
# attr_accessible :invite_code, :name, :team_type # attr_accessible :invite_code, :name, :team_type
def teacher def teacher
User.where(:id => self.teacher_id).first teacher_id = self.teachers.first&.user_id
User.where(id: teacher_id).first
end end
def group_members def group_members

@ -25,7 +25,7 @@
<img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/> <img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/>
</li> </li>
<li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li> <li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li>
<li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包创新", project_packages_path %></li> <!-- <li class="<%#= params[:controller] == "project_packages" ? " active" : "" %>"><%#= link_to "众包创新", project_packages_path %></li>-->
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li> <li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li>
<% if User.current.ec_school.present? %> <% if User.current.ec_school.present? %>
<li class="<%= ecs_controller.include?(params[:controller]) ? " active" : "" %>" id="ec_banner"> <li class="<%= ecs_controller.include?(params[:controller]) ? " active" : "" %>" id="ec_banner">

@ -27,7 +27,7 @@
<img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/> <img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/>
</li> </li>
<li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li> <li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li>
<li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包创新", project_packages_path %></li> <!-- <li class="<%#= params[:controller] == "project_packages" ? " active" : "" %>"><%#= link_to "众包创新", project_packages_path %></li>-->
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li> <li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li>
<!--<li><%#= link_to "活动竞赛", competitions_path %></li>--> <!--<li><%#= link_to "活动竞赛", competitions_path %></li>-->
</ul> </ul>

@ -403,11 +403,11 @@ class NewHeader extends Component {
<li><a href="/moop_cases">教学案例</a></li> <li><a href="/moop_cases">教学案例</a></li>
<li className={`${crowdsourcing === true ? 'active' : ''}`} style={{display:project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'none':'block'}} > {/*<li className={`${crowdsourcing === true ? 'active' : ''}`} style={{display:project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'none':'block'}} >*/}
<a href="/crowdsourcing"> {/*<a href="/crowdsourcing">*/}
{project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'':'众包创新'} {/*{project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'':'众包创新'}*/}
</a> {/*</a>*/}
</li> {/*</li>*/}
<li className={`${activeForums === true ? 'active' : ''}`}><a href="/forums">交流问答</a></li> <li className={`${activeForums === true ? 'active' : ''}`}><a href="/forums">交流问答</a></li>
<li className={`${activeCourses === true ? 'active' : ''}`} style={{display:ecUrl===null||ecUrl===undefined||ecUrl===""?'none':'block'}}><a href={ecUrl}>{ecUrl===null||ecUrl===undefined||ecUrl===""?'':'工程认证'}</a></li> <li className={`${activeCourses === true ? 'active' : ''}`} style={{display:ecUrl===null||ecUrl===undefined||ecUrl===""?'none':'block'}}><a href={ecUrl}>{ecUrl===null||ecUrl===undefined||ecUrl===""?'':'工程认证'}</a></li>
</ul> </ul>

Loading…
Cancel
Save