dev_bj
caishi 5 years ago
commit 92f778c598

@ -61,6 +61,9 @@ class ApplicationController < ActionController::Base
# rescue_from ActionController::InvalidAuthenticityToken, :with => :invalid_authenticity_token
rescue_from ::Unauthorized, :with => :deny_access
rescue_from ::ActionView::MissingTemplate, :with => :missing_template
rescue_from ::ActiveRecord::RecordNotFound do
render_404
end
include Redmine::Search::Controller
include Redmine::MenuManager::MenuController

@ -2404,17 +2404,17 @@ class CoursesController < ApplicationController
homeworks.where(:homework_type => 4).each do |homework|
sheet1[4,current_col+=1] = "#{homework.name}"
end
for i in 0 ... homeworks.where(:homework_type => 1).size
sheet1[4,current_col+=1] = "普通作业第"+(i+1).to_s+""
homeworks.where(:homework_type => 1).each do |homework|
sheet1[4,current_col+=1] = "#{homework.name}"
end
for i in 0 ... homeworks.where(:homework_type => 3).size
sheet1[4,current_col+=1] = "分组作业第"+(i+1).to_s+""
homeworks.where(:homework_type => 3).each do |homework|
sheet1[4,current_col+=1] = "#{homework.name}"
end
for i in 0 ... exercises.size
sheet1[4,current_col+=1] = "试卷第"+(i+1).to_s+""
exercises.each do |exercise|
sheet1[4,current_col+=1] = "#{exercise.exercise_name}"
end
for i in 0 ... tasks.size
sheet1[4,current_col+=1] = "毕设任务第"+(i+1).to_s+""
tasks.each do |task|
sheet1[4,current_col+=1] = "#{task.name}"
end
sheet1[4,current_col+=1] = "实训作业总得分"
@ -2434,7 +2434,7 @@ class CoursesController < ApplicationController
sheet1[count_row,column+=1] = member.user.login
sheet1[count_row,column+=1] = member.user.mail
sheet1[count_row,column+=1] = member.user.user_extensions.student_id
sheet1[count_row,column+=1] = member.course_group_id == 0 ? "暂无" : member.course_group.name
sheet1[count_row,column+=1] = member.course_group_id == 0 ? "暂无" : member.course_group.try(:name)
# current_col = 5
shixun_score = 0
homeworks.where(:homework_type => 4).each do |homework|
@ -2550,7 +2550,7 @@ class CoursesController < ApplicationController
sheet2[count_row,1] = act_member.user.show_real_name
sheet2[count_row,2] = act_member.user.login
sheet2[count_row,3] = act_member.user.user_extensions.student_id
sheet2[count_row,4] = act_member.course_group_id == 0 ? "暂无" : act_member.course_group.name
sheet2[count_row,4] = act_member.course_group_id == 0 ? "暂无" : act_member.course_group.try(:name)
sheet2[count_row,5]= act_member.homework_num.to_i + act_member.graduation_num.to_i
sheet2[count_row,6]= act_member.exercise_num
sheet2[count_row,7]= act_member.poll_num
@ -2598,7 +2598,7 @@ class CoursesController < ApplicationController
end
homeworks.where(:homework_type => 1).includes(:score_student_works).each_with_index do |home, i|
sheet = book.create_worksheet :name => "普通作业第#{i+1}"
sheet = book.create_worksheet :name => "#{home.name}"
sheet[0,0] = "课程编号"
sheet[0,1] = course.id
sheet[1,0] = "课程名称"
@ -2645,7 +2645,7 @@ class CoursesController < ApplicationController
end
homeworks.where(:homework_type => 3).includes(:score_student_works).each_with_index do |home, i|
sheet = book.create_worksheet :name => "分组作业第#{i+1}"
sheet = book.create_worksheet :name => "#{home.name}"
sheet[0,0] = "课程编号"
sheet[0,1] = course.id
sheet[1,0] = "课程名称"
@ -2693,7 +2693,7 @@ class CoursesController < ApplicationController
end
exercises.includes(:score_exercise_users).each_with_index do |exercise, i|
sheet = book.create_worksheet :name => "试卷第#{i+1}"
sheet = book.create_worksheet :name => "#{exercise.exercise_name}"
sheet[0,0] = "课程编号"
sheet[0,1] = course.id
sheet[1,0] = "课程名称"
@ -2724,7 +2724,7 @@ class CoursesController < ApplicationController
end
tasks.each_with_index do |task, i|
sheet = book.create_worksheet :name => "毕设任务第#{i+1}"
sheet = book.create_worksheet :name => "#{task.name}"
sheet[0,0] = "课程编号"
sheet[0,1] = course.id
sheet[1,0] = "课程名称"

@ -229,12 +229,6 @@ class IssuesController < ApplicationController
User.current.at_messages.unviewed('Journal', j.id).each {|x| x.viewed!}
end
# 缺陷状态消息更新
query_journals_ids = @issue.journals.map{|journal| journal.id}
if query_journals_ids.length > 0
query_journals = ForgeMessage.where("user_id =? and forge_message_type =? and forge_message_id in (#{query_journals_ids.join(",")})", User.current.id, "Journal")
query_journals.update_all(:viewed => true)
end
@jour_reply = Journal.new
@journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id desc").all

@ -21,7 +21,7 @@ class LibrariesController < ApplicationController
end
def show
@library = Library.find(params[:id])
@library = current_library
return render_403 unless admin_or_self? || @library.published?
@library_applies = @library.library_applies.where(status: :refused).order('created_at desc')
@ -40,7 +40,7 @@ class LibrariesController < ApplicationController
redirect_to publish_success_libraries_path
else
flash[:message] = '保存成功'
render 'new'
redirect_to edit_library_path(id: @library.id)
end
rescue ActiveRecord::RecordInvalid => _
render 'new'
@ -50,11 +50,13 @@ class LibrariesController < ApplicationController
end
def edit
return render_403 unless admin_or_self?
@library = current_library
redirect_to library_path(id: @library.id) unless @library.editable?
end
def update
return render_403 unless admin_or_self?
@library = current_library
Libraries::SaveService.new(@library, current_user, form_params).call
if with_publish?
@ -62,7 +64,7 @@ class LibrariesController < ApplicationController
redirect_to publish_success_libraries_path
else
flash[:message] = '保存成功'
render 'edit'
redirect_to edit_library_path(id: @library.id)
end
rescue ActiveRecord::RecordInvalid => _
render 'edit'
@ -71,6 +73,24 @@ class LibrariesController < ApplicationController
render 'edit'
end
def destroy
if admin_or_business?
current_library.destroy
elsif current_library.user_id == current_user.id
unless current_library.pending?
render json: { status: -1, message: '只有草稿才能删除' }
return
end
current_library.destroy
else
render_403
return
end
render json: { status: 0, message: 'success' }
end
def publish
Libraries::SubmitService.new(current_library).call
render json: { status: 0 }
@ -84,7 +104,7 @@ class LibrariesController < ApplicationController
private
def current_library
@_current_library ||= current_user.libraries.find(params[:id])
@_current_library ||= Library.find(params[:id])
end
def form_params
@ -100,6 +120,6 @@ class LibrariesController < ApplicationController
end
def admin_or_self?
@library.user_id == current_user.id || current_user.admin?
current_library.user_id == current_user.id || admin_or_business?
end
end

@ -332,9 +332,7 @@ class ProjectsController < ApplicationController
def show
# 顶部导航
@project_menu_type = 1
# 更新消息为已读
update_message_status(User.current, @project)
# over
if params[:jump] && redirect_to_project_menu_item(@project, params[:jump])
return
end

@ -6,7 +6,7 @@ class CompetitionStaff < ActiveRecord::Base
belongs_to :competition
validates :position, numericality: { only_integer: true }
validates :minimum, numericality: { only_integer: true, greater_than: 0 }
validates :minimum, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
validates :maximum, numericality: { only_integer: true, greater_than_or_equal_to: lambda { |obj| obj.minimum } }
validates :category, presence: true, inclusion: { in: %w(all teacher student profession) }

@ -91,10 +91,10 @@ class Issue < ActiveRecord::Base
attr_reader :current_journal
# fq
after_create :act_as_activity,:be_user_score_new_issue,:act_as_forge_activity, :add_issues_count, :send_tiding
after_create :act_as_forge_activity, :add_issues_count, :send_tiding
after_update :be_user_score, :update_activity
after_update :be_user_score,:update_activity
after_destroy :down_user_score, :decrease_issues_count
# after_create :be_user_score
# end

@ -45,8 +45,4 @@ class Library < ActiveRecord::Base
def increment_visited_count!
Library.connection.execute("update libraries set visited_count = COALESCE(visited_count, 0) + 1 where id = #{id}")
end
def editable?
pending? || refused?
end
end

@ -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}",

@ -17,7 +17,7 @@ class Libraries::SaveService
library.generate_uuid
end
attachment_ids = params.delete(:attachment_ids)
attachment_ids = params.delete(:attachment_ids).try(:compact)
ActiveRecord::Base.transaction do
library.assign_attributes(params)
@ -32,6 +32,6 @@ class Libraries::SaveService
private
def validate_params!
raise Error, '附件不能为空' if params[:attachment_ids].blank?
raise Error, '附件不能为空' if params[:attachment_ids].try(:compact).blank?
end
end

@ -8,6 +8,8 @@ class Libraries::SubmitService
end
def call
return if library.processing? || library.published?
raise Error, '该状态下不能提交审核' unless library.may_submit?
ActiveRecord::Base.transaction do

@ -16,6 +16,7 @@
<span class="color-grey mr10 fl"><%= number_to_human_size attachment.filesize %></span>
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
<%= hidden_field_tag "attachments[p#{i}][attachment_id]", attachment.id %>
</span>
<% end %>
<% container.saved_attachments.each_with_index do |attachment, i| %>

@ -16,7 +16,7 @@
<div class="df pl20 pr20 mt10">
<label class="mt3"><span class="mr3 color-orange">*</span>队名:</label>
<input type="text" name="name" autocomplete="off" <%= none_edit ? "disabled" : "" %> maxlength="20" value="<%= @team.try(:name) %>" class="input-flex-35" style="margin-right: 102px;" placeholder="请输入您的组队名称"/>
<input type="text" name="name" autocomplete="off" <%= none_edit ? "disabled" : "" %> maxlength="20" value="<%= @team.try(:name) %>" class="input-flex-35" placeholder="请输入您的组队名称"/>
</div>
<p style="line-height: 27px;height: 27px"><span id="team_name_notice" class="color-orange-tip ml73 none"></span></p>
@ -24,7 +24,7 @@
<div class="df pl20 pr20">
<label class="ml10 mt3">导师:</label>
<div class="flex1 pr search-new">
<input type="text" class="input-100-35 fl" <%= @team_user.user_extensions.identity == 0 ? "disabled" : "" %> autocomplete="off" placeholder="请您输入老师姓名进行搜索" id="teacher_search_input"
<input type="text" class="input-100-35 fl" <%= @team_user.user_extensions.identity == 0 ? "disabled" : "" %> autocomplete="off" placeholder="请您输入老师姓名进行搜索;可以后续再添加导师" id="teacher_search_input"
value="<%= @team.try(:id).present? ? @team.teacher.try(:show_name) : (@team_user.user_extensions.identity == 0 ? @team_user.show_name : "") %>">
<input type="hidden" id="teacher_id" data-select="0" value="<%= @team.try(:id).present? ? @team.try(:teacher_id) : (@team_user.user_extensions.identity == 0 ? @team_user.id : "") %>">
<input type="hidden" id="teacher_name" value="<%= @team.try(:id).present? ? @team.teacher.try(:show_name) : (@team_user.user_extensions.identity == 0 ? @team_user.show_name : "") %>">
@ -34,7 +34,7 @@
<ul class="pointerTeacher none" id="pointerTeacher">
</ul>
</div>
<a class="fl ml20 white-btn edu-blueback-btn mt4" onclick="add_teacher()">添加导师</a>
<a class="fl ml20 white-btn edu-blueback-btn mt4 add-teacher-btn" style="display: none;" onclick="add_teacher()">添加导师</a>
</div>
<p style="line-height: 27px;height: 27px"><span id="teacher_notice" class="color-orange-tip ml73 none"></span></p>
<% end %>
@ -52,7 +52,7 @@
<ul class="pointerTeacher none" id="pointerStudent">
</ul>
</div>
<a class="fl ml20 white-btn edu-blueback-btn mt4" onclick="<%= none_edit ? '' : 'add_member()' %>">添加成员</a>
<a class="fl ml20 white-btn edu-blueback-btn mt4 add-member-btn" style="display: none;" onclick="<%= none_edit ? '' : 'add_member()' %>">添加成员</a>
</div>
<p style="line-height: 27px;height: 27px"><span id="member_notice" class="color-orange-tip ml73 none"></span></p>
<% end %>

@ -28,6 +28,8 @@
$("#member_notice").hide();
$("#pointerStudent").hide();
e.stopPropagation();
$('.add-member-btn').trigger('click');
});
$("body").click(function(){
$(".pointerTeacher").hide();

@ -25,6 +25,7 @@
$("#pointerTeacher").hide();
$("#teacher_notice").hide();
e.stopPropagation();
$('.add-teacher-btn').trigger('click');
});
$("body").click(function(){
$(".pointerTeacher").hide();

@ -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);"

@ -17,9 +17,9 @@
<div class="enter_panel" style="height: 500px">
<div class="course_competition_panel">
<a href="<%= is_start ? first_section.competition_entries[0].url : 'javascript:void(0)'%>"
class="<%= is_start ? 'active' : '' %>"><%= first_section.competition_entries[0].name %></a>
class="<%= is_start ? 'active' : '' %>" target="_blank"><%= first_section.competition_entries[0].name %></a>
<a href="<%= is_start ? first_section.competition_entries[1].url : 'javascript:void(0)'%>"
class="<%= is_start ? 'active' : '' %>"><%= first_section.competition_entries[1].name %></a>
class="<%= is_start ? 'active' : '' %>" target="_blank"><%= first_section.competition_entries[1].name %></a>
</div>
<!--<a href="<%#= is_start ? first_section.competition_entries[2].url : 'javascript:void(0)'%>"-->
<!--class="ex_submit"><%#= first_section.competition_entries[2].name %></a>-->

@ -8,9 +8,9 @@
<ul>
<li class="clearfix mb10">
<label class="panel-form-label fl">课堂邀请码:</label>
<input type="text" class="input-60-40 fl" name="invite_code" placeholder="请输入五位课堂邀请码" value="<%= @invitation_code %>">
<input type="text" class="input-60-40 fl" name="invite_code" placeholder="请输入5位课堂邀请码或6位分班邀请码" style="width: 70%;" value="<%= @invitation_code %>">
</li>
<p id="none_invite_code_notice" class="color-orange none f12" style="margin-left: 90px;">请输入五位课堂邀请码</p>
<p id="none_invite_code_notice" class="color-orange none f12" style="margin-left: 90px;">请输入5位课堂邀请码或6位分班邀请码</p>
<li class="clearfix ">
<label class="panel-form-label fl">身份:</label>
<span class="fl mr20 mt2">

@ -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 %>">

@ -1,21 +1,19 @@
<% project_file_num = Attachment.where(:container_type => "Project", :container_id => @project.id).count %>
<% project_issue_count = @project.issues.count %>
<% training_tasks_count = @project.training_tasks.count %>
<% project_acts = ForgeActivity.where("project_id = ?", @project.id).count %>
<% raodmaps = Version.where("project_id = ?", @project.id).count %>
<% project_score = @project.project_score %>
<%# 更新访问数,刷新的时候更新访问次数 %>
<% update_visiti_count(@project) if @project.try(:id) %>
<% update_visiti_count(@project) if @project.try(:id) %>
<div class="pro_new">
<div class="pro_new_top clear">
<div class="fl pro_new_name clear">
<% unless @project.is_public %><i class="fa fa-lock color-grey-c mr5 font-24 fl "></i><% end %>
<% if @project.is_training_project? %>
<%=link_to "#{@project.owner.try(:show_name)}导师<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<%= link_to "#{@project.owner.try(:show_name)}导师<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<% else %>
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<%= link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<% end %>
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
<%= link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
</div>
<!--加入、退出、关注项目-->
@ -52,14 +50,6 @@
<%= link_to project_issue_count > 0 ? "#{l(:label_issue_tracking)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_issue_count}</span>".html_safe : "#{l(:label_issue_tracking)}", project_issues_path(@project, :remote => true), :class => "pro_new_proname" %>
</li>
<% end %>
<!--实训任务-->
<% if !@project.enabled_modules.where("name = 'training_tasks'").empty? %>
<% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || is_project_manager?(User.current, @project.try(:forked_from_project_id)) %>
<li id="project_menu_011">
<%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project), :class => "pro_new_proname" %>
</li>
<% end %>
<% end %>
<!--资源库-->
<% unless @project.enabled_modules.where("name = 'files'").empty? %>

@ -51,7 +51,7 @@
<span class="bor-bottom-greyE currentName task-hide"><%= User.current.show_name %></span>
<li><%= link_to '我的课堂', user_path(User.current) %></li>
<li><%= link_to '我的实训', user_path(User.current, :type => 'a_shixun') %></li>
<li><%= link_to '我的实课程', user_path(User.current, :type => 'a_path') %></li>
<li><%= link_to '我的实课程', user_path(User.current, :type => 'a_path') %></li>
<% if User.current.partner.present? %>
<li><%= link_to '客户管理', partner_list_cooperate_path(User.current.partner) %></li>
<% end %>
@ -75,7 +75,7 @@
<ul class="fl with50 edu-txt-center pr ul-leftline">
<li><%= link_to '新建课堂', new_course_path() %></li>
<li><%= link_to '新建实训', new_shixun_path() %></li>
<li><%= link_to '新建实课程', new_subject_path() %></li>
<li><%= link_to '新建实课程', new_subject_path() %></li>
<li><%= link_to '新建项目', new_project_path() %></li>
</ul>
<ul class="fl with50 edu-txt-center">

@ -62,7 +62,7 @@
<ul class="fl with50 edu-txt-center pr ul-leftline">
<li><%= link_to '新建课堂', new_course_path() %></li>
<li><%= link_to '新建实训', new_shixun_path() %></li>
<li><%= link_to '新建实课程', new_subject_path() %></li>
<li><%= link_to '新建实课程', new_subject_path() %></li>
<li><%= link_to '新建项目', new_project_path() %></li>
</ul>
<ul class="fl with50 edu-txt-center">
@ -76,7 +76,7 @@
<ul class="edu-menu-list" style="top:60px">
<li><%#= link_to '新建课堂', new_course_path() %></li>
<li><%#= link_to '新建实训', new_shixun_path() %></li>
<li><%#= link_to '新建实课程', new_subject_path() %></li>
<li><%#= link_to '新建实课程', new_subject_path() %></li>
<li><%#= link_to '新建项目', new_project_path() %></li>
</ul>
</div>-->

@ -67,5 +67,11 @@
</div>
</body>
<script>
$(function(){
var message = '<%= flash[:message] %>';
if (message.length > 0) {
sure_confirm_box("提示",450,200,message);
}
})
</script>
</html>

@ -63,12 +63,12 @@
<!--<li><%#= link_to "镜像类别图片",mirror_picture_shixuns_path %></li>-->
</ul>
</li>
<li class="fl edu-admin-nav-li edu-position <%= 'active' if @menu_type == 4 %>" style="width: 100px"><a href="javascript:void(0);" class="edu-admin-nav-a" >实课程+</a>
<li class="fl edu-admin-nav-li edu-position <%= 'active' if @menu_type == 4 %>" style="width: 100px"><a href="javascript:void(0);" class="edu-admin-nav-a" >实课程+</a>
<ul class="edu-admin-nav-inner edu-absolute">
<li style="width: 120px"><%= link_to "实课程等级体系", subject_level_system_managements_path %></li>
<li style="width: 120px"><%= link_to "实课程列表", class_shixuns_managements_path %></li>
<li style="width: 120px"><%= link_to "实课程配置", subject_setting_list_managements_path %></li>
<li style="width: 120px"><%= link_to "已发布实课程", class_publish_shixuns_managements_path %></li>
<li style="width: 120px"><%= link_to "实课程等级体系", subject_level_system_managements_path %></li>
<li style="width: 120px"><%= link_to "实课程列表", class_shixuns_managements_path %></li>
<li style="width: 120px"><%= link_to "实课程配置", subject_setting_list_managements_path %></li>
<li style="width: 120px"><%= link_to "已发布实课程", class_publish_shixuns_managements_path %></li>
</ul>
</li>
<li class="fl edu-admin-nav-li edu-position <%= 'active' if @menu_type == 13 %>"><a href="<%= career_list_managements_path %>" class="edu-admin-nav-a">职业路径</a></li>
@ -115,7 +115,7 @@
<li><%= link_to "部门审批", depart_managements_path %></li>
<li><%= link_to '单位审批', unit_managements_path %></li>
<li><%= link_to '实训发布', shixun_authorization_managements_path %></li>
<li><%= link_to '实课程发布', subject_authorization_managements_path %></li>
<li><%= link_to '实课程发布', subject_authorization_managements_path %></li>
<li><%= link_to '教学案例发布', library_applies_path(status: :pending) %></li>
</ul>
</li>

@ -18,7 +18,6 @@
<%= yield :header_tags -%>
</head>
<!--add by huang-->
<body onload="prettyPrint();">
<div class="newContainer">
<div class="newHeader" id="nHeader">

@ -49,7 +49,9 @@
</div>
<div class="operate mt20 mb20 clearfix">
<%= link_to '确认提交', 'javascript:void(0)', class: 'white-btn edu-blueback-btn changebtn mr20 fl apply-publish-btn' %>
<% unless @library.published? %>
<%= link_to '申请发布', 'javascript:void(0)', class: 'white-btn edu-blueback-btn changebtn mr20 fl apply-publish-btn' %>
<% end %>
<%= link_to '保存', 'javascript:void(0)', class: 'white-btn edu-blueline-btn changebtn mr20 fl submit-btn' %>
</div>
<% end %>
@ -86,43 +88,38 @@
imageUploadURL: "<%= upload_with_markdown_path(container_id: 0, container_type: 'MarkDown') %>" //url
});
$(function(){
var submitForm = function(){
var title = $("input[name='library[title]']").val();
var content = $("textarea[name='library[content]']").val();
var submitForm = function(){
var title = $("input[name='library[title]']").val();
var content = $("textarea[name='library[content]']").val();
if (!title || title.length == 0) {
$("#title_notice").removeClass("none");
return
}else{
$("#title_notice").addClass("none");
}
if (!content || content.length == 0) {
$("#des_notice").removeClass("none");
return
}else{
$("#des_notice").addClass("none");
}
if (!title || title.length == 0) {
$("#title_notice").removeClass("none");
return
}else{
$("#title_notice").addClass("none");
}
if (!content || content.length == 0) {
$("#des_notice").removeClass("none");
return
}else{
$("#des_notice").addClass("none");
}
if($('.attachments_fields .attachment').length == 0){
$("#file_notice").removeClass("none");
return
}else{
$("#file_notice").addClass("none");
}
if($('.attachments_fields .attachment').length == 0){
$("#file_notice").removeClass("none");
return
}else{
$("#file_notice").addClass("none");
}
$('.library-form-container form').submit();
};
$('.library-form-container form').submit();
};
$(function(){
$('.apply-publish-btn').on('click', function(){
$('input[name="apply_publish"]').val(true);
$("input[name='apply_publish']").val(true);
submitForm();
});
$('.submit-btn').on('click', submitForm);
var message = '<%= flash[:message] %>';
if (message.length > 0) {
sure_confirm_box("提示",450,200,message);
}
})
});
</script>

@ -16,7 +16,7 @@
</ul>
<div class="edu-position fr">
<%= hidden_field_tag(:type, params[:type]) %>
<input class="winput-240-30 panel-box-sizing" placeholder="输入教学案例标题、编号进行检索" type="text" id="search_name">
<input class="winput-300-35 panel-box-sizing" placeholder="输入教学案例标题、编号进行检索" type="text" id="search_name">
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey" id="search"><i class="fa fa-search"></i></a>
</div>
</div>
@ -36,7 +36,7 @@
var search = $("#search_name").val();
var type = $("input[name='type']").val();
$.ajax({
url: "/libraries",
url: "<%= libraries_path %>",
dataType: 'script',
data: {search: search, type: type}
});

@ -1,5 +1,5 @@
<%
admin_or_self = User.current.admin? || @library.user_id == User.current.id
admin_or_self = admin_or_business? || @library.user_id == User.current.id
%>
<div class="educontent mb50">
<p class="mt10 mb20 clearfix lineh-20">
@ -42,7 +42,11 @@
<div class="padding30">
<p class="mb10 clearfix">
<span class="color-grey-6 font-16 mr10">详情</span>
<% if admin_or_self && @library.editable? %>
<% if admin_or_business? || @library.user_id == User.current.id && @library.pending? %>
<%= link_to '删除', 'javascript:void(0);', data: { id: @library.id },
class: 'white-btn edu-blueline-btn fr ml20 delete-btn' %>
<% end %>
<% if admin_or_self %>
<%= link_to '编辑', edit_library_path(id: @library.id), class: 'white-btn edu-blueline-btn fr' %>
<% end %>
</p>
@ -99,13 +103,35 @@
sequenceDiagram: true // 默认不解析
});
$(function(){
// 删除
$('.delete-btn').on('click', function(){
var id = $(this).data('id');
op_confirm_tip_1("是否确认删除?", "destroyLibrary(" + id + ");")
});
if ($('#private_reason_ul').length != 0) {
var height=document.getElementById("private_reason_ul").offsetHeight;
var one=parseInt($("#private_reason_ul").find("li").eq(0).height())+10;
var two=parseInt($("#private_reason_ul").find("li").eq(1).height());
var plus=one+two;
if(parseInt(height)>166){
$("#actionPanel").html('点击展开<i class="iconfont icon-xiajiantou color-blue font-14 ml5"></i>');
$(".private_reason").css({maxHeight:plus+"px"});
$("#actionPanel").html('点击展开<i class="iconfont icon-xiajiantou color-blue font-14 ml5"></i>');
$(".private_reason").css({maxHeight:plus+"px"});
}
}
})
function destroyLibrary (id) {
$.ajax({
type: "DELETE",
url: "<%= libraries_path %>/" + id,
success: function (data) {
if(data && data.status == 0){
notice_box_redirect("<%= libraries_path %>", "删除成功");
} else {
notice_box(data.message);
}
}
});
}
</script>

@ -79,9 +79,9 @@
<% @competition.competition_staffs.each do |staff| %>
<div class="competition-staff-row mb10">
<%= select_tag('competition_staffs[][category]', options_for_select(CompetitionStaff.category_options, staff.category), class: 'winput-120-30') %>
<input type="text" autocomplete="off" class="Other_boxinput" name="competition_staffs[][minimum]" required="required" value="<%= staff.minimum %>"/>
<input type="text" autocomplete="off" class="Other_boxinput" name="competition_staffs[][minimum]" value="<%= staff.minimum %>"/>
&nbsp;&nbsp;~&nbsp;&nbsp;
<input type="text" autocomplete="off" class="Other_boxinput" name="competition_staffs[][maximum]" required="required" value="<%= staff.maximum %>"/>
<input type="text" autocomplete="off" class="Other_boxinput" name="competition_staffs[][maximum]" value="<%= staff.maximum %>"/>
<span class="competition-staff-operate ml10">
<i class="fa fa-trash-o ml5 font-16 delete-icon"></i>
@ -168,9 +168,9 @@
<div class="competition-staff-row-example" style="display: none">
<div class="competition-staff-row mb10">
<%= select_tag('competition_staffs[][category]', options_for_select(CompetitionStaff.category_options, ''), class: 'winput-120-30') %>
<input type="text" autocomplete="off" class="Other_boxinput" name="competition_staffs[][minimum]" require="required" value="1"/>
<input type="text" autocomplete="off" class="Other_boxinput" name="competition_staffs[][minimum]" value="1"/>
&nbsp;&nbsp;~&nbsp;&nbsp;
<input type="text" autocomplete="off" class="Other_boxinput" name="competition_staffs[][maximum]" required="required" value="1"/>
<input type="text" autocomplete="off" class="Other_boxinput" name="competition_staffs[][maximum]" value="1"/>
<span class="competition-staff-operate ml10">
<i class="fa fa-trash-o ml5 font-16 delete-icon"></i>

@ -19,8 +19,7 @@
<thead>
<tr>
<th width="6%">序号</th>
<th width="10%">ID</th>
<th width="20%" class="edu-txt-left">单位名称</th>
<th width="30%" class="edu-txt-left">单位名称</th>
<th width="22%">时段一<br><%= "#{params[:begin_date]} 05:00至#{(Time.zone.parse(params[:end_date]) + 1.days).strftime('%Y-%m-%d')} 05:00" %></th>
<th width="22%">时段二<br><%= "#{params[:other_begin_date]} 05:00至#{(Time.zone.parse(params[:other_end_date]) + 1.days).strftime('%Y-%m-%d')} 05:00" %></th>
<th width="20%" colspan="2">
@ -33,8 +32,10 @@
<% @reports.each_with_index do |report, index| %>
<tr>
<td><%= (@obj_pages.page - 1) * @obj_pages.per_page + index + 1 %></td>
<td><%= report.school_id %></td>
<td class="edu-txt-left"><%= report.school_name %></td>
<td class="edu-txt-left">
<%= link_to report.school_name, statistics_college_path(id: report.school_id),
target: '_blank', data: { tip_down: '点击查看学校统计概况'} %>
</td>
<td><%= report['total'] %></td>
<td><%= report['other_total'] %></td>
<%

@ -20,9 +20,7 @@
<thead>
<tr>
<th width="6%">序号</th>
<th width="10%">ID</th>
<th width="24%" class="edu-txt-left">单位名称</th>
<th width="12%"><%= sort_tag('新增教师', name: 'teacher_increase_count', path: school_data_grow_managements_path) %></th>
<th width="12%"><%= sort_tag('新增学生', name: 'student_increase_count', path: school_data_grow_managements_path) %></th>
<th width="12%"><%= sort_tag('新增课堂', name: 'course_increase_count', path: school_data_grow_managements_path) %></th>
@ -36,8 +34,10 @@
<% @reports.each_with_index do |report, index| %>
<tr>
<td><%= (@obj_pages.page - 1) * @obj_pages.per_page + index + 1 %></td>
<td><%= report.school_id %></td>
<td class="edu-txt-left"><%= report.school_name %></td>
<td class="edu-txt-left">
<%= link_to report.school_name, statistics_college_path(id: report.school_id),
target: '_blank', data: { tip_down: '点击查看学校统计概况'} %>
</td>
<td><%= report.teacher_increase_count.to_i %></td>
<td><%= report.student_increase_count.to_i %></td>
<td><%= report.course_increase_count.to_i %></td>

@ -2,8 +2,7 @@
<thead>
<tr>
<th width="6%">序号</th>
<th width="6%">ID</th>
<th width="12%" class="edu-txt-left">单位名称</th>
<th width="18%" class="edu-txt-left">单位名称</th>
<th width="10%"><%= sort_tag('教师总人数', name: 'teacher_count', path: school_report_managements_path) %></th>
<th width="10%"><%= sort_tag('学生总人数', name: 'student_count', path: school_report_managements_path) %></th>
@ -23,8 +22,7 @@
<% @schools.each_with_index do |school, index| %>
<tr>
<td><%= (@obj_pages.page - 1) * @obj_pages.per_page + index + 1 %></td>
<td><%= school[:id] %></td>
<td class="edu-txt-left"><%= school[:name] %></td>
<td class="edu-txt-left"><%= link_to school[:name], statistics_college_path(id: school[:id]), target: '_blank', data: { tip_down: '点击查看学校统计概况'} %></td>
<td><%= school[:teacher_count].to_i %></td>
<td><%= school[:student_count].to_i %></td>
<td><%= school[:course_count].to_i %></td>

@ -11,31 +11,7 @@
TO
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "color-orange05 ml15"%>
</div>
<% if User.current.logged? %>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li>
<%= link_to l(:button_edit), edit_issue_path(activity.id), :class => 'postOptionLink', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
</li>
<li>
<% if !defined?(project_id) && !defined?(user_id) %>
<%= link_to l(:button_delete), issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
<% elsif defined?(project_id) %>
<%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
<% elsif defined?(user_id) %>
<%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
<% end %>
</li>
<li>
<%= link_to l(:button_copy), project_copy_issue_path(activity.project, activity), :class => 'postOptionLink' if User.current.allowed_to?(:add_issues, activity.project) %>
</li>
</ul>
</li>
</ul>
</div>
<% end %>
<div class="homepagePostTitle break_word">
<span class="fl">【<%= get_issue_type_new(activity.tracker_id) %>】</span>
@ -61,9 +37,6 @@
</div>
<div class="cl"></div>
</div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id => user_activity_id, :content => activity.description} %>
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div>
<%# 局部刷新修改xissue属性 %>
<% if User.current.member_of?(activity.project) && !activity.nil? && !activity.status.nil? %>
@ -74,15 +47,10 @@
<% end %>
<% end %>
<div class="cl"></div>
<div class="mb10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div>
</div>
<div class="cl"></div>
</div>
<div id="div_user_issue_reply_<%=user_activity_id%>">
<%= render :partial => 'projects/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
</div>
</div>
<script type="text/javascript">
$(function(){

@ -48,48 +48,10 @@
<div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div>
<% if User.current.logged? %>
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: block">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<% if activity.author.id == User.current.id%>
<li>
<%= link_to(
l(:button_edit),
edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
:class => 'postOptionLink'
) if activity.editable_by?(User.current) %>
</li>
<li>
<%= link_to(
l(:button_delete),
delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink'
) if activity.destroyable_by?(User.current) %>
</li>
<% end %>
<% if hidden_unproject_infos %>
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %></li>
<% else %>
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send_hidden(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %></li>
<% end %>
</ul>
</li>
</ul>
</div>
<% end %>
</div>
<div class="cl"></div>
</div>
<div class="bor-grey-e edu-back-white">
<div id="activity_post_reply_<%=user_activity_id %>">
<%=render :partial => 'projects/project_message_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){

@ -40,13 +40,7 @@
<!--缺陷动态-->
<% when "Issue" %>
<%= render :partial => 'projects/act_issues', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id, :project_id => activity.project_id} %>
<% when "TrainingTask" %>
<% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || is_project_manager?(User.current, @project.try(:forked_from_project_id)) %>
<div id="project_show_training_task_<%= @project.id %>">
<%= render :partial => 'projects/act_training_tasks', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id, :project_id => activity.project_id} %>
</div>
<% end %>
<!--message-->
<% when "Message" %>
<%= render :partial => 'projects/act_messages', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id, :is_course => 1, :is_board => 0} %>
<!--Attachment -->

@ -36,7 +36,7 @@
<a href="/users/<%= (student_work.user.try(:login)) %>" class="color-grey3"><%= student_work.user.show_real_name %></a>
</td>
<% group_id = @members.select{|m|m.user_id==student_work.user_id}.first.try(:course_group_id) %>
<% group_name = group_id.to_i == 0 ? '未分班' : @course.course_groups.find_by_id(group_id).name %>
<% group_name = group_id.to_i == 0 ? '未分班' : @course.course_groups.find_by_id(group_id).try(:name) %>
<td title="<%= group_name %>">
<span class="task-hide" style="display: block;max-width: 120px;"><%= group_name %></span>
</td>
@ -50,11 +50,11 @@
<%= student_work.group_id == 0 ? '--' : '分组'+student_work.group_id.to_s %>
</td>
<% if @homework.homework_detail_group.base_on_project == 1 %>
<td class="student_score_info pr">
<td class="student_score_info pr inlineblock">
<% if student_work.project %>
<% project = student_work.project %>
<% if project.status != 9 && (project.is_public || User.current.member_of?(project) || @is_teacher) %>
<%= link_to project.name, project_path(project.id), :class => 'color-grey3 task-hide', :style => "max-width:120px;", :title => "项目名称", :target => "_blank" %>
<%= link_to project.name, project_path(project.id), :class => 'color-grey3 task-hide inlineblock', :style => "max-width:120px;", :title => "项目名称", :target => "_blank" %>
<% elsif project.status != 9 %>
<span class="task-hide" style="display: block; max-width:120px;" title="该项目是私有的"><%= project.name %></span>
<% else %>

@ -3,8 +3,8 @@
<div class="task_popup_con">
<div class="clearfix mb10 bor-bottom-greyE pb10">
<p class="fl mt5">
<%= link_to @shixun.owner.try(:show_real_name), user_path(@shixun.owner), :class => "color-grey3 fl", :target => "_blank" %>
<span class="fl mr5 ml3">/</span>
<%#= link_to @shixun.owner.try(:show_real_name), user_path(@shixun.owner), :class => "color-grey3 fl", :target => "_blank" %>
<!-- <span class="fl mr5 ml3">/</span>-->
<%= link_to @shixun.name, shixun_path(@shixun), :class => "edu-info-dark fl task-hide",:style=>"max-width:300px", :target => "_blank" %>
</p>
<% if User.current.has_teacher_role(@homework.course) || User.current.admin? || @work.user == User.current %>

@ -4,9 +4,9 @@
<div class="educontent mt20 mb20">
<%= form_for @subject do |f| %>
<div class="mb10 edu-back-white">
<p class="padding10-20 bor-bottom-greyE font-18 color-grey-3"><%= params[:action] == 'new' ? "创建" : "编辑" %>实课程</p>
<p class="padding10-20 bor-bottom-greyE font-18 color-grey-3"><%= params[:action] == 'new' ? "创建" : "编辑" %>实课程</p>
<div class="padding30-20">
<p class="color-grey-6 font-16 mb15">实课程名称</p>
<p class="color-grey-6 font-16 mb15">实课程名称</p>
<div class="df">
<span class="mr30 color-orange pt10">*</span>
<div class="flex1 mr20">

@ -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>

@ -0,0 +1,35 @@
#coding=utf-8
namespace :competition_notice do
require 'simple_xlsx_reader'
task :send_message => :environment do
puts "--------------------------------competition_notice send_message start"
attachment = Attachment.where(id: 230670).first
if attachment.present?
path = attachment.disk_directory
name = attachment.disk_filename
if name.split(".").last == "xlsx"
doc = SimpleXlsxReader.open("files/#{path}/#{name}")
sheet = doc.sheets.first
lists = sheet.rows
lists.each_with_index do |list, index|
if index > 0
puts "--------------------------------user_name:#{list[0]}, user_phone:#{list[1]}"
user_name = list[0]
user_phone = list[1]
if user_name.present? && user_phone.present?
begin
status = Trustie::Sms.send(mobile: user_phone, send_type:'competition_notice' , name: user_name)
rescue => e
puts "--------------------------------发送验证码出错: #{user_name}---#{user_phone}"
end
end
end
end
else
puts "--------------------------------只支持xlsx文件"
end
end
end
end

@ -0,0 +1,44 @@
namespace :homework do
def tran_base64_decode64 str
if str.blank?
str
else
s_size = str.size % 4
if s_size != 0
str += "=" * (4 - s_size)
end
Base64.decode64(str.tr("-_", "+/")).force_encoding("utf-8")
end
end
task :gitfiledown => :environment do
# begin
puts ENV['args']
system("tmp/homework_file") if File.exist?("tmp/homework_file")
homework_common = HomeworkCommon.find(ENV['args'])
student_works = homework_common.student_works
g = Gitlab.client
student_works.each do |sw|
username = sw.user.try(:show_real_name)
myshixun = sw.try(:myshixun)
puts myshixun.try(:gpid)
if myshixun.try(:gpid)
content = g.files(myshixun.gpid, "PL/PL.cpp", "master").try(:content)
tran_content = tran_base64_decode64(content)
path = "tmp/homework_file/#{username}"
FileUtils.mkdir_p(path) unless File.exist?(path)
system("cd #{path}; touch PL.cpp")
aFile = File.new("#{path}/PL.cpp", "r+")
if aFile
aFile.syswrite(tran_content)
else
puts "Unable to open file!"
end
end
end
# rescue Exception => e
# Rails.logger.error(e.message)
# end
end
end

@ -31,6 +31,8 @@ module Trustie
params['text'] = ""
if send_type.nil?
params['text'] = "【Edu实训】" + code + "(手机验证码)。如非本人操作,请忽略。"
elsif send_type == "competition_notice"
params['text'] = "【Edu实训】亲爱的#{name}你参与的全国绿色计算大赛2019于7月1日开始请及时完善信息详戳→http://opengcc.org.cn/"
elsif send_type == "teacher_register"
params['text'] = "【Edu实训】亲爱的#{user_name},有新的老师#{name}注册啦,请尽快处理"
elsif send_type == 'competition_start'

@ -104,7 +104,7 @@ class ForumsIndex extends Component {
componentDidMount() {
window.document.title = '问答'
window.document.title = '交流问答'
}

@ -49,7 +49,7 @@ class PostItem extends Component {
{/*todo{memo.username}
memo.language && memo.language != 'other' && <span className="fl language-cir-orange mr10 mt3 ml6">{memo.language}</span>
*/}
<span className="fl ml50">{moment(memo.updated_at).fromNow()}</span>
{/*<span className="fl ml50">{moment(memo.updated_at).fromNow()}</span>*/}
{memo.tag && memo.tag.length ? <span className="fl ml50">来自 {memo.tag.join('/')}</span> : ''}
{/*<span className="fl language-cir-orange mr10 mt3">C++</span>*/}

@ -411,11 +411,11 @@ class CodeRepositoryView extends Component {
</Tooltip> }
{/* onClick={showFilesDrawer.bind(this, true)} target='_blank'*/}
{ myshixun_manager == true && <Tooltip title={ "下载代码"} disableFocusListener={true}>
{/* { myshixun_manager == true && <Tooltip title={ ""} disableFocusListener={true}>
<a href={zip_path || `/myshixuns/${myshixun.identifier}/archive`} className="iconButton" >
<i className="iconfont icon-xiazai1 font-18 "></i>
</a>
</Tooltip> }
</Tooltip> } */}
<span id="return_last_code">
</span>

@ -272,7 +272,7 @@ class NewHeader extends Component {
<ul id="header-nav">
{/*<li className={`${activeIndex === true ? 'active' : ''}`}><a href="/">首页</a></li>*/}
<li><a href="/paths">课程</a></li>
<li><a href="/paths">课程</a></li>
<li><a href="/courses">翻转课堂</a></li>
<li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}>
@ -294,10 +294,10 @@ class NewHeader extends Component {
</ul>
</div>
</li>
<li><a href="/libraries">教学案例</a></li>
<li><a href="/competitions">竞赛</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><a href="/libraries">教学案例</a></li> */}
<li><a href="/competitions">在线竞赛</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>
</ul>
<div className="posi-search" id="posi-search" style={{display: 'none'}}>
<div className="search-all clearfix">
@ -345,7 +345,7 @@ class NewHeader extends Component {
<li><a href={`/users/${current_user.login}`}>我的课堂</a></li>
{/* p 老师 l 学生 */}
<li><a href={`/users/${current_user.login}?type=${current_user.is_teacher ? 'p_shixun' : 'l_shixun'}`}>我的实训</a></li>
<li><a href={`/users/${current_user.login}?type=${current_user.is_teacher ? 'p_path' : 'l_path'}`}>我的实课程</a></li>
<li><a href={`/users/${current_user.login}?type=${current_user.is_teacher ? 'p_path' : 'l_path'}`}>我的实课程</a></li>
<li><a href={`/users/${current_user.login}?type=p_project`}>我的项目</a></li>
<li><a href="/my/account">账号管理</a></li>
<li className="bor-top-greyE"><a href="/logout">退出</a></li>
@ -378,7 +378,7 @@ class NewHeader extends Component {
<ul className="fl with50 edu-txt-center pr ul-leftline">
<li><a href="/courses/new">新建课堂</a></li>
<li><a href="/shixuns/new">新建实训</a></li>
<li><a href="/paths/new">新建实课程</a></li>
<li><a href="/paths/new">新建实课程</a></li>
<li><a href="/projects/new">新建项目</a></li>
</ul>
<ul className="fl with50 edu-txt-center">

@ -3424,3 +3424,6 @@ line-height: 16px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
.width698{
width: 698px;
}
.inlineblock{
display:inline-block;
}
Loading…
Cancel
Save