Merge branch 'dev_aliyun' into dev_tj

merge aliyun
chromesetting
tangjiang 5 years ago
commit 281aaee056

@ -22,7 +22,7 @@ class CommentsController < ApplicationController
@discuss = @hack.discusses.new(reply_params)
@discuss.hidden = false
@discuss.user_id = current_user.id
@discuss.root_id = params[:parent_id]
@discuss.root_id = params[:comments][:parent_id]
@discuss.save!
rescue Exception => e
uid_logger_error("reply discuss failed : #{e.message}")
@ -32,9 +32,14 @@ class CommentsController < ApplicationController
# 列表
def index
disscusses = @hack.disscusses.where(:root_id => nil)
@disscuss_count = disscusses.count
@disscusses= paginate disscusses
discusses =
if current_user.admin_or_business?
@hack.discusses.where(root_id: nil)
else
@hack.discusses.where(root_id: nil, hidden: false)
end
@discusses_count = discusses.count
@discusses= paginate discusses
end
# 删除
@ -43,10 +48,21 @@ class CommentsController < ApplicationController
render_ok
end
# 隐藏、取消隐藏
def hidden
if current_user.admin_or_business?
@discuss = @hack.discusses.where(id: params[:id]).first
@discuss.update_attribute(:hidden, params[:hidden] == "1")
sucess_status
else
Educoder::TipException(403, "..")
end
end
private
def find_hack
@hack = Hack.find_by_identifier params[:identifier]
@hack = Hack.find_by_identifier(params[:hack_identifier])
end
def comment_params

@ -117,13 +117,13 @@ class DiscussesController < ApplicationController
# 0 取消赞;
def plus
pt = PraiseTread.where(:praise_tread_object_id => params[:id], :praise_tread_object_type => params[:container_type],
:user_id => current_user, :praise_or_tread => 1).first
:user_id => current_user, :praise_or_tread => 1)
# 如果当前用户已赞过,则不能重复赞
if params[:type] == 1 && pt.blank?
PraiseTread.create!(:praise_tread_object_id => params[:id], :praise_tread_object_type => params[:container_type],
:user_id => current_user.id, :praise_or_tread => 1) if pt.blank?
:user_id => current_user.id, :praise_or_tread => 1)
else
pt.destroy if pt.present? # 如果已赞过,则删掉这条赞(取消);如果没赞过,则为非法请求不处理
pt.destroy_all if pt.present? # 如果已赞过,则删掉这条赞(取消);如果没赞过,则为非法请求不处理
end
@praise_count = PraiseTread.where(:praise_tread_object_id => params[:id], :praise_tread_object_type => params[:container_type],

@ -103,7 +103,7 @@ class GamesController < ApplicationController
begin
@tpm_modified = @myshixun.repository_is_modified(@shixun.repo_path) # 判断TPM和TPI的版本库是否被改了
rescue
uid_logger("实训平台繁忙繁忙等级81")
uid_logger("服务器出现问题,请重置刷新页面")
end
end

@ -98,12 +98,20 @@ class HacksController < ApplicationController
# 发布功能
def publish
@hack.update_attribute(:status, 1)
base_attrs = {
trigger_user_id: current_user.id, viewed: 0, tiding_type: 'System', user_id: @hack.user_id,
}
@hack.tidings.create!(base_attrs)
render_ok
end
# 取消发布
def cancel_publish
@hack.update_attribute(:status, 0)
base_attrs = {
trigger_user_id: current_user.id, viewed: 0, tiding_type: 'System', user_id: @hack.user_id
}
@hack.tidings.create!(base_attrs)
render_ok
end

@ -215,7 +215,8 @@ class ShixunsController < ApplicationController
if @shixun.shixun_info.present?
ShixunInfo.create!(shixun_id: @new_shixun.id,
description: @shixun.description,
evaluate_script: @shixun.evaluate_script)
evaluate_script: @shixun.evaluate_script,
shixun_reason: params[:reason].to_s.strip)
end
# 同步私密版本库
@ -781,7 +782,7 @@ class ShixunsController < ApplicationController
end
rescue => e
uid_logger_error(e.message)
tip_exception("#{e.message}")
tip_exception("服务器出现问题,请重置环境")
end
end

@ -214,7 +214,15 @@ class SubjectsController < ApplicationController
GitService.add_repository(repo_path: repo_path)
# todo: 为什么保存的时候要去除后面的.git呢??
@shixun.update_column(:repo_name, repo_path.split(".")[0])
mirror_id = MirrorRepository.find_by(type_name: 'Python3.6')&.id
mirror_id =
if @shixun.is_jupyter?
folder = EduSetting.get('shixun_folder')
path = "#{folder}/#{identifier}"
FileUtils.mkdir_p(path, :mode => 0777) unless File.directory?(path)
MirrorRepository.where("type_name like '%Jupyter%'").first&.id
else
MirrorRepository.find_by(type_name: 'Python3.6')&.id
end
if mirror_id
ShixunMirrorRepository.create!(:shixun_id => @shixun.id, :mirror_repository_id => mirror_id)
@shixun.shixun_service_configs.create!(:shixun_id => @shixun.id, :mirror_repository_id => mirror_id)

@ -64,7 +64,7 @@ module ApplicationHelper
shixun_id = shixun_id.blank? ? -1 : shixun_id.join(",")
Shixun.select([:id, :name, :user_id, :challenges_count, :myshixuns_count, :trainee, :identifier]).where("id
in(#{shixun_id})").unhidden.order("homepage_show asc, myshixuns_count desc").limit(3)
in(#{shixun_id})").unhidden.publiced.order("homepage_show asc, myshixuns_count desc").limit(3)
end

@ -10,7 +10,7 @@ class Discuss < ApplicationRecord
has_one :praise_tread_cache, as: :object, dependent: :destroy
belongs_to :dis, polymorphic: true
belongs_to :challenge
belongs_to :challenge, optional: true
after_create :send_tiding
scope :children, -> (discuss_id){ where(parent_id: discuss_id).includes(:user).reorder(created_at: :asc) }
@ -52,11 +52,19 @@ class Discuss < ApplicationRecord
private
def send_tiding
if dis_type == 'Shixun'
user_id = has_parent? ? parent.user_id : Challenge.find(challenge_id).user_id
parent_container_type = 'Challenge'
challenge_id = challenge_id
elsif dis_type == 'Hack'
user_id = has_parent? ? parent.user_id : Hack.find(dis_id).user_id
parent_container_type = 'Hack'
challenge_id = nil
end
base_attrs = {
trigger_user_id: user_id, parent_container_id: challenge_id, parent_container_type: 'Challenge',
belong_container_id: dis_id, belong_container_type: 'Shixun', viewed: 0, tiding_type: 'Comment'
trigger_user_id: user_id, parent_container_id: challenge_id, parent_container_type: parent_container_type,
belong_container_id: dis_id, belong_container_type: dis_type, viewed: 0, tiding_type: 'Comment'
}
user_id = has_parent? ? parent.user_id : Challenge.find(challenge_id).user_id
tidings.create!(base_attrs.merge(user_id: user_id))
end
end

@ -11,6 +11,11 @@ class Hack < ApplicationRecord
has_many :hack_codes, :dependent => :destroy
has_many :hack_user_lastest_codes, :dependent => :destroy
has_many :discusses, as: :dis, dependent: :destroy
# 点赞
has_many :praise_treads, as: :praise_tread_object, dependent: :destroy
# 消息
has_many :tidings, as: :container, dependent: :destroy
belongs_to :user
scope :published, -> { where(status: 1) }
@ -18,6 +23,8 @@ class Hack < ApplicationRecord
scope :opening, -> {where(open_or_not: 1)}
scope :mine, -> (author_id){ where(user_id: author_id) }
after_destroy :send_delete_tiding
def language
if hack_codes.count == 1
hack_codes.first.language
@ -46,4 +53,12 @@ class Hack < ApplicationRecord
user_id == user.id || user.admin_or_business?
end
private
def send_delete_tiding
base_attrs = {
user_id: user_id, viewed: 0, tiding_type: 'Delete', trigger_user_id: current_user.id, content: "你删除了题目:#{name}"
}
tidings.create!(base_attrs)
end
end

@ -12,7 +12,7 @@ class PraiseTread < ApplicationRecord
case self.praise_tread_object_type
when "Memo","Message","Issue"
self.tidings << Tiding.new(:trigger_user_id => self.user_id, :user_id => self.praise_tread_object.author_id, :parent_container_id => self.praise_tread_object_id, :parent_container_type => self.praise_tread_object_type, :viewed => 0, :tiding_type => "Praise")
when "Discuss","Challenge","HomeworkCommon","JournalsForMessage","Journal","GraduationTopic","GraduationTask"
when "Discuss","Challenge","HomeworkCommon","JournalsForMessage","Journal","GraduationTopic","GraduationTask", "Hack"
self.tidings << Tiding.new(:trigger_user_id => self.user_id, :user_id => self.praise_tread_object.user_id, :parent_container_id => self.praise_tread_object_id, :parent_container_type => self.praise_tread_object_type, :viewed => 0, :tiding_type => "Praise")
end
end

@ -103,6 +103,19 @@ class Shixun < ApplicationRecord
shixun_info.try(:evaluate_script)
end
def fork_reason
case shixun_info.try(:fork_reason)
when 'Shixun'
'实训内容升级'
when 'Course'
'课堂教学使用'
when 'Subject'
'实践课程使用'
else
shixun_info.try(:fork_reason)
end
end
def fork_identifier
self.fork_from.nil? ? "--" : fork_shixuns.first&.identifier
end

@ -33,6 +33,16 @@ class Admins::ShixunQuery < ApplicationQuery
all_shixuns = all_shixuns.where(status: status) if status.present?
all_shixuns = all_shixuns.where(public: public) if public.present?
if params[:fork_status].present?
all_shixuns = all_shixuns.where.not(fork_from: nil)
case params[:fork_status]
when 'Shixun', 'Course', 'Subject'
all_shixuns = all_shixuns.joins(:shixun_info).where(shixun_infos: {fork_reason: params[:fork_status]})
when 'Other'
all_shixuns = all_shixuns.joins(:shixun_info).where("fork_reason is null or fork_reason not in ('Shixun', 'Course', 'Subject')")
end
end
if params[:tag].present?
all_shixuns = all_shixuns.joins(:mirror_repositories).where("mirror_repositories.id = ?",params[:tag].to_i)
end

@ -49,12 +49,16 @@ class ShixunSearchService < ApplicationService
includes: [ :shixun_info, :challenges, :subjects, user: { user_extension: :school } ]
}
model_options.merge!(where: { id: @shixuns.pluck(:id) })
model_options.merge!(order: {"myshixuns_count" => sort_str})
model_options.merge!(order: {sort_str => order_str})
model_options.merge!(default_options)
model_options
end
def sort_str
def order_str
params[:order] || "desc"
end
def sort_str
params[:sort] || "myshixuns_count"
end
end

@ -65,13 +65,18 @@ class Users::ShixunService
end
def manage_shixun_status_filter(relations)
if params[:status] == "publiced"
relations = relations.where(public: 2)
elsif params[:status] == "applying"
relations = relations.where(public: 1)
else
status = case params[:status]
when 'editing' then 0
when 'applying' then 1
when 'published' then 2
when 'closed' then 3
end
relations = relations.where(status: status) if status
end
relations
end

@ -4,13 +4,15 @@
<div class="box search-form-container shixuns-list-form">
<%= form_tag(admins_shixuns_path, method: :get, class: 'form-inline search-form',id:"shixuns-search-form",remote:true) do %>
<div class="d-flex flex-column w-100">
<div class="d-flex position-r">
<div class="form-group">
<label for="status">状态:</label>
<% status_options = [['全部', ''], ["编辑中(#{@editing_shixuns})", "editing"], ["待审核(#{@pending_shixuns})", 'pending'], ["已发布(#{@processed_shixuns})", 'processed'],["已关闭(#{@closed_shixuns})",'closed']] %>
<%= select_tag(:status, options_for_select(status_options), class: 'form-control') %>
</div>
<div class="form-group">
<div class="form-group mr-2">
<label for="status">公开:</label>
<% public_options = [['全部', ''], ["未公开(#{@none_public_shixuns})", "editing"], ["待审核(#{@pending_public_shixuns})", 'pending'], ["已公开(#{@processed_pubic_shixuns})", 'processed']] %>
<%= select_tag(:public, options_for_select(public_options), class: 'form-control') %>
@ -21,16 +23,29 @@
<%= select_tag(:tag, options_for_select(@shixuns_type_check.unshift(["",nil])), class: 'form-control',id:"tag-choosed") %>
</div>
<div class="form-group">
<div class="form-group mr-2">
<label>搜索类型:</label>
<% auto_trial_options = [['创建者姓名', 0], ['实训名称', 1], ['学校名称', 2]] %>
<%= select_tag(:search_type, options_for_select(auto_trial_options), class: 'form-control') %>
</div>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2', placeholder: '输入关键字搜索') %>
<%= submit_tag('搜索', class: 'btn btn-primary','data-disable-with': '搜索中...') %>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '输入关键字搜索') %>
<div class="">
<a href="javascript:void(0)" class="btn btn-primary" id="shixuns-export" data-disable-with = '导出中...'>导出</a>
</div>
</div>
<div class="d-flex mt-3">
<div class="form-group">
<label for="status">fork原因</label>
<% fork_status_options = [['全部', ''], ["全部fork实训", "Fork"], ["实训内容升级", 'Shixun'], ["课堂教学使用", 'Course'],["实践课程使用",'Subject'],["其他原因",'Other']] %>
<%= select_tag(:fork_status, options_for_select(fork_status_options), class: 'form-control') %>
</div>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3','data-disable-with': '搜索中...') %>
<%= link_to "清除", admins_shixuns_path,class: "btn btn-default",id:"shixuns-clear-search",'data-disable-with': '清除中...' %>
</div>
</div>
<% end %>
<a href="javascript:void(0)" class="btn btn-primary" id="shixuns-export" data-disable-with = '导出中...'>导出</a>
</div>
<div class="box admin-list-container shixuns-list-container">

@ -2,17 +2,18 @@
<thead class="thead-light">
<th width="4%">序号</th>
<th width="8%">ID</th>
<th width="24%" class="text-left">实训名称</th>
<th width="22%" class="text-left">实训名称</th>
<th width="8%">技术平台</th>
<th width="5%">Fork源</th>
<th width="10%">Fork原因</th>
<th width="5%">实践</th>
<th width="5%">选择</th>
<th width="4%">选择</th>
<th width="6%">状态</th>
<th width="6%">公开</th>
<th width="7%">创建者</th>
<th width="11%"><%= sort_tag('创建于', name: 'created_at', path: admins_shixuns_path) %></th>
<th width="5%">单测</th>
<th width="6%">操作</th>
<th width="6%">创建者</th>
<th width="8%"><%= sort_tag('创建于', name: 'created_at', path: admins_shixuns_path) %></th>
<th width="4%">单测</th>
<th width="4%">操作</th>
</thead>
<tbody>
<% if shixuns.present? %>
@ -31,6 +32,7 @@
<%= link_to shixun.try(:identifier), shixun_path(shixun.try(:identifier)), target: '_blank'%>
<% end%>
</td>
<td><%= overflow_hidden_span(shixun&.fork_reason) %></td>
<td><%= shixun.challenges.where(:st => 0).size %></td>
<td><%= shixun.challenges.where(:st => 1).size %></td>
<td class="shixuns-status-<%= shixun.status %>"><%= shixun_authentication_status shixun %></td>

@ -1,7 +1,11 @@
json.author do
json.partial! 'users/user', user: discuss.user
end
json.id discuss.id
json.content content_safe(discuss.content)
json.time time_from_now(discuss.created_at)
json.hack_id discuss.dis_id
json.hidden discuss.hidden
# 主贴和回复有一些不同点
if discuss.parent_id
json.can_delete discuss.can_deleted?(current_user)

@ -1,4 +1,4 @@
json.disscuss_count @disscuss_count
json.disscuss_count @discusses_count
json.comments @discusses do |discuss|
json.partial! 'comments/discuss', locals: { discuss: discuss}
json.children discuss.child_discuss(current_user) do |c_d|

@ -0,0 +1 @@
json.praise_count @praise_count

@ -1,11 +1,13 @@
json.hack do
json.(@hack, :name, :difficult, :time_limit, :description, :score, :identifier, :status)
json.(@hack, :id, :name, :difficult, :time_limit, :description, :score, :identifier, :status, :praises_count)
json.language @hack.language
json.username @hack.user.real_name
json.code @my_hack.code
json.pass_count @hack.pass_num
json.submit_count @hack.submit_num
json.modify_code @modify
json.comments_count @hack.discusses.count
json.user_praise @hack.praise_treads.select{|pt| pt.user_id == current_user.id}.length > 0
end
json.test_case do
@ -15,5 +17,6 @@ end
json.user do
json.partial! 'users/user', user: current_user
json.hack_manager @hack.manager?(current_user)
json.admin current_user.admin_or_business?
end

@ -69,8 +69,13 @@ Rails.application.routes.draw do
delete :delete_set
end
resources :comments do
collection do
post :reply
end
member do
post :hidden
end
end
end
resources :hack_user_lastest_codes, path: :myproblems, param: :identifier do

@ -0,0 +1,5 @@
class AddForkReasonToShixunInfo < ActiveRecord::Migration[5.2]
def change
add_column :shixun_infos, :fork_reason, :string
end
end

@ -0,0 +1,8 @@
class ModifyTaskPassForChallenges < ActiveRecord::Migration[5.2]
def change
Challenge.find_each do |challenge|
task_pass = challenge.task_pass.gsub(" ", "").gsub("rac", '\frac')
challenge.update_attribute(:task_pass, task_pass)
end
end
end

@ -0,0 +1,6 @@
class AddPraisesCountForHacks < ActiveRecord::Migration[5.2]
def change
add_column :hacks, :praises_count, :integer, :default => 0
add_column :hacks, :comments_count, :integer, :default => 0
end
end

@ -14,19 +14,19 @@ namespace :excellent_course_exercise do
course = Course.find_by(id: course_id)
course.exercises.each_with_index do |exercise, index|
# if exercise.exercise_users.where(commit_status: 1).count == 0
if exercise.exercise_users.where(commit_status: 1).count == 0
# 第一个试卷的参与人数和通过人数都是传的数据,后续的随机
if index == 0
members = course.students.order("id asc").limit(participant_count)
update_exercise_user(exercise, members, pass_count)
else
new_participant_count = rand((participant_count - 423)..participant_count)
new_pass_count = rand((new_participant_count - 113)..new_participant_count)
new_participant_count = rand((participant_count - 20)..participant_count)
new_pass_count = rand((new_participant_count - 30)..new_participant_count)
members = course.students.order("id asc").limit(new_participant_count)
update_exercise_user(exercise, members, new_pass_count)
end
# end
end
end
end
@ -36,14 +36,15 @@ namespace :excellent_course_exercise do
# index < pass_count 之前的学生都是通关的,之后的未通过
members.each_with_index do |member, index|
exercise_user = exercise.exercise_users.where(user_id: member.user_id).take
if exercise_question_ids.length == 20
question_length = exercise_question_ids.length
if question_length == 20
rand_num = index < pass_count - 1 ? rand(15..20) : rand(1..10)
elsif exercise_question_ids.length == 17
elsif question_length == 17
rand_num = index < pass_count - 1 ? rand(12..17) : rand(1..9)
elsif exercise_question_ids.length == 39
elsif question_length == 39
rand_num = index < pass_count - 1 ? rand(30..39) : rand(1..18)
else
rand_num = exercise_question_ids.length
rand_num = index < pass_count - 1 ? rand((question_length-3)..question_length) : rand(1..(question_length-8))
end
if exercise_user && exercise_user.commit_status == 0

@ -0,0 +1,32 @@
# 执行示例 RAILS_ENV=production bundle exec rake migrate_course_student:student args=3835,2526,21950,1000
# args 第一个课程 course_id第二个参数是学校school_id第三个参数是部门id第四个参数是迁移数量
#
desc "同步学校的学生"
namespace :migrate_course_student do
if ENV['args']
course_id = ENV['args'].split(",")[0] # 对应课堂的id
school_id = ENV['args'].split(",")[1] # 对应学校id
department_id = ENV['args'].split(",")[2] # 对应部门id
limit = ENV['args'].split(",")[3] # 限制导入的数量
end
task :student => :environment do
course = Course.find course_id
users = User.joins(:user_extension).where(user_extensions: {school_id: school_id, department_id: department_id, identity: 1}).limit(limit)
user_ids = []
users.each do |user|
if user.student_id.present? && !course.students.exists?(user_id: user.id)
begin
CourseMember.create!(course_id: course_id, user_id: user.id, role: 4)
user_ids << user.id
rescue Exception => e
Rails.logger(e.message)
end
end
end
CourseAddStudentCreateWorksJob.perform_later(course_id, user_ids)
end
end

@ -360,7 +360,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin-
.subshaicontent a{float: left;margin-right: 20px;color: #999;cursor: pointer}
.search-new{width: 248px;height:32px;position: relative;margin-right: 35px;}
.search-new{width: 248px;height:32px;position: relative;}
.search-span{display: block;position: absolute;width: 100%;height: 100%;left:0px;top:0px;background-color: #F4F4F4;border: 1px solid #EAEAEA; border-radius: 4px;z-index: 1}
.search-new-input{height: 32px;padding-left: 5px;width: 225px;border: none;box-sizing: border-box;background: none;outline: none;position: absolute;left:0px;top:1px;z-index: 2}
.search-new img,.search-new a,.search-new .searchicon{cursor: pointer;position: absolute;right:2px;top:2px;z-index: 2}

@ -336,7 +336,7 @@ class CommonWorkDetailIndex extends Component{
}
`}</style>
{this.props.isAdmin()? <Spin spinning={this.state.donwloading} style={{ }}>
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
<li className="li_line drop_down fr color-blue font-16 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li>

@ -788,7 +788,7 @@ class CommonWorkList extends Component{
{/* value={search} */}
<div className="fr mr5 search-new mr8" style={{marginBottom:'1px'}}>
<div className="fr search-new mr8" style={{marginBottom:'1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"

@ -147,7 +147,7 @@ class TabRightComponents extends Component{
padding-bottom: 8px;
}
`}</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={exportResultUrl} onClick={(url)=>this.confirmysl(exportResultUrl)} className="color-dark">导出成绩</a></li>

@ -102,11 +102,26 @@ class CoursesHome extends Component{
})
}
getUser=(url,type)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
if(url !== undefined || url!==""){
this.props.history.push(url);
}
}
render() {
let { order,search,page,coursesHomelist }=this.state;
//console.log(this.props)
return (
<div>
{this.state.updata===undefined?"":<UpgradeModals
@ -144,6 +159,7 @@ class CoursesHome extends Component{
onClick={ () => this.changeStatus("created_at")}>最新</a>
<a className={ order == "visits" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("visits")}>最热</a>
{this.props.user&&this.props.user.user_identity==="学生"?"":<span className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/courses/new")}>+新建翻转课堂</span>}
{/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/}

@ -25,8 +25,15 @@ class NewShixunModel extends Component{
}
componentDidMount() {
let{page,type,keyword,order,diff,limit,status,sort}=this.state;
let newsort=sort
if(this.props&&this.props.user.course_name===undefined){
newsort="created_at";
}else{
newsort="publish_time";
}
if(this.props.type==='shixuns'){
this.getdatalist(page,type,status,keyword,order,diff,limit)
this.getdatalist(page,type,status,keyword,order,diff,limit,undefined,newsort);
}else{
this.getdatalist(page,type,undefined,keyword,order,undefined,limit,undefined,sort);
}
@ -34,6 +41,7 @@ class NewShixunModel extends Component{
}
getdatalist=(page,type,newstatus,keyword,order,diff,limit,pagetype,sort)=>{
this.setState({
isspinning:true
})
@ -368,6 +376,7 @@ class NewShixunModel extends Component{
// let {visible,patheditarry}=this.props;
// console.log(Grouplist)
// console.log(allGrouplist)
const statusmenus=(
<Menu className="menus">
<Menu.Item>
@ -425,7 +434,6 @@ class NewShixunModel extends Component{
);
console.log(shixun_list)
return(
<div>

@ -1338,7 +1338,7 @@ samp {
width:237px!important;
height: 30px;
margin-bottom: 30px;
margin-right: 35px;
/*margin-right: 35px;*/
}
.search-new-input {
padding-left: 16px;

@ -178,16 +178,9 @@ class Exercisesetting extends Component{
}
if(result.data.exercise.unified_setting == true && moment(result.data.exercise.end_time) <= moment()){
// if(this.props.isSuperAdmin()===true){
// this.setState({
// end_timetype:false
// })
// }else{
this.setState({
end_timetype:true
})
// }
}
let group=result.data.published_course_groups;
@ -236,10 +229,10 @@ class Exercisesetting extends Component{
//提交form表单
handleSubmit = (e) => {
e.preventDefault();
if(this.props&&this.props.Commonheadofthetestpaper.exercise_status){
console.log("190");
console.log(this.props.Commonheadofthetestpaper.exercise_status);
}
// if(this.props&&this.props.Commonheadofthetestpaper.exercise_status){
// console.log("190");
// console.log(this.props.Commonheadofthetestpaper.exercise_status);
// }
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
@ -327,7 +320,7 @@ class Exercisesetting extends Component{
}
}
if(this.state.end_timetype === false){
if(this.state.end_timetype === false||this.props.isAdmin()==true){
if(moment(end_time,dataformat) <= moment(publish_time,dataformat)){
this.setState({
unit_e_tip:"截止时间不能小于发布时间"
@ -525,7 +518,7 @@ class Exercisesetting extends Component{
end_time:null
})
}else{
if(moment(date,"YYYY-MM-DD HH:mm") <= moment()){
if(dateString<=moment().format('YYYY-MM-DD HH:mm')){
this.setState({
unit_e_tip:"截止时间不能早于当前时间",
e_flag:true
@ -608,9 +601,9 @@ class Exercisesetting extends Component{
};
// console.log(flagPageEdit===true?polls&&polls.exercise_status===1?3:2:1)
console.log("asdasdasda");
console.log(this.props);
console.log(this.props.Commonheadofthetestpaper);
// console.log("asdasdasda");
// console.log(this.props);
// console.log(this.props.Commonheadofthetestpaper);
return(
<div>
<Modals
@ -681,6 +674,7 @@ class Exercisesetting extends Component{
<div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl">
<Tooltip placement="bottom" title={end_timetype===true ? this.props.isAdmin()?"":"截止时间已过,不能再修改":""}>
<DatePicker
dropdownClassName="hideDisable"
placeholder="请选择截止时间"
@ -694,9 +688,10 @@ class Exercisesetting extends Component{
disabledDate={disabledDate}
onChange={this.onChangeTimeEnd}
value={end_time && moment(end_time,"YYYY-MM-DD HH:mm")}
disabled={ end_timetype===true?true:!flagPageEdit}
disabled={ end_timetype===true?this.props.isAdmin()?!flagPageEdit:true:!flagPageEdit}
>
</DatePicker>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:""

@ -2882,7 +2882,7 @@ class Studentshavecompletedthelist extends Component {
})
}
</CheckboxGroup>
<div className="fr mr5 search-new" style={{marginBottom: '1px'}}>
<div className="fr search-new" style={{marginBottom: '1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
@ -2914,7 +2914,7 @@ class Studentshavecompletedthelist extends Component {
})
}
</CheckboxGroup>
<div className="fr mr5 search-new" style={{marginBottom: '1px'}}>
<div className="fr search-new" style={{marginBottom: '1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"

@ -1158,7 +1158,7 @@ class GraduationTaskssettinglist extends Component{
)
})}
</CheckboxGroup>
<div className="fr mr5 search-new" style={{marginBottom:'1px',marginRight:"0px"}}>
<div className="fr search-new" style={{marginBottom:'1px',marginRight:"0px"}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
@ -1350,7 +1350,7 @@ class GraduationTaskssettinglist extends Component{
})}
</CheckboxGroup>
<div className="fr mr5 search-new" style={{marginBottom:'1px'}}>
<div className="fr search-new" style={{marginBottom:'1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"

@ -666,7 +666,7 @@ class GraduationTasks extends Component{
<React.Fragment>
{/*{this.props.isAdmin() ?<WordsBtn style="blue" className="mr30" onClick={() => this.addDir()}>题库选用</WordsBtn>:""}*/}
{/*{this.props.isAdmin() ?<a href={"/api/graduation_tasks/"+category_id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a> :""}*/}
{this.props.isAdmin() ? <WordsBtn style="blue" className="mr10 fr font-16">
{this.props.isAdmin() ? <WordsBtn style="blue" className=" fr font-16">
<Link to={"/courses/" + coursesId + "/graduation_tasks/"+category_id+"/new"}>
<span className={"color-blue font-16"}>新建</span>
</Link>

@ -33,6 +33,11 @@ function disabledDateTime() {
// disabledSeconds: () => [55, 56],
};
}
function disabledDate(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
const dataformat="YYYY-MM-DD HH:mm";
class PollDetailTabForth extends Component{
@ -597,6 +602,7 @@ class PollDetailTabForth extends Component{
width={"240px"}
format="YYYY-MM-DD HH:mm"
disabledTime={disabledDateTime}
disabledDate={disabledDate}
onChange={this.onChangeTimeEnd}
value={ end_time && moment(end_time,dataformat) }
disabled={un_change_end == true ?true : !flagPageEdit }
@ -619,6 +625,7 @@ class PollDetailTabForth extends Component{
{...this.state}
ref="pollDetailTabForthRules"
rules={rules}
type={"polls"}
course_group={course_group}
flagPageEdit={flagPageEdit}
rulesCheckInfo={(info)=>this.rulesCheckInfo(info)}

@ -447,7 +447,7 @@ class PollDetailTabForthRules extends Component{
</p>
</div>
<div className="fl mr20 yskspickersy">
<Tooltip placement="bottom" title={rule.e_timeflag ? this.props.isAdmin()?"截止时间已过,不能再修改":"":""}>
<Tooltip placement="bottom" title={rule.e_timeflag ? this.props.isAdmin()?"":"截止时间已过,不能再修改":""}>
<span>
<DatePicker
showToday={false}
@ -461,7 +461,11 @@ class PollDetailTabForthRules extends Component{
format="YYYY-MM-DD HH:mm"
disabledTime={disabledDateTime}
disabledDate={disabledDate}
disabled={rule.e_timeflag === undefined ? rule.publish_time === null ? false : moment(rule.end_time, dataformat) <= moment() ? true : !flagPageEdit : rule.e_timeflag == true ? true : !flagPageEdit}
disabled={
this.props.type==="Exercise"?
rule.e_timeflag === undefined ? rule.publish_time === null ? false : moment(rule.end_time, dataformat) <= moment() ?this.props.isAdmin()?!flagPageEdit: true : !flagPageEdit : rule.e_timeflag == true ? this.props.isAdmin()?!flagPageEdit :true : !flagPageEdit:
rule.e_timeflag === undefined ? rule.publish_time === null ? false : moment(rule.end_time, dataformat) <= moment() ? true : !flagPageEdit : rule.e_timeflag == true ? true : !flagPageEdit
}
style={{"height":"42px"}}
></DatePicker>
</span>

@ -1748,10 +1748,11 @@ class Listofworksstudentone extends Component {
} catch (e) {
}
// console.log("table1handleChange");
// console.log(sorter.columnKey);
try {
//学生成绩排序
if (sorter.columnKey === "finalscore") {
if (sorter.columnKey === "work_score") {
if (sorter.order === "ascend") {
//升序
this.setState({
@ -3678,7 +3679,7 @@ class Listofworksstudentone extends Component {
</li>
<li className="clearfix mt10">
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<div className="fr search-newysl" style={{marginBottom: '1px'}}>
{/*{course_is_end===true?"":<span>*/}
{/*{teacherdata&&teacherdata.update_score===true&&computeTimetype===true?*/}
{/* (this.props.isNotMember()===false?<div className={"computeTime font-16"} onClick={this.setComputeTimet}>*/}

@ -291,7 +291,7 @@ class ShixunHomeworkPage extends Component {
`}</style>
{this.props.isAdmin() ?
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
<li className="li_line drop_down fr color-blue font-16 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
{/*<li><a*/}

@ -898,7 +898,7 @@ class ShixunStudentWork extends Component {
</span>:"":""}
{/*请输入姓名或学号搜索*/}
<div className="fr mr5 search-new" style={{marginBottom: '1px'}}>
<div className="fr search-new" style={{marginBottom: '1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"

@ -49,7 +49,7 @@ let _url_origin = getUrl()
const $ = window.$
$('head').append( $('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-admin.css?1525440977`) );
.attr('href', `${_url_origin}/stylesheets/css/edu-admin.css?6`) );
$('head').append( $('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-forum.css?1525440977`) );
$('head').append( $('<link rel="stylesheet" type="text/css" />')

@ -1,11 +1,12 @@
.float_button {
background-image: url(./images/float_switch.jpg);
height: 112px;
background-image: url(images/float_switch.jpg);
height: 141px;
width: 38px;
position: absolute;
left: -38px;
top: 32%;
cursor: pointer;
padding-top: 15px;
}
.float_button .text {
position: relative;
@ -17,8 +18,8 @@
}
.jupyter_float_button {
background-image: url(./images/float_switch.jpg);
height: 112px;
background-image: url(images/float_switch.jpg);
height: 141px;
width: 38px;
position: absolute;
right: 0px;
@ -26,6 +27,7 @@
cursor: pointer;
left:auto;
z-index: 99999999;
padding-top: 15px;
}
.jupyter_float_button .text {
@ -37,6 +39,16 @@
user-select: none;
}
@keyframes mymove
{
from {right:0px;}
to {right:330px;}
}
.newjupyter_float_button{
right: 330px;
/*right: 330px;*/
/*animation-duration:2s;*/
/*infinite*/
animation:mymove 0.35s;
animation-fill-mode:forwards;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -574,6 +574,7 @@ class DetailCards extends Component{
</div>
}
<DetailCardsEditAndEdit
{...this.props}
idsum={idsum}
keys={key}
pathCardsedittype={pathCardsedittype}

@ -77,10 +77,6 @@ class DetailTop extends Component{
}
}
})
console.log(courseslist)
}
if(courseslist.length!=0){
this.props.getMenuItemsindex(keys,courseslist[0].course_status.status)

@ -124,10 +124,39 @@ class ShixunPathSearch extends Component{
this.props.history.push(url)
}
//头部获取是否已经登录了
getUser=(url,type)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
if(url !== undefined || url!==""){
this.props.history.push(url);
}
}
render() {
let { order,sortList,search,page,total_count,select }=this.state;
let pathstype=false;
if(this.props&&this.props.mygetHelmetapi!=null){
let paths="/paths";
this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link);
if(paths.match(reg)){
if(item.hidden===true){
pathstype=true
}
}
// console.log()
})
}
// console.log(this.props)
return (
<div>
{this.state.updata===undefined?"":<UpgradeModals
@ -169,6 +198,10 @@ class ShixunPathSearch extends Component{
{/*<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<span className={ order == "updated_at" ? "active" : ""} onClick={ () => this.changeStatus("updated_at")}>最新</span>
<span className={ order == "myshixun_count" ? "active" : ""} onClick={ () => this.changeStatus("myshixun_count")}>最热</span>
{this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":<a className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/paths/new")}>+新建实践课程</a>}
{this.props.user&&this.props.user.main_site===true?"":this.props.Headertop===undefined?"":
pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?<a className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/paths/new")}>+新建实践课程</a>:""
}
{/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/}
{/*placeholder="请输入路径名称进行搜索"*/}

@ -1214,7 +1214,7 @@ submittojoinclass=(value)=>{
</li>
{
this.props.Headertop && this.props.Headertop.college_identifier &&
<li><a href={`${this.props.Headertop.old_url}/colleges/${this.props.Headertop.college_identifier}/statistics`}>学院统计</a></li>
<li><a href={`/colleges/${this.props.Headertop.college_identifier}/statistics`}>学院统计</a></li>
}
{
this.props.Headertop && this.props.Headertop.laboratory_user &&

@ -15,6 +15,7 @@ import axios from 'axios'
import Modals from '../modals/Modals';
import './shixuns/css/TPMBanner.css';
import types from "../../redux/actions/actionTypes";
let $ = window.$;
@ -22,6 +23,8 @@ const Search = Input.Search;
const RadioGroup = Radio.Group;
const { TextArea } = Input;
class TPMBanner extends Component {
constructor(props) {
super(props)
@ -54,7 +57,9 @@ class TPMBanner extends Component {
Senttothevcaluetype: false,
jupyterbool: false,
openknow:false,
openshowpublictype:false
openshowpublictype:false,
Radiovalue:1,
TextAreaintshow:false
}
}
@ -197,13 +202,46 @@ class TPMBanner extends Component {
})
}
changeTextArea=(e)=>{
this.setState({
TextArea:e.target.value
})
}
addForkvisible = () => {
let reason;
switch (this.state.Radiovalue) {
case 1:
reason="Shixun";
break;
case 2:
reason="Course";
break;
case 3:
reason="Subject";
break;
case 4:
reason=this.state.TextArea;
}
if(this.state.Radiovalue===4){
if(this.state.TextArea===null||this.state.TextArea===undefined||this.state.TextArea=== ""){
this.setState({
TextAreaintshow:true
})
return
}
}
this.setState({
Forkvisibletype:true,
})
let id = this.props.match.params.shixunId;
let url = "/shixuns/" + id + "/copy.json";
axios.post(url).then((response) => {
axios.post(url, {
reason:reason,
}).then((response) => {
if (response.data.status === 401) {
} else {
@ -694,17 +732,9 @@ class TPMBanner extends Component {
}
showonMouseOver = () => {
$("#ratePanel").show();
this.setState({
showradios: true
})
}
hideonMouseOut = () => {
$("#ratePanel").hide();
onChangeRadiovalue=(e)=>{
this.setState({
showradios: false
Radiovalue:e.target.value
})
}
@ -1128,7 +1158,7 @@ class TPMBanner extends Component {
}
{
<a onClick={this.Senttothe}
this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter===true?"":<a onClick={this.Senttothe}
className="fr kaike kkbths mr20 font-18"
data-tip-down=""
style={{display: shixunsDetails.shixun_status === 0 || shixunsDetails.shixun_status === 3 || shixunsDetails.shixun_status === 1 || shixunsDetails.shixun_status === -1 ? "none" : "block"}}
@ -1233,9 +1263,34 @@ class TPMBanner extends Component {
</span>
</Tooltip>
{Forkvisible===true?<style>
{
`
.ant-modal-body{
padding: 10px;
}
`
}
</style>:""}
{
this.state.TextAreaintshow===true?<style>
{
`
.ant-input:hover {
border: 1px solid red !important;
}
.ant-input:focus {
border: 1px solid red !important;
}
`
}
</style>:""
}
<Modal
keyboard={false}
title="提示"
title="Fork原因"
visible={Forkvisible}
closable={false}
footer={null}
@ -1247,8 +1302,25 @@ class TPMBanner extends Component {
>
</Spin> :
<div>
<div className="task-popup-content"><p
className="task-popup-text-center font-16 pb20">复制将在后台执行平台将为你创建<br/>一个新的同名实训和内容请问是否继续</p>
<div className="task-popup-content">
<div className={"forkfactors"}>请根据实际情况填写fork本实训的原因</div>
<Radio.Group onChange={this.onChangeRadiovalue} value={this.state.Radiovalue} className={"ml20 mt20 mb20"} style={{ width: "100%" }}>
<Radio style={radioStyle} value={1}>
实训内容升级
</Radio>
<Radio style={radioStyle} value={2}>
课堂教学使用
</Radio>
<Radio style={radioStyle} value={3}>
实践课程使用
</Radio>
<Radio style={radioStyle} value={4}>
其它原因
</Radio>
{this.state.Radiovalue === 4 ?
<TextArea className={this.state.TextAreaintshow===true?"bor-red mt10":"mt10"} rows={4} style={{ width: '85%', marginLeft: '30px' }} onInput={this.changeTextArea}/>: null}
{this.state.TextAreaintshow===true?<div className={"color-red ml30"}>不能为空</div>:""}
</Radio.Group>
</div>
<div className="task-popup-submit clearfix">
<a onClick={this.hideForkvisible} className="task-btn fl">取消</a>

@ -1,6 +1,6 @@
import React, {Component} from 'react';
import {Redirect} from 'react-router';
import {List, Typography, Tag, Modal, Radio, Checkbox, Table, Pagination,Upload,notification} from 'antd';
import {List, Typography, Tag, Modal, Radio, Checkbox, Table, Pagination,Upload,Button} from 'antd';
import { NoneData } from 'educoder'
import TPMRightSection from './component/TPMRightSection';
@ -85,6 +85,7 @@ class TPMDataset extends Component {
checked: false,
showmodel:false,
itemtypebool:false,
Buttonloading:false
}
}
@ -296,7 +297,16 @@ class TPMDataset extends Component {
// console.log("handleChange123123");
// console.log(info);
//debugger
this.setState({
Buttonloading:true
})
if(!info.file.status){
this.setState({
Buttonloading:false
})
}
if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){
let fileList = info.fileList;
this.setState({
fileList: appendFileSizeToUploadFileAll(fileList),
@ -306,12 +316,21 @@ class TPMDataset extends Component {
//done 成功就会调用这个方法
if(info.file.response){
if(info.file.response.status===-1||info.file.response.status==="-1"){
this.setState({
Buttonloading:false
})
}else{
this.getdatas();
this.setState({
Buttonloading:false
})
// this.props.showNotification(`上传成功`);
}
}
}else{
// this.setState({
// Buttonloading:false
// })
}
if(info.file.response){
@ -329,9 +348,13 @@ class TPMDataset extends Component {
showmodel:true,
tittest:info.file.response.message,
itemtypebool:itemtype>-1?true:itemtype<=-1?false:false,
Buttonloading:false
})
}else{
}else{
this.setState({
Buttonloading:false
})
}
}
@ -445,7 +468,12 @@ class TPMDataset extends Component {
showmodel: false,
})
}
ButtonloadinghandleChange=()=>{
// this.props.showNotification(`zhzzzzz`);
// this.setState({
// Buttonloading:false
// })
}
render() {
const {tpmLoading, shixun, user, match} = this.props;
const {columns, page, limit, selectedRowKeys,mylistansum,fileList,datalist,data_sets_count,loadingstate} = this.state;
@ -472,12 +500,14 @@ class TPMDataset extends Component {
onRemove: this.onAttachmentRemove,
beforeUpload: (file) => {
//上传前的操作
// console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 150;
if (!isLt150M) {
this.props.showNotification('文件大小必须小于150MB!');
console.log('beforeUpload', file);
// this.props.showNotification(`文件上传中`);
const isLt400M = file.size / 1024 / 1024 <= 400;
if (!isLt400M) {
this.props.showNotification('文件大小必须小于等于400MB!');
}
return isLt150M;
return isLt400M;
},
};
// console.log("showmodelshowmodel");
@ -514,12 +544,20 @@ class TPMDataset extends Component {
.ant-upload-list{
display:none
}
.deletebuttom{
color: #fff !important;
}
.deletebuttom:hover{
color: #fff !important;
background: #29BD8B !important;
}
`
}
</style>
<div className="deletebuttom intermediatecenter "> <Upload {...uploadProps}><p className="deletebuttomtest" type="upload">
上传文件</p> </Upload></div>
<div className="intermediatecenter deletebuttom">
<Upload {...uploadProps}>
<Button className={"deletebuttom"} loading={this.state.Buttonloading}>{this.state.Buttonloading===true?"上传中":"上传文件"}</Button>
</Upload></div>
{
data_sets_count>0?
<div

@ -412,7 +412,7 @@ class TPMIndex extends Component {
<span className={"tpmbannernavstyler"}>合作者</span>
</Menu.Item>
{ this.state.is_jupyter===true?<Menu.Item key="6" className={"competitionmr50"}>
{ this.state.identity >4||this.state.identity===undefined ? "":this.state.is_jupyter===true?<Menu.Item key="6" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>数据集</span>
</Menu.Item>:""}

@ -35,14 +35,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?1`));
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?6`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1`));
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?6`));
// index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1`));
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?6`));
// $('head').append($('<link rel="stylesheet" type="text/css" />')

@ -114,7 +114,7 @@
.ant-drawer-content-wrapper{
width:330px !important;
box-shadow: -2px 0 8px #070F1A !important;
//box-shadow: -2px 0 8px #070F1A !important;
}
.ant-drawer-body{
padding: 0px;
@ -187,7 +187,7 @@ line-height: 50px !important;
}
.ant-statistic-content-value{
color:#fff !important;
font-size: 17px !important;
font-size: 14px !important;
}
}

@ -140,11 +140,13 @@
.shixunstartbutton33BD8C{
background: #33BD8C !important;
border: #33BD8C !important;
cursor: inherit !important;
}
.shixunstartbuttonFF6601{
background: #FF6601 !important;
border: #FF6601 !important;
cursor: inherit !important;
}
.shixunstartbutton666666{

@ -160,3 +160,9 @@ a:active{text-decoration:none;}
.mlbanner36{
margin-left: 36px;
}
.forkfactors{
text-align: center;
color: #999999;
}

@ -80,7 +80,7 @@
.deletebuttom{
width:85px;
height:30px;
background:#29BD8B;
background:#29BD8B !important;
border-radius:3px;
cursor:pointer
}

@ -214,12 +214,12 @@ class InfosShixun extends Component{
</style>
<div className="white-panel edu-back-white pt20 pb20 clearfix ">
<li className={category ? " font-16 whitepanelyslli" : "active font-16 whitepanelyslli"}><a
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
onClick={() => this.changeCategory("manage")}
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")}
onClick={() => this.changeCategory("study")}
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div>
<style>
@ -242,29 +242,30 @@ class InfosShixun extends Component{
{
category && category == "manage" && is_current &&
<div className="edu-back-white padding10-30 clearfix secondNavs bor-top-greyE">
<li className={status ? "whitepanelyslliss" : "active whitepanelyslliss"}><a href="javascript:void(0)"
onClick={() => this.changeStatus()}
className="w32">全部</a></li>
<li className={status ? "whitepanelyslliss" : "active whitepanelyslliss"}>
<a onClick={() => this.changeStatus()} className="w32">全部</a></li>
<li className={status == "editing" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("editing")} className="w60">编辑中</a></li>
<li className={status == "applying" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("applying")} className="w60">待审核</a></li>
onClick={() => this.changeStatus("editing")} className="w60">编辑中</a></li>
<li className={status == "published" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("published")} className="w60">已发布</a></li>
onClick={() => this.changeStatus("published")} className="w60">已发布</a></li>
<li className={status == "applying" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
onClick={() => this.changeStatus("applying")} className="w60">待审核</a></li>
<li className={status == "publiced" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
onClick={() => this.changeStatus("publiced")} className="w60">已公开</a></li>
<li className={status == "closed" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("closed")} className="w60">已关闭</a></li>
onClick={() => this.changeStatus("closed")} className="w60">已关闭</a></li>
</div>
}
{
category && category == "study" && is_current &&
<div className="edu-back-white padding10-30 clearfix secondNavs bor-top-greyE">
<li className={status ? "whitepanelyslliss" : "active whitepanelyslliss"}><a href="javascript:void(0)"
<li className={status ? "whitepanelyslliss" : "active whitepanelyslliss"}><a
onClick={() => this.changeStatus()}
className="w32">全部</a></li>
<li className={status == "processing" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("processing")} className="w60">未通关</a></li>
onClick={() => this.changeStatus("processing")} className="w60">未通关</a></li>
<li className={status == "passed" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("passed")} className="w60">已通关</a></li>
onClick={() => this.changeStatus("passed")} className="w60">已通关</a></li>
</div>
}
<div className=" clearfix font-12 " style={{
@ -387,12 +388,12 @@ class InfosShixun extends Component{
:""}
<a href="javascript:void(0)" className="square-img">
<a className="square-img">
<img src={setImagesUrl(`${item.image_url}`)}/>
</a>
<div className="square-main">
<p className="task-hide">
<a href="javascript:void(0)" className="justify color-grey-name">{item.name}</a>
<a className="justify color-grey-name">{item.name}</a>
</p>
<div className="user-bar mt10">
<p style={{'width': `${parseFloat(parseInt(item.finished_challenges_count)/parseInt(item.challenges_count)).toFixed(2)*100}%`}}></p>

@ -364,7 +364,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin-
.subshaicontent a{float: left;margin-right: 20px;color: #999;cursor: pointer}
.search-new{width: 248px;height:32px;position: relative;margin-right: 35px;}
.search-new{width: 248px;height:32px;position: relative;}
.search-span{display: block;position: absolute;width: 100%;height: 100%;left:0px;top:0px;background-color: #F4F4F4;border: 1px solid #EAEAEA; border-radius: 4px;z-index: 1}
.search-new-input{height: 32px;padding-left: 5px;width: 225px;border: none;box-sizing: border-box;background: none;outline: none;position: absolute;left:0px;top:1px;z-index: 2}
.search-new img,.search-new a,.search-new .searchicon{cursor: pointer;position: absolute;right:2px;top:2px;z-index: 2}

Loading…
Cancel
Save