Merge branches 'dev_aliyun' and 'dev_jupyter' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_jupyter

chromesetting
杨树明 5 years ago
commit 0d4afbdcce

@ -5,7 +5,7 @@ class Admins::SchoolsController < Admins::BaseController
schools = Admins::SchoolQuery.call(params)
@schools = paginate schools.includes(:user_extensions)
@schools = paginate schools
school_ids = @schools.map(&:id)
@department_count = Department.where(school_id: school_ids).group(:school_id).count

@ -1,7 +1,7 @@
class CollegesController < ApplicationController
include PaginateHelper
layout 'college'
# layout 'college'
before_action :require_login
before_action :check_college_present!
@ -21,6 +21,7 @@ class CollegesController < ApplicationController
# 实训总数
@shixuns_count = Shixun.visible.joins('left join user_extensions on user_extensions.user_id = shixuns.user_id')
.where(user_extensions: { school_id: current_school.id }).count
render json: { teachers_count: @teachers_count, students_count: @students_count, courses_count: @courses_count, shixuns_count: @shixuns_count }
end
def shixun_time
@ -43,6 +44,8 @@ class CollegesController < ApplicationController
(SELECT count(c.id) FROM courses c, course_members m WHERE c.id != 1309 and m.course_id = c.id AND m.user_id=users.id AND m.role in (1,2,3) and c.school_id = #{current_school.id} AND c.is_delete = 0) as course_count
FROM `users`, user_extensions ue where ue.school_id=#{current_school.id} and users.id=ue.user_id and ue.identity=0 ORDER BY publish_shixun_count desc, course_count desc, id desc LIMIT 10")
# ).order("publish_shixun_count desc, experience desc").limit(10)
@teacher_count = UserExtension.where(school_id: current_school.id)
.select('SUM(IF(identity=0, 1, 0)) AS teachers_count').first.teachers_count
@teachers =
@teachers.map do |teacher|
course_ids = Course.find_by_sql("SELECT c.id FROM courses c, course_members m WHERE c.id != 1309 and m.course_id = c.id AND m.role in (1,2,3) AND m.user_id=#{teacher.id} AND c.is_delete = 0 and c.school_id = #{current_school.id}")
@ -94,11 +97,11 @@ class CollegesController < ApplicationController
def course_statistics
courses = Course.where(school_id: current_school.id, is_delete: 0).where.not(id: 1309)
@course_count = courses.size
courses = courses.left_joins(practice_homeworks: { student_works: { myshixun: :games } })
.select('courses.id, courses.name, courses.is_end, sum(games.evaluate_count) evaluating_count')
.group('courses.id').order('is_end asc, evaluating_count desc')
params[:per_page] = 8
@courses = paginate courses
course_ids = @courses.map(&:id)
@ -114,6 +117,7 @@ class CollegesController < ApplicationController
# 学生实训
def student_shixun
@student_count = User.joins(:user_extension).where(user_extensions: { school_id: current_school.id, identity: 1 }).count
@students = User.joins(:user_extension).where(user_extensions: { school_id: current_school.id, identity: 1 }).includes(:user_extension).order('experience desc').limit(10)
student_ids = @students.map(&:id)

@ -0,0 +1,14 @@
class LibrariesController < ApplicationController
include PaginateHelper
def index
default_sort('updated_at', 'desc')
@items = ItemBankQuery.call(params)
@items = paginate courses.includes(:school, :students, :attachments, :homework_commons, teacher: :user_extension)
end
def create
end
end

@ -165,9 +165,10 @@ class ShixunsController < ApplicationController
def show_right
owner = @shixun.owner
#@fans_count = owner.fan_count
#@followed_count = owner.follow_count
@user_own_shixuns = owner.shixuns.published.count
@user_tags = @shixun.user_tags_name(current_user)
@shixun_tags = @shixun.challenge_tags_name
@myshixun = @shixun.myshixuns.find_by(user_id: current_user.id)
end
# 排行榜
@ -345,7 +346,11 @@ class ShixunsController < ApplicationController
#合作者
def collaborators
@user = current_user
@members = @shixun.shixun_members.includes(:user)
## 分页参数
page = params[:page] || 1
limit = params[:limit] || 10
@member_count = @shixun.shixun_members.count
@members = @shixun.shixun_members.includes(:user).page(page).per(limit)
end
def fork_list

@ -0,0 +1,4 @@
class Curriculum < ApplicationRecord
belongs_to :curriculum_direction
has_many :knowledge_points, dependent: :destroy
end

@ -0,0 +1,4 @@
class CurriculumDirection < ApplicationRecord
has_many :curriculums
has_many :knowledge_points
end

@ -0,0 +1,3 @@
class ItemAnalysis < ApplicationRecord
belongs_to :item_bank
end

@ -0,0 +1,13 @@
class ItemBank < ApplicationRecord
# difficulty: 1 简单 2 适中 3 困难
# item_type: 0 单选 1 多选 2 判断 3 填空 4 简答 5 实训 6 编程
enum item_type: { SINGLE: 0, MULTIPLE: 1, JUDGMENT: 2, COMPLETION: 3, SUBJECTIVE: 4, PRACTICAL: 5, PROGRAM: 6 }
belongs_to :curriculum
belongs_to :curriculum_direction
belongs_to :user
has_one :item_analysis, dependent: :destroy
has_many :item_choices, dependent: :destroy
has_many :item_baskets, dependent: :destroy
end

@ -0,0 +1,4 @@
class ItemBasket < ApplicationRecord
belongs_to :item_bank
belongs_to :user
end

@ -0,0 +1,3 @@
class ItemChoice < ApplicationRecord
belongs_to :item_bank
end

@ -0,0 +1,5 @@
class KnowledgePoint < ApplicationRecord
belongs_to :curriculum_direction
belongs_to :curriculum
has_many :knowledge_point_containers, dependent: :destroy
end

@ -0,0 +1,3 @@
class KnowledgePointContainer < ApplicationRecord
belongs_to :knowledge_point
end

@ -17,6 +17,7 @@ class Admins::SchoolQuery < ApplicationQuery
if keyword
schools = schools.where('schools.name LIKE ?', "%#{keyword}%")
end
schools = schools.left_joins(:user_extensions).select('schools.*, IFNULL(count(user_extensions.user_id),0) users_count').group('schools.id')
custom_sort schools, params[:sort_by], params[:sort_direction]
end
end

@ -33,7 +33,7 @@
<td><%= school.province %></td>
<td><%= school.city %></td>
<td class="text-left"><%= school.address %></td>
<td><%= school.user_extensions.count %></td>
<td><%= school.users_count %></td>
<td><%= @department_count.fetch(school.id, 0) %></td>
<td><%= school.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
<td>

@ -0,0 +1,11 @@
json.courses @courses do |course|
json.(course, :id, :name, :is_end, :evaluating_count)
json.teachers course.teacher_users.map(&:real_name).join('、')
json.student_count @student_count.fetch(course.id, 0)
json.shixun_work_count @shixun_work_count.fetch(course.id, 0)
json.attachment_count @attachment_count.fetch(course.id, 0)
json.message_count @message_count.fetch(course.id, 0)
json.other_work_count @exercise_count.fetch(course.id, 0) + @poll_count.fetch(course.id, 0) + @other_work_count.fetch(course.id, 0)
json.activity_time @active_time[course.id]&.strftime('%Y-%m-%d %H:%M')
end
json.course_count @course_count

@ -0,0 +1,10 @@
json.teachers @students do |student|
json.login student.login
json.name student.real_name
json.student_id student.student_id
json.shixun_count @shixun_count.fetch(student.id, 0)
json.study_shixun_count @study_shixun_count.fetch(student.id, 0)
json.grade student.grade
json.experience student.experience
end
json.student_count @student_count

@ -0,0 +1,11 @@
json.teachers @teachers do |teacher|
json.login teacher['login']
json.name teacher['real_name']
json.course_count teacher['course_count']
json.shixun_work_count teacher['shixun_work_count']
json.un_shixun_work_count teacher['un_shixun_work_count']
json.student_count teacher['student_count']
json.complete_rate teacher['complete_rate']
json.publish_shixun_count teacher['publish_shixun_count']
end
json.teacher_count @teacher_count

@ -13,11 +13,17 @@ json.recommands do
json.partial! 'shap_shixun', locals: { shixuns: shixun.relation_path.size > 0 ? recommend_shixun(shixun) : [] }
end
if shixun.status > 1
json.complete_count @myshixun&.passed_count
json.challenge_count @shixun.challenges_count
end
# 技能标签
user_tags = shixun.user_tags_name(User.current)
json.tags do
json.array! shixun.challenge_tags_name do |tag|
json.array! @shixun_tags do |tag|
json.tag_name tag
json.status user_tags.include?(tag)
json.status @user_tags.include?(tag)
end
end
json.tag_count @shixun_tags.size
json.user_tag_count @user_tags.size

@ -6,7 +6,8 @@
# ]
json.array! @members do |member|
json.member_count @member_count
json.members @members do |member|
json.user do
json.partial! 'users/user', locals: { user: member.user }
json.user_shixuns_count member.user.shixuns.published.count

@ -1,6 +1,6 @@
json.partial! 'shixuns/right', locals: { shixun: @shixun }
json.follow follow?(@shixun.owner, User.current)
json.fans_count @fans_count
json.followed_count @followed_count
# json.follow follow?(@shixun.owner, User.current)
# json.fans_count @fans_count
# json.followed_count @followed_count
json.user_shixuns_count @user_own_shixuns

@ -48,7 +48,9 @@ Rails.application.routes.draw do
end
end
resources :item_banks do
end
resources :hacks, path: :problems, param: :identifier do
@ -977,6 +979,19 @@ Rails.application.routes.draw do
post :entry
end
end
resources :colleges, only: [] do
member do
get :statistics
get :course_statistics
get :student_shixun
get :shixun_time
get :shixun_report_count
get :teachers
get :shixun_chart_data
get :student_hot_evaluations
end
end
end
namespace :admins do
@ -1287,19 +1302,6 @@ Rails.application.routes.draw do
end
end
resources :colleges, only: [] do
member do
get :statistics
get :course_statistics
get :student_shixun
get :shixun_time
get :shixun_report_count
get :teachers
get :shixun_chart_data
get :student_hot_evaluations
end
end
resources :partners, only: [] do
member do
get :customers

@ -0,0 +1,9 @@
class CreateCurriculumDirections < ActiveRecord::Migration[5.2]
def change
create_table :curriculum_directions do |t|
t.string :name
t.timestamps
end
end
end

@ -0,0 +1,10 @@
class CreateCurriculums < ActiveRecord::Migration[5.2]
def change
create_table :curriculums do |t|
t.string :name
t.references :curriculum_direction, index: true
t.timestamps
end
end
end

@ -0,0 +1,11 @@
class CreateKnowledgePoints < ActiveRecord::Migration[5.2]
def change
create_table :knowledge_points do |t|
t.string :name
t.references :curriculum_direction, index: true
t.references :curriculum, index: true
t.timestamps
end
end
end

@ -0,0 +1,12 @@
class CreateKnowledgePointContainers < ActiveRecord::Migration[5.2]
def change
create_table :knowledge_point_containers do |t|
t.references :knowledge_point
t.integer :container_id
t.string :container_type
t.timestamps
end
add_index :knowledge_point_containers, [:knowledge_point_id, :container_id, :container_type], name: "container_index", unique: true
end
end

@ -0,0 +1,16 @@
class CreateItemBanks < ActiveRecord::Migration[5.2]
def change
create_table :item_banks do |t|
t.text :name
t.references :curriculum, index: true
t.references :curriculum_direction, index: true
t.integer :item_type
t.integer :difficulty
t.references :user, index: true
t.boolean :public
t.integer :quotes
t.timestamps
end
end
end

@ -0,0 +1,10 @@
class CreateItemAnalyses < ActiveRecord::Migration[5.2]
def change
create_table :item_analyses do |t|
t.references :item_bank, index: true
t.text :analysis
t.timestamps
end
end
end

@ -0,0 +1,11 @@
class CreateItemChoices < ActiveRecord::Migration[5.2]
def change
create_table :item_choices do |t|
t.references :item_bank, index: true
t.text :choice_text
t.boolean :is_answer
t.timestamps
end
end
end

@ -0,0 +1,10 @@
class CreateItemBaskets < ActiveRecord::Migration[5.2]
def change
create_table :item_baskets do |t|
t.references :item_bank, index: true
t.references :user, index: true
t.timestamps
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -75,6 +75,13 @@
"unicode": "e6bc",
"unicode_decimal": 59068
},
{
"icon_id": "496400",
"name": "禁止",
"font_class": "jinzhi",
"unicode": "e6d4",
"unicode_decimal": 59092
},
{
"icon_id": "562997",
"name": "vs",
@ -180,6 +187,13 @@
"unicode": "e609",
"unicode_decimal": 58889
},
{
"icon_id": "978358",
"name": "浏览",
"font_class": "liulan",
"unicode": "e6c7",
"unicode_decimal": 59079
},
{
"icon_id": "986702",
"name": "路由",
@ -208,6 +222,13 @@
"unicode": "e66d",
"unicode_decimal": 58989
},
{
"icon_id": "1110411",
"name": "下箭头",
"font_class": "jiantou9",
"unicode": "e700",
"unicode_decimal": 59136
},
{
"icon_id": "1113422",
"name": "三角形-up",
@ -495,6 +516,13 @@
"unicode": "e694",
"unicode_decimal": 59028
},
{
"icon_id": "3315084",
"name": "博客园",
"font_class": "bokeyuan",
"unicode": "e6c6",
"unicode_decimal": 59078
},
{
"icon_id": "3330922",
"name": "base",
@ -579,6 +607,13 @@
"unicode": "e67d",
"unicode_decimal": 59005
},
{
"icon_id": "3911796",
"name": "SDK问题",
"font_class": "wenti",
"unicode": "e7dc",
"unicode_decimal": 59356
},
{
"icon_id": "4019861",
"name": "银行卡",
@ -1377,6 +1412,13 @@
"unicode": "e68c",
"unicode_decimal": 59020
},
{
"icon_id": "7501072",
"name": "评论",
"font_class": "pinglun",
"unicode": "e6c8",
"unicode_decimal": 59080
},
{
"icon_id": "7587940",
"name": "工程",
@ -1398,6 +1440,13 @@
"unicode": "e604",
"unicode_decimal": 58884
},
{
"icon_id": "8349119",
"name": "上箭头-填充",
"font_class": "shangjiantou-tianchong",
"unicode": "e733",
"unicode_decimal": 59187
},
{
"icon_id": "8361866",
"name": "主页",
@ -1447,6 +1496,13 @@
"unicode": "e6a1",
"unicode_decimal": 59041
},
{
"icon_id": "9974429",
"name": "省略号",
"font_class": "shenglvehao",
"unicode": "e708",
"unicode_decimal": 59144
},
{
"icon_id": "9977539",
"name": "排序",
@ -1552,6 +1608,13 @@
"unicode": "e6b7",
"unicode_decimal": 59063
},
{
"icon_id": "10809887",
"name": "向上 箭头",
"font_class": "changyongtubiao-xianxingdaochu-zhuanqu-",
"unicode": "e74c",
"unicode_decimal": 59212
},
{
"icon_id": "11222372",
"name": "healthmode",
@ -1593,6 +1656,370 @@
"font_class": "projectx",
"unicode": "e6c4",
"unicode_decimal": 59076
},
{
"icon_id": "11965901",
"name": "绑定手机号",
"font_class": "bangdingshoujihao",
"unicode": "e6ca",
"unicode_decimal": 59082
},
{
"icon_id": "12028723",
"name": "标签",
"font_class": "biaoqian1",
"unicode": "e6ce",
"unicode_decimal": 59086
},
{
"icon_id": "12028724",
"name": "记录",
"font_class": "jilu",
"unicode": "e6cf",
"unicode_decimal": 59087
},
{
"icon_id": "12028725",
"name": "书",
"font_class": "shu",
"unicode": "e6d0",
"unicode_decimal": 59088
},
{
"icon_id": "12028726",
"name": "推荐",
"font_class": "tuijian",
"unicode": "e6d1",
"unicode_decimal": 59089
},
{
"icon_id": "12028727",
"name": "创建者",
"font_class": "chuangjianzhe",
"unicode": "e6d2",
"unicode_decimal": 59090
},
{
"icon_id": "12029022",
"name": "创建者",
"font_class": "chuangjianzhe1",
"unicode": "e6da",
"unicode_decimal": 59098
},
{
"icon_id": "12029023",
"name": "书",
"font_class": "shu1",
"unicode": "e6dc",
"unicode_decimal": 59100
},
{
"icon_id": "12029024",
"name": "标签",
"font_class": "biaoqian2",
"unicode": "e6dd",
"unicode_decimal": 59101
},
{
"icon_id": "12029025",
"name": "记录",
"font_class": "jilu1",
"unicode": "e6de",
"unicode_decimal": 59102
},
{
"icon_id": "12029026",
"name": "推荐",
"font_class": "tuijian1",
"unicode": "e6df",
"unicode_decimal": 59103
},
{
"icon_id": "12031268",
"name": "警告",
"font_class": "jinggao1",
"unicode": "e6e0",
"unicode_decimal": 59104
},
{
"icon_id": "12031648",
"name": "点赞",
"font_class": "dianzan2",
"unicode": "e6e1",
"unicode_decimal": 59105
},
{
"icon_id": "12031742",
"name": "评论",
"font_class": "pinglun1",
"unicode": "e6e2",
"unicode_decimal": 59106
},
{
"icon_id": "12033031",
"name": "对勾",
"font_class": "duigou",
"unicode": "e6e3",
"unicode_decimal": 59107
},
{
"icon_id": "12039315",
"name": "提示",
"font_class": "tishi2",
"unicode": "e6e4",
"unicode_decimal": 59108
},
{
"icon_id": "12039523",
"name": "编辑_Hover",
"font_class": "bianji_Hover",
"unicode": "e6e5",
"unicode_decimal": 59109
},
{
"icon_id": "12039524",
"name": "上移_Hover",
"font_class": "shangyi_Hover",
"unicode": "e6e6",
"unicode_decimal": 59110
},
{
"icon_id": "12039525",
"name": "删除_默认",
"font_class": "shanchu_moren",
"unicode": "e6e7",
"unicode_decimal": 59111
},
{
"icon_id": "12039526",
"name": "下移_Hover",
"font_class": "xiayi_Hover",
"unicode": "e6e8",
"unicode_decimal": 59112
},
{
"icon_id": "12039527",
"name": "删除_Hover",
"font_class": "shanchu_Hover",
"unicode": "e6e9",
"unicode_decimal": 59113
},
{
"icon_id": "12039528",
"name": "下移_默认",
"font_class": "xiayi_moren",
"unicode": "e6ea",
"unicode_decimal": 59114
},
{
"icon_id": "12039529",
"name": "编辑_默认",
"font_class": "bianji_moren",
"unicode": "e6eb",
"unicode_decimal": 59115
},
{
"icon_id": "12040163",
"name": "恢复初始代码",
"font_class": "huifuchushidaima",
"unicode": "e6ec",
"unicode_decimal": 59116
},
{
"icon_id": "12040164",
"name": "再次载入",
"font_class": "zaicizairu",
"unicode": "e6ed",
"unicode_decimal": 59117
},
{
"icon_id": "12040165",
"name": "开关",
"font_class": "kaiguan",
"unicode": "e6ef",
"unicode_decimal": 59119
},
{
"icon_id": "12040167",
"name": "目录",
"font_class": "mulu",
"unicode": "e6f0",
"unicode_decimal": 59120
},
{
"icon_id": "12040168",
"name": "缩小",
"font_class": "suoxiao1",
"unicode": "e6f2",
"unicode_decimal": 59122
},
{
"icon_id": "12040169",
"name": "扩大",
"font_class": "kuoda",
"unicode": "e6f3",
"unicode_decimal": 59123
},
{
"icon_id": "12040170",
"name": "设置",
"font_class": "shezhi3",
"unicode": "e6f4",
"unicode_decimal": 59124
},
{
"icon_id": "12053135",
"name": "隐藏",
"font_class": "yincang2",
"unicode": "e6f5",
"unicode_decimal": 59125
},
{
"icon_id": "12074711",
"name": "消息",
"font_class": "xiaoxi11",
"unicode": "e6f6",
"unicode_decimal": 59126
},
{
"icon_id": "12098941",
"name": "金币",
"font_class": "bianzu1",
"unicode": "e6f7",
"unicode_decimal": 59127
},
{
"icon_id": "12107631",
"name": "显示密码",
"font_class": "xianshimima",
"unicode": "e6f9",
"unicode_decimal": 59129
},
{
"icon_id": "12107632",
"name": "隐藏密码",
"font_class": "yincangmima",
"unicode": "e6fa",
"unicode_decimal": 59130
},
{
"icon_id": "12107887",
"name": "复制",
"font_class": "fuzhi2",
"unicode": "e6fb",
"unicode_decimal": 59131
},
{
"icon_id": "12108608",
"name": "文件",
"font_class": "xingzhuangjiehe",
"unicode": "e6fc",
"unicode_decimal": 59132
},
{
"icon_id": "12108609",
"name": "文件夹",
"font_class": "xingzhuangjiehebeifen",
"unicode": "e6fd",
"unicode_decimal": 59133
},
{
"icon_id": "12108648",
"name": "上传",
"font_class": "shangchuan",
"unicode": "e6fe",
"unicode_decimal": 59134
},
{
"icon_id": "12126798",
"name": "挑战",
"font_class": "tiaozhan",
"unicode": "e6ff",
"unicode_decimal": 59135
},
{
"icon_id": "12126824",
"name": "完成",
"font_class": "wancheng1",
"unicode": "e6cb",
"unicode_decimal": 59083
},
{
"icon_id": "12300755",
"name": "企业账号",
"font_class": "qiyezhanghao",
"unicode": "e6cc",
"unicode_decimal": 59084
},
{
"icon_id": "12300756",
"name": "个人账号",
"font_class": "gerenzhanghao",
"unicode": "e6cd",
"unicode_decimal": 59085
},
{
"icon_id": "12300795",
"name": "右滑",
"font_class": "youhua",
"unicode": "e702",
"unicode_decimal": 59138
},
{
"icon_id": "12300843",
"name": "解锁",
"font_class": "jiesuo",
"unicode": "e703",
"unicode_decimal": 59139
},
{
"icon_id": "12300844",
"name": "锁",
"font_class": "suo1",
"unicode": "e704",
"unicode_decimal": 59140
},
{
"icon_id": "12301512",
"name": "加载失败",
"font_class": "jiazaishibai1",
"unicode": "e6d6",
"unicode_decimal": 59094
},
{
"icon_id": "12319671",
"name": "搜索",
"font_class": "bianzu11",
"unicode": "e706",
"unicode_decimal": 59142
},
{
"icon_id": "12345165",
"name": "类型",
"font_class": "leixing",
"unicode": "e6d5",
"unicode_decimal": 59093
},
{
"icon_id": "12345541",
"name": "标签尖头",
"font_class": "biaoqianjiantou",
"unicode": "e6d7",
"unicode_decimal": 59095
},
{
"icon_id": "12364938",
"name": "笔记",
"font_class": "biji",
"unicode": "e70a",
"unicode_decimal": 59146
},
{
"icon_id": "12371179",
"name": "置顶",
"font_class": "zhiding",
"unicode": "e6d9",
"unicode_decimal": 59097
}
]
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 362 KiB

@ -626,11 +626,26 @@ class App extends Component {
<Route path="/tasks/:stageId" component={IndexWrapperComponent}/>
<Route path="/shixuns/:shixunId" component={TPMIndexComponent}>
</Route>
{/*<Route path="/shixuns/:shixunId" component={TPMIndexComponent}>*/}
{/*</Route>*/}
<Route path="/shixuns/:shixunId"
render={
(props)=>(<TPMIndexComponent {...this.props} {...props} {...this.state}></TPMIndexComponent>)
}
></Route>
{/*列表页 实训项目列表*/}
<Route path="/shixuns" component={TPMShixunsIndexComponent}/>
{/*<Route path="/shixuns" component={TPMShixunsIndexComponent}/>*/}
<Route path="/shixuns"
render={
(props)=>(<TPMShixunsIndexComponent {...this.props} {...props} {...this.state}></TPMShixunsIndexComponent>)
}
></Route>
{/*实训课程(原实训路径)*/}

@ -866,6 +866,7 @@ class PollNew extends Component {
let newarr = [...arr];
newarr.splice(indexo, 1);
if(bool === true) {
console.log("shangchu1");
this.setState({
adddom: newarr,
q_countst: 0,
@ -878,6 +879,8 @@ class PollNew extends Component {
})
}else{
console.log("shangchu2");
this.setState({
adddom: newarr,
q_countst: 0,
@ -1416,6 +1419,7 @@ class PollNew extends Component {
}
if(bool === true){
console.log("tianjiadao1");
this.setState({
q_countst: 1,
bindingid:undefined,
@ -1423,6 +1427,7 @@ class PollNew extends Component {
newoption: false,
})
}else {
console.log("tianjiadao2");
this.setState({
q_countst: 1,
Newdisplay:false,
@ -2018,6 +2023,7 @@ class PollNew extends Component {
if (result.data.status === 0) {
this.props.showNotification(`已完成`);
thiss.thisinitializationdatanew();
console.log("已完成了了了1");
this.setState({
Newdisplay:false,
newoption: false,
@ -2109,6 +2115,7 @@ class PollNew extends Component {
axios.put(url,datay).then((result) => {
try {
if (result.data.status === 0) {
console.log("编辑题目成功1");
this.props.showNotification(`编辑题目成功`);
thiss.thisinitializationdatanew();
this.setState({
@ -3609,7 +3616,7 @@ class PollNew extends Component {
{
this.state.Newdisplay === true?
<div>
{this.state.adddom === undefined ? "" : this.state.adddom.map((itemo, indexo) => {
{this.state.adddom === undefined ? "publishtimeids123123" : this.state.adddom.map((itemo, indexo) => {
// console.log('打印this.state.adddom')
// console.log(this.state.adddom);
let arrid = itemo.question.id;

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import {Table, Pagination,Tooltip,Spin, Row, Col ,Checkbox,Tabs,Menu, Dropdown, Icon,Input} from "antd";
import {Table, Pagination,Popover,Spin, Row, Col ,Tabs, Icon} from "antd";
import { WordsBtn,on, off, trigger ,getImageUrl,sortDirections} from 'educoder';
import axios from'axios';
import Dropdownbox from './Dropdownbox';
@ -423,15 +423,38 @@ class Statistics extends Component{
:""
}
</React.Fragment>;
const content = (
<div className={"Statisticscircle"}>
<p>
课堂总成绩 * 70 %
</p>
<p>
课堂活跃度 * 10%
</p>
<p>
课外学习成绩 * 20%
</p>
<p>
其中课外学习成绩= 当前学生经验值 / 课堂学生经验值 最大值*100
</p>
</div>
);
return(
<React.Fragment>
<div className="edu-back-white">
<Spin size="large" spinning={this.state.topisSpin}>
<p className="clearfix padding30">
<Row gutter={24}>
<Col className={"Statisticsmxxy"}>
<Row>
<Col span={12}>
明星学员
</Col>
<Col span={12} className={"Statisticsliboxjsgz"}>
<span className={"mr10"}>计算规则</span>
<Popover placement="bottom" title={"明星学员计算说明"} content={content} trigger="hover">
<Icon type="info-circle" />
</Popover>
</Col>
</Row>
<Row type="flex" justify="center" align="bottom">

@ -35,7 +35,7 @@ class Bottomsubmit extends Component {
<span> </span></button>
<Button type="button" className="ant-btn newshixunmode mr40 ant-btn-primary" type="primary"
htmlType="submit" onClick={() => this.props.onSubmits()}
loading={this.props.loadings}><span>{this.props.bottomvalue===undefined?"确 定":this.props.bottomvalue}</span></Button>
loading={this.props.loadings}><span>{this.props.bottomvalue===undefined?"保存":this.props.bottomvalue}</span></Button>
</div>
</div>
</div>

@ -261,7 +261,7 @@ class Osshackathon extends Component {
}
</style>
<div className={"educontent mb20 persmstyle"} style={{width: "1200px", marginTop: "26px"}}>
<div className={"educontent mb60 persmstyle"} style={{width: "1200px", marginTop: "26px"}}>
<div className="registrationback"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/heikesong.jpg`)})`,"height":"360px"}}

@ -380,6 +380,26 @@ a:hover.task-btn-orange{background: #4CACFF; color:#fff!important;}
color:#4CACFF;
}
/*实训详情*/
.backgroudwhite{
height:60px;
background:rgba(255,255,255,1);
box-shadow:0px 1px 0px 0px rgba(244,244,244,1);
line-height: 60px;
}
.tpmbannernavstyler{
font-size:16px;
/*color:rgba(51,51,51,1);*/
}
.ant-menu-horizontal {
border-bottom:none !important;
height:60px;
line-height: 60px;
}
.audit_situationactive{
color: #4CACFF !important;
}

@ -748,7 +748,7 @@ submittojoinclass=(value)=>{
return true
} else if (url.startsWith('/courses')&&match.path.startsWith('/courses')) {
return true
}else if (url.startsWith('/competitions')&&match.path.startsWith('/crowdsourcing')) {
}else if (url.startsWith('/competitions')&&match.path.startsWith('/competitions')) {
return true
}else if (url.startsWith('/crowdsourcing')&&match.path.startsWith('/crowdsourcing')) {
return true
@ -789,7 +789,7 @@ submittojoinclass=(value)=>{
let coursestype=false;
let activePackages=false;
let activeMoopCases=false;
let activeCompetitions=false;
if (match.path === '/forums') {
activeForums = true;
@ -803,7 +803,9 @@ submittojoinclass=(value)=>{
activePackages = true;
}else if(match.path.startsWith('/moop_cases')){
activeMoopCases = true;
}else {
}else if(match.path.startsWith('/competitions')){
activeCompetitions = true;
}else {
activeIndex = true;
}
@ -1097,7 +1099,7 @@ submittojoinclass=(value)=>{
</li>
{/*<li className=""><a href={"/libraries"}>教学案例</a></li>*/}
<li className="">
<li className={`${activeCompetitions === true ? 'pr active' : 'pr'}`}>
<a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a>
{/*<img className="roundedRectangles"*/}
{/* src={require('./roundedRectangle.png')}*/}

@ -1,6 +1,6 @@
import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import {Link} from "react-router-dom";
import {Rating, Progress} from "@icedesign/base";
@ -788,7 +788,17 @@ class TPMBanner extends Component {
return (
shixunsDetails === undefined ? "" :
<div className="shixunDetail">
<div className="shixunDetail" id={"shixunDetail"}>
<style>
{
`
.shixunDetail_top{
height: 180px !important;
padding-top:35px !important;
}
`
}
</style>
<div className="shixunDetail_top">
{AccountProfiletype === true ? <AccountProfile
@ -824,27 +834,13 @@ class TPMBanner extends Component {
}
</p>
<div className="clearfix mt50">
{/*<style>*/}
{/*{*/}
{/*`*/}
{/*.anticon-star{*/}
{/*font-size:14px;*/}
{/*}*/}
{/*.pathInfo{*/}
{/*margin-right:-5px;*/}
{/*}*/}
{/*.ant-rate{*/}
{/*color: #FFA800;*/}
{/*}*/}
{/*`*/}
{/*}*/}
{/*</style>*/}
<div className="clearfix mt30">
<ul className="fl color-grey-c pathInfo">
<li>
{shixunsDetails&&shixunsDetails.stu_num===0?"":<li>
<span>学习人数</span>
<span className="mt3">{shixunsDetails.stu_num}</span>
</li>
</li>}
{/*<li>*/}
{/*<span>经验值</span>*/}
{/*<span className="mt10">{shixunsDetails.experience}</span>*/}
@ -857,81 +853,70 @@ class TPMBanner extends Component {
</ul>
{
this.props.is_jupyter===true?"":
<div className="pr fl" id="commentsStar" onMouseOver={() => this.showonMouseOver()}
onMouseOut={() => this.hideonMouseOut()}>
<div className={"color-grey-c ml15"} style={{color: "#Fff", textAlign: "center"}}>学员评分</div>
<div className="rateYo">
<MyRate allowHalf defaultValue={star_info[0]} disabled/>
</div>
<div id="ratePanel" className="showratePanel" style={{"width": "530px"}}
onMouseOut={() => this.hideonMouseOut()}>
<div className="pr">
<span className="rateTrangle"></span>
<div className="pr clearfix ratePanelContent" style={{height: '177px'}}>
<div className="fl totalScore">
<div>
<span
className="font-24 color-yellow-ff lineh-20 mb10 ml20">{star_infos[0]}</span>
<span className="displayblock">总评分</span>
<div className="rateYo">
{showradios === true ?
<MyRate allowHalf defaultValue={star_info[0]} disabled/>
: ""}
</div>
</div>
</div>
<div className="fr" style={{width: '375px'}}>
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<MyRate allowHalf defaultValue={5} disabled/>
: ""}
</div>
<Progress percent={star_infos[1]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[1]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<MyRate allowHalf defaultValue={4} disabled/>
: ""}
</div>
<Progress percent={star_infos[2]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[2]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<MyRate allowHalf defaultValue={3} disabled/>
: ""}
</div>
<Progress percent={star_infos[3]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[3]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<MyRate allowHalf defaultValue={2} disabled/>
: ""}
</div>
<Progress percent={star_infos[4]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[4]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<MyRate allowHalf defaultValue={1} disabled/>
: ""}
</div>
<Progress percent={star_infos[5]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[5]}%</span>
</div>
</div>
</div>
</div>
</div>
</div>
<Popover placement="right" content={
<div style={{"width": "530px"}} >
<div className="pr">
<span className="rateTrangle"></span>
<div className="pr clearfix" style={{height: '177px'}}>
<div className="fl totalScore ml10">
<div>
<span className="font-24 color-yellow-ff lineh-20 mb10 mlbanner36">{star_infos[0]}</span>
<span className="displayblock mt20">总评分</span>
<div className="rateYo">
<MyRate allowHalf defaultValue={star_info[0]} disabled/>
</div>
</div>
</div>
<div className="fr mt20 mr20" style={{width: '375px'}}>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={5} disabled/>
</div>
<Progress percent={star_infos[1]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[1]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={4} disabled/>
</div>
<Progress percent={star_infos[2]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[2]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={3} disabled/>
</div>
<Progress percent={star_infos[3]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[3]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={2} disabled/>
</div>
<Progress percent={star_infos[4]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[4]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={1} disabled/>
</div>
<Progress percent={star_infos[5]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[5]}%</span>
</div>
</div>
</div>
</div>
</div>
}>
<div className="pr fl" id="commentsStar">
<div className={"color-grey-c ml15"} style={{color: "#fff", textAlign: "center"}}>学员评分</div>
<div className="rateYo">
<MyRate allowHalf defaultValue={star_info[0]} disabled/>
</div>
</div>
</Popover>
}

@ -26,7 +26,7 @@ class TPMChallenge extends Component {
<React.Fragment>
<div className="educontent clearfix mt30 mb80">
<div className="with65 fl edu-back-white" >
<div className="with65 fl " >
<TPMNav
match={match}
user={user}

@ -25,14 +25,14 @@ class TPMCollaborators extends Component {
<React.Fragment>
<div className="educontent clearfix mt30 mb80">
<div className="with65 fl edu-back-white" >
<TPMNav
match={match}
user={user}
shixun={shixun}
{...this.props}
is_jupyter={this.props.is_jupyter}
></TPMNav>
<div className={" with65 fl "}>
{/*<TPMNav*/}
{/* match={match}*/}
{/* user={user}*/}
{/* shixun={shixun}*/}
{/* {...this.props}*/}
{/* is_jupyter={this.props.is_jupyter}*/}
{/*></TPMNav>*/}
<Collaborators
{...this.props}
/>

@ -92,7 +92,7 @@ body>.-task-title {
}
.totalScore{
display: block!important;
padding-top: 28px;
padding-top: 40px;
}
.head-nav ul#header-nav li{
/*font-weight: 600;*/

@ -2,6 +2,8 @@ import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import { Row, Col ,Menu,Popover,Button} from 'antd';
import Loading from '../../Loading';
import Loadable from 'react-loadable';
@ -22,18 +24,16 @@ import TPMRepositoryCommits from './shixunchild/Repository/TPMRepositoryCommits'
import TPMsettings from './TPMsettings/TPMsettings';
//import TPMsettings from './TPMsettings/oldTPMsettings';
import TPMChallengeComponent from './TPMChallengeContainer';
import TPMPropaedeuticsComponent from './TPMPropaedeuticsComponent';
import TPMRanking_listComponent from './TPMRanking_listContainer';
import TPMCollaboratorsComponent from './TPMCollaboratorsContainer';
import Audit_situationComponent from './Audit_situationComponent';
import TPMDataset from './TPMDataset';
import '../page/tpiPage.css'
import TPMNav from "./component/TPMNav";
import TPMNav from './component/TPMNav';
import '../page/tpiPage.css';
const $ = window.$
//任务
// const TPMChallengeComponent = Loadable({
// loader: () => import('./TPMChallengeContainer'),
@ -147,11 +147,21 @@ class TPMIndex extends Component {
PropaedeuticsList: undefined,
tpmindexjupyterbool:false,
is_jupyter:false,
selectedKeys:"",
openknows:false
}
}
componentDidMount = () => {
openknow=()=>{
let storage=window.localStorage;
this.setState({
openknows:false
})
storage.setItem("newTPMsettings",true);
}
componentDidMount = () => {
let newTPMsettings=window.localStorage.newTPMsettings;
let id = this.props.match.params.shixunId;
// console.log('props', this.props);
// let collaborators = `/shixuns/` + id + `/propaedeutics.json`;
@ -199,6 +209,22 @@ class TPMIndex extends Component {
secret_repository: response.data.secret_repository,
is_jupyter:response.data.is_jupyter=== undefined||response.data.is_jupyter===null?false:response.data.is_jupyter,
});
if(response.data.identity <4){
if(newTPMsettings===undefined||newTPMsettings===false){
this.setState({
openknows:true
})
}else{
this.setState({
openknows:false
})
}
}
}
}).catch((error) => {
this.setState({
@ -248,38 +274,97 @@ class TPMIndex extends Component {
// Do something with response error
return Promise.reject(error);
});
//右侧数据
let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
axios.get(shixunsDetailsURL).then((response)=> {
this.setState({
TPMRightSectionData: response.data
});
})
//右侧数据
let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
axios.get(shixunsDetailsURL).then((response)=> {
if(response.data){
}
this.setState({
TPMRightSectionData: response.data
});
})
this.getnavdatas()
}
componentWillUnmount = () => {
axios.interceptors.request.eject(this.tpmContentRequestInterceptor);
this.tpmContentRequestInterceptor = null;
axios.interceptors.request.eject(this.tpmContentResponseInterceptor);
this.tpmContentResponseInterceptor = null;
// this.getnavdatas()
}
// componentDidUpdate=()=>{
// this.getnavdatas()
// }
setLoadingContent = (isLoadingContent) => {
this.setState({ loadingContent: isLoadingContent })
}
// TpmTPMBannertype(type){
//
// }
getnavdatas=()=>{
let selectedKeys;
const {location} = this.props;
console.log(location.pathname)
if(location.pathname.indexOf('/challenges')!=-1){
selectedKeys="1"
}else if(location.pathname.indexOf('/propaedeutics')!=-1){
selectedKeys="2"
}else if(location.pathname.indexOf('/repository')!=-1){
selectedKeys="3"
}else if(location.pathname.indexOf('/secret_repository')!=-1){
selectedKeys="4"
} else if(location.pathname.indexOf('/collaborators')!=-1){
selectedKeys="5"
}else if(location.pathname.indexOf('/dataset')!=-1){
selectedKeys="6"
}else if(location.pathname.indexOf('/shixun_discuss')!=-1){
selectedKeys="7"
}else if(location.pathname.indexOf('/ranking_list')!=-1){
selectedKeys="8"
}else if(location.pathname.indexOf('/settings')!=-1){
selectedKeys="9"
}
this.setState({
selectedKeys:selectedKeys
})
}
handleClick=(e)=>{
this.setState({
selectedKeys: e.key,
});
let id = this.props.match.params.shixunId;
if(e.key==="1"){
this.props.history.replace(`/shixuns/${id}/challenges`);
}else if(e.key==="2"){
this.props.history.replace(`/shixuns/${id}/propaedeutics`);
}else if(e.key==="3"){
this.props.history.replace(`/shixuns/${id}/repository`);
}else if(e.key==="4"){
this.props.history.replace(`/shixuns/${id}/secret_repository`);
}else if(e.key==="5"){
this.props.history.replace(`/shixuns/${id}/collaborators`);
}else if(e.key==="6"){
this.props.history.replace(`/shixuns/${id}/dataset`);
}else if(e.key==="7"){
this.props.history.replace(`/shixuns/${id}/shixun_discuss`);
}else if(e.key==="8"){
this.props.history.replace(`/shixuns/${id}/ranking_list`);
}else if(e.key==="9"){
this.props.history.replace(`/shixuns/${id}/settings`);
}
}
render() {
let url = window.location.href;
let flag = url.indexOf("add_file")>-1;
// console.log(this.state.is_jupyter);
return (
<div className="newMain clearfix">
{/*头部*/}
@ -291,6 +376,86 @@ class TPMIndex extends Component {
is_jupyter={this.state. is_jupyter}
></TPMBanner>
}
<style>
{
`
.ant-menu-item{
margin:0 40px 0 0;
padding:0px;
}
`
}
</style>
<Row type="flex" className={"backgroudwhite"}>
<div className={"educontent clearfix"}>
<Col span={24}>
<Menu onClick={this.handleClick} selectedKeys={[this.state.selectedKeys]} mode="horizontal">
<Menu.Item key="1" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>任务</span>
</Menu.Item>
{ this.state.propaedeutics===undefined?"":this.state.propaedeutics===false?"":<Menu.Item key="2" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>背景知识</span>
</Menu.Item>}
{ this.state.identity >4||this.state.identity===undefined ?"":
this.state.is_jupyter===false?<Menu.Item key="3" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>版本库</span>
</Menu.Item>:""}
{this.state.identity >4||this.state.identity===undefined ?"": this.state.secret_repository && <Menu.Item key="4" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>私密版本库</span>
</Menu.Item>}
<Menu.Item key="5" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>合作者</span>
</Menu.Item>
{ this.state.is_jupyter===true?<Menu.Item key="6" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>数据集</span>
</Menu.Item>:""}
{ this.state.is_jupyter===false?<Menu.Item key="7" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>评论</span>
</Menu.Item>:""}
{ this.state.is_jupyter===false? <Menu.Item key="8" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>排行榜</span>
</Menu.Item>:""}
{this.state.identity >4||this.state.identity===undefined ? "":
<Menu.Item key="9" className={"competitionmr50"}>
<Popover
content={
<pre className={"bannerpd201"}>
<div>更多设置在这里点击配置看一看~</div>
<div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openknow} >我知道了</Button></div>
</pre>
}
trigger="click"
placement="top"
visible={this.state.openknows}
>
<span className={"tpmbannernavstyler"}>配置</span>
</Popover>
</Menu.Item>
}
{this.state.identity >2||this.state.identity===undefined?"":
<div className={"fr"}>
<Link to={`/shixuns/${this.props.match.params.shixunId}/audit_situation`}
className={`${this.props.match.url.indexOf('audit_situation') != -1 ? 'font-16 audit_situationactive' : 'font-16 audit_situationactive'} fl`}>审核情况</Link>
</div>
}
</Menu>
</Col>
</div>
</Row>
{/*筛选*/}
{/*{*/}
{/* tpmindexjupyterbool===false?*/}

@ -51,6 +51,7 @@ export default class TPMUpdatepropaede extends Component {
updatepropaedeuticsvalue=()=>{
let id = this.props.match.params.shixunId;
let {shixunId} = this.state;
let url="/shixuns/"+id+"/update_propaedeutics.json";
const update_propaedeuticsvalue = this.neweditanswerRef.current.getValue().trim();
axios.post(url,{
@ -60,7 +61,10 @@ export default class TPMUpdatepropaede extends Component {
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{
this.props.showSnackbar(response.data.message);
this.props.showNotification(response.data.message);
if(response.data.status===1){
this.props.history.replace("/shixuns/"+shixunId+"/propaedeutics");
}
}
}).catch((error) => {
console.log(error)
@ -73,9 +77,9 @@ export default class TPMUpdatepropaede extends Component {
<div className="educontent">
<div className="edu-back-white mt30">
<div className="font-16 pt30 pl20 pr20 pb40 bor-bottom-greyE clearfix">
<div className="font-16 pt20 pl20 pr20 pb20 bor-bottom-greyE clearfix">
<span className="fl">背景知识</span>
<a href={"/shixuns/"+shixunId+"/propaedeutics"}className="color-grey-9 fr">返回</a>
<Link to={"/shixuns/"+shixunId+"/propaedeutics"}className="color-grey-9 fr">返回</Link>
</div>
<div className="padding40-20">
@ -87,8 +91,8 @@ export default class TPMUpdatepropaede extends Component {
<div className="clearfix mb30 mt30">
<a className="defalutSubmitbtn fl mr20"
onClick={this.updatepropaedeuticsvalue}>保存</a>
<a href={"/shixuns/"+shixunId+"/propaedeutics"} className="defalutCancelbtn fl"
>取消</a>
<Link to={"/shixuns/"+shixunId+"/propaedeutics"} className="defalutCancelbtn fl"
>取消</Link>
</div>
</div>

@ -424,7 +424,9 @@ export default class Shixuninformation extends Component {
</div>
{this.props.identity < 5 ?
<Bottomsubmit {...this.props} {...this.state} url={`/shixuns/${this.props.match.params.shixunId}/challenges`}
onSubmits={this.onSubmits} loadings={this.state.loading} bottomvalue={ this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true?"确 定":"下一步"} /> : ""}
onSubmits={this.onSubmits} loadings={this.state.loading}
// bottomvalue={ this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true?"确 定":"下一步"}
/> : ""}
</div>
);
}

@ -662,7 +662,17 @@ class Shixuninformation extends Component {
})
}
//跳转道描点的地方
scrollToAnchor = (anchorName) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if (anchorElement) {
anchorElement.scrollIntoView();
}
}
}
onSubmits=()=>{
this.setState({
loading:true
@ -699,9 +709,10 @@ class Shixuninformation extends Component {
axios.put(url, data).then((result) => {
if (result) {
if (result.data) {
this.props.getdatas("2")
this.props.getdatas()
if(result.data.shixun_identifier){
this.props.showNotification("基本信息更新成功!")
this.scrollToAnchor("head-navpre1");
this.setState({
loading:false
})
@ -1287,7 +1298,7 @@ class Shixuninformation extends Component {
</div>
{this.props.identity < 5 ?
<Bottomsubmit {...this.props} {...this.state} url={`/shixuns/${this.props.match.params.shixunId}/challenges`}
onSubmits={this.onSubmits} loadings={this.state.loading} bottomvalue={"下一步"} /> : ""}
onSubmits={this.onSubmits} loadings={this.state.loading}/> : ""}
</div>
);

@ -48,26 +48,25 @@ export default class TPMsettings extends Component {
})
}
}
this.setState({
data: response.data
})
}
});
if(key==="3"&&this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true){
window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
}else{
if(key){
this.setState({
activeKeys:key
})
}else{
window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
}
}
//
// if(key==="3"&&this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true){
// window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
// }else{
// if(key){
// this.setState({
// activeKeys:key
// })
// }else{
// window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
// }
//
// }
}
@ -91,7 +90,7 @@ export default class TPMsettings extends Component {
axios.delete(cul).then((response) => {
if (response.data.status === 1) {
this.props.showSnackbar("操作成功");
this.props.showNotification("操作成功");
this.setState({
operateshixunstype: false,
});
@ -109,7 +108,7 @@ export default class TPMsettings extends Component {
let cul = `/shixuns/` + id + `/close.json`;
axios.post(cul).then((response) => {
if (response.data.status === 1) {
this.props.showSnackbar("操作成功");
this.props.showNotification("操作成功");
this.setState({
operateshixunstype: false,
});
@ -140,7 +139,7 @@ export default class TPMsettings extends Component {
// console.log( this.props.shixunsDetails === undefined ? "" : this.props.shixunsDetails.is_jupyter === false ? "学习页面设置" : "")
return (
<div>
<div id={"TPMsettings"}>
<style>
{
`

@ -302,21 +302,21 @@ export default class TPManswer extends Component {
className="color-grey-6 fr font-15 mt3">返回</Link>
{prev_challenge === undefined ? "" :
<a href={prev_challenge} className="fr color-blue mr15 mt4">上一关</a>
<Link to={prev_challenge} className="fr color-blue mr15 mt4">上一关</Link>
}
{next_challenge === undefined ? "" :
<a href={next_challenge} className="fr color-blue mr15 mt4">下一关</a>
<Link to={next_challenge} className="fr color-blue mr15 mt4">下一关</Link>
}
<Link to={practice_url === undefined ? "" : practice_url}
<a href={practice_url === undefined ? "" : practice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.status===2||this.props.status===1?'none':'block'}}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</Link>
<Link to={choice_url === undefined ? "" : choice_url}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</a>
<a href={choice_url === undefined ? "" : choice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.status===2||this.props.status===1?'none':'block'}}
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</Link>
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</a>
</div>

@ -265,21 +265,21 @@ export default class TPManswer extends Component {
className="color-grey-6 fr font-15 mt3">返回</Link>
{prev_challenge === undefined ? "" :
<a href={prev_challenge} className="fr color-blue mr15 mt4">上一关</a>
<Link to={prev_challenge} className="fr color-blue mr15 mt4">上一关</Link>
}
{next_challenge === undefined ? "" :
<a href={next_challenge} className="fr color-blue mr15 mt4">下一关</a>
<Link to={next_challenge} className="fr color-blue mr15 mt4">下一关</Link>
}
<Link to={practice_url === undefined ? "" : practice_url}
<a href={practice_url === undefined ? "" : practice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.status===2||this.props.status===1?'none':'block'}}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</Link>
<Link to={choice_url === undefined ? "" : choice_url}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</a>
<a href={choice_url === undefined ? "" : choice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.status===2||this.props.status===1?'none':'block'}}
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</Link>
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</a>
</div>

@ -429,10 +429,10 @@ export default class TPMchallengesnew extends Component {
<Link to={go_back_url === undefined ? "" : go_back_url}
className="color-grey-6 fr font-15 mt3">返回</Link>
{ next_challenge===undefined?"":
<a href={next_challenge}className="fr color-blue mr15 mt4">下一关</a>
<Link to={next_challenge}className="fr color-blue mr15 mt4">下一关</Link>
}
{ prev_challenge===undefined?"":
<a href={prev_challenge} className="fr color-blue mr15 mt4">上一关</a>
<Link to={prev_challenge} className="fr color-blue mr15 mt4">上一关</Link>
}

@ -824,21 +824,21 @@ export default class TPMevaluation extends Component {
className="color-grey-6 fr font-15 mt3">返回</Link>
{prev_challenge === undefined ? "" :
<a href={prev_challenge} className="fr color-blue mr15 mt4">上一关</a>
<Link to={prev_challenge} className="fr color-blue mr15 mt4">上一关</Link>
}
{next_challenge === undefined ? "" :
<a href={next_challenge} className="fr color-blue mr15 mt4">下一关</a>
<Link to={next_challenge} className="fr color-blue mr15 mt4">下一关</Link>
}
<Link to={practice_url === undefined ? "" : practice_url}
<a href={practice_url === undefined ? "" : practice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.identity>4||this.props.identity===undefined||this.props.status===2||this.props.status===1? "none":'block'}}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</Link>
<Link to={choice_url === undefined ? "" : choice_url}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</a>
<a href={choice_url === undefined ? "" : choice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.identity>4||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</Link>
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</a>
</div>

@ -936,11 +936,11 @@ export default class TPMquestion extends Component {
<Link to={go_back_url === undefined ? "" : go_back_url}
className="color-grey-6 fr font-15 mt3">返回</Link>
{ prev_challenge===undefined?"":
<a href={prev_challenge} className="fr color-blue mr15 mt4">上一关</a>
<Link to={prev_challenge} className="fr color-blue mr15 mt4">上一关</Link>
}
{ next_challenge===undefined?"":
<a href={next_challenge}className="fr color-blue mr15 mt4">下一关</a>
<Link to={next_challenge}className="fr color-blue mr15 mt4">下一关</Link>
}
<a href={practice_url === undefined ? "" : practice_url}

@ -22,7 +22,12 @@ class TPMNav extends Component {
// console.log("TPMNavTPMNavTPMNav");
// console.log(is_jupyter);
const is_teacher = this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:"";
const isfalse=true;
return (
isfalse?"":
<div className="bor-bottom-greyE clearfix pl20 pr20 pt40 pb20 edu-back-white challengeNav">
<Link
to={challengesPath}
@ -71,16 +76,8 @@ class TPMNav extends Component {
}
{this.props.identity >2||this.props.identity===undefined?"":
(this.props.is_jupyter === false?
<Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
:
<Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
)
}
{this.props.identity >4||this.props.identity===undefined ? "":<Link to={`/shixuns/${shixunId}/settings`} className="edu-default-btn edu-blueline-btn ml20 fr"

@ -1,205 +1,254 @@
import React, { Component } from 'react';
import React, {Component} from 'react';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import {BrowserRouter as Router, Route, Link} from "react-router-dom";
import axios from 'axios';
import { getImageUrl,} from "educoder";
import {getImageUrl,} from "educoder";
import './TPMright.css';
import {Icon,Tooltip} from 'antd';
import {Progress, Tooltip} from 'antd';
// import "antd/dist/antd.css";
class TPMRightSection extends Component {
constructor(props) {
super(props)
this.state = {
TPMRightSection:false,
clickNewsubscripttype:false
}
}
// componentDidMount() {
// let id=this.props.match.params.shixunId;
//
// let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
//
// axios.get(shixunsDetailsURL).then((response)=> {
// if(response.status===200){
// this.setState({
// TPMRightSectionData: response.data
// });
// }
// }).catch((error)=>{
// console.log(error)
// });
// }
// shouldComponentUpdate(nextProps, nextState) {
// return nextProps.TPMRightSectionData !== this.state.TPMRightSectionData
// }
clickNewsubscript=(val)=>{
if(val===0){
this.setState({
TPMRightSection:true,
clickNewsubscripttype:true
})
}else{
this.setState({
TPMRightSection:false,
clickNewsubscripttype:false
})
}
}
render() {
let {TPMRightSection,clickNewsubscripttype}=this.state;
let {TPMRightSectionData}=this.props
return (
<div>
{
TPMRightSectionData===undefined?"":
<div>
<div className="edu-back-white padding40-20 mb10">
<p className="font-16 mb20">创建者</p>
<div className="df">
<a href={TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":`/users/${TPMRightSectionData.creator.login}/courses`}>
<img alt="头像" className="radius mr10" height="80" src={getImageUrl(TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":'images/'+TPMRightSectionData.creator.image_url+"?1532489442")} width="80" />
</a>
<div className="flex1">
<p className="mb20">{TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":TPMRightSectionData.creator.name}</p>
<div className="clearfix">
<span>发布 {TPMRightSectionData.user_shixuns_count}</span>
{/*<span className="ml20">粉丝 <span id="user_h_fan_count">{TPMRightSectionData.fans_count}</span></span>*/}
{/* <a href="/watchers/unwatch?className=fr+user_watch_btn+edu-default-btn+edu-focus-btn&amp;object_id=3039&amp;object_type=user&amp;shixun_id=61&amp;target_id=3039" className="fr edu-default-btn user_watch_btn edu-focus-btn" data-method="post" data-remote="true" id="cancel_watch" rel="nofollow">取消关注</a> */}
</div>
</div>
</div>
</div>
{
TPMRightSectionData === undefined ? "" :TPMRightSectionData.tags===undefined?"": TPMRightSectionData.tags.length === 0 ? "" :
<div className="edu-back-white padding40-20 mb10 relative">
<p className="font-16 mb20">技能标签 <span className="color-grey-c">{TPMRightSectionData.tags.length}</span></p>
<div className={TPMRightSection===false?"newedbox newedboxheight":"newedbox newminheight"}>
<div className="clearfix" id="boxheight">
{ TPMRightSectionData.tags.map((item,key)=>{
return(
<span className={item.status===false?"newedu-filter-btn fl":"edu-filter-btn29BD8B fl"}
style={{display:item.tag_name===" "||item.tag_name===""?"none":""}}
key={key}>{item.tag_name}</span>
)})
}
</div>
</div>
<div className={TPMRightSectionData.tags.length>15&&clickNewsubscripttype===false?"newsubscript mb9 color-grey-9":"newsubscript mb9 color-grey-9 none"}
data-tip-down="显示全部"
onClick={()=>this.clickNewsubscript(0)}><span className="mr8">...</span><Icon type="caret-down" />
</div>
<div className={clickNewsubscripttype===false?"newsubscript mb9 color-grey-9 none":"newsubscript mb9 color-grey-9"}
data-tip-down="显示全部"
onClick={()=>this.clickNewsubscript(1)}><Icon type="caret-up" />
</div>
</div>
}
<div className="padding20 edu-back-white mb10 mt10" style={{
display: TPMRightSectionData === undefined?"none":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "none" : "block"
}}>
<p className="mb20 font-16 clearfix">所属课程</p>
<div className="recommend-list" >
{
TPMRightSectionData===undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.map((i,k)=>{
return(
<div className="recomments clearfix df" key={k}>
<a href={"/paths/"+i.id} height="96" width="128" target="_blank">
<img alt="实训" height="96" src={"/"+i.image_url} width="128" />
</a>
<div className="ml10 flex1">
<a href={"/paths/"+i.id} target="_blank" data-tip-down={i.name} className="color-grey-6 task-hide mb12 recomment-name">{i.name}</a>
<p className="clearfix mt8 font-12 color-grey-B4">
<Tooltip placement="bottom" title={"章节"}>
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-shixun fl mr3"></i>{i.stages_count}</span>
</Tooltip>
{/*<Tooltip placement="bottom" title={"经验值"}>*/}
{/*<span className="mr10 fl squareIconSpan"><i className="iconfont icon-jingyan fl mr3"></i>{i.score_count}</span>*/}
{/*</Tooltip>*/}
<Tooltip placement="bottom" title={"学习人数"}>
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-chengyuan fl mr3"></i>{i.members_count}</span>
</Tooltip>
</p>
</div>
</div>
)
})
}
</div>
</div>
{TPMRightSectionData === undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "" :
this.props.user&&this.props.user.main_site===true?<div className="padding20 edu-back-white"
style={{
display:
TPMRightSectionData === undefined?"none":TPMRightSectionData.recommands===undefined?"none":TPMRightSectionData.recommands.length === 0 ? "none" : "block"
}}
>
<p className="mb20 font-16 clearfix">推荐实训</p>
<div className="recommend-list">
{
TPMRightSectionData===undefined?"":TPMRightSectionData.recommands===undefined?"":TPMRightSectionData.recommands.map((item,key)=>{
return(
<div className="recomments clearfix df" key={key}>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">
<img alt="69?1526971094" height="96" src={"/"+item.pic} width="128"/>
</a>
<div className="ml10 flex1">
<Tooltip placement="bottom" title={item.name}>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a>
</Tooltip>
<p className="clearfix mt8 font-12 color-grey-B4">
{item.stu_num} 人学习
</p>
<p className="edu-txt-right color-orange pr10">{item.level}</p>
</div>
</div>
)
})
}
</div>
</div>:""
}
</div>
}
</div>
)
}
constructor(props) {
super(props)
this.state = {
TPMRightSection: false,
clickNewsubscripttype: false
}
}
// componentDidMount() {
// let id=this.props.match.params.shixunId;
//
// let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
//
// axios.get(shixunsDetailsURL).then((response)=> {
// if(response.status===200){
// this.setState({
// TPMRightSectionData: response.data
// });
// }
// }).catch((error)=>{
// console.log(error)
// });
// }
// shouldComponentUpdate(nextProps, nextState) {
// return nextProps.TPMRightSectionData !== this.state.TPMRightSectionData
// }
clickNewsubscript = (val) => {
if (val === 0) {
this.setState({
TPMRightSection: true,
clickNewsubscripttype: true
})
} else {
this.setState({
TPMRightSection: false,
clickNewsubscripttype: false
})
}
}
render() {
let {TPMRightSection, clickNewsubscripttype} = this.state;
let {TPMRightSectionData} = this.props
let Progresssum;
if(TPMRightSectionData&&TPMRightSectionData.complete_count!=null){
Progresssum=(parseInt(TPMRightSectionData&&TPMRightSectionData.complete_count) / parseInt(TPMRightSectionData&&TPMRightSectionData.challenge_count))*100;
}
return (
<div>
{
TPMRightSectionData === undefined ? "" :
<div>
<div className="edu-back-white pd302020zuoze mb10">
<p className="font-16 mb20"><i className={"iconfont icon-chuangjianzhe1 audit_situationactive font-14"}></i> </p>
<div className="df">
<a
href={TPMRightSectionData === undefined ? "" : TPMRightSectionData.creator === undefined ? "" : `/users/${TPMRightSectionData.creator.login}/courses`}>
<img alt="头像" className="radius mr10" height="36"
src={getImageUrl(TPMRightSectionData === undefined ? "" : TPMRightSectionData.creator === undefined ? "" : 'images/' + TPMRightSectionData.creator.image_url + "?1532489442")}
width="36"/>
</a>
<div className="flex1">
<div className="creatorname sortinxdirection space-between">
<div className={"creatornamelist"}>
{TPMRightSectionData === undefined ? "" : TPMRightSectionData.creator === undefined ? "" : TPMRightSectionData.creator.name}
</div>
<div className={"creatornamelist width80center"}>
{TPMRightSectionData.user_shixuns_count}
</div>
</div>
<div className="clearfix">
<span className={"fr color888hezuo"}>发布实训项目</span>
{/*<span className="ml20">粉丝 <span id="user_h_fan_count">{TPMRightSectionData.fans_count}</span></span>*/}
{/* <a href="/watchers/unwatch?className=fr+user_watch_btn+edu-default-btn+edu-focus-btn&amp;object_id=3039&amp;object_type=user&amp;shixun_id=61&amp;target_id=3039" className="fr edu-default-btn user_watch_btn edu-focus-btn" data-method="post" data-remote="true" id="cancel_watch" rel="nofollow">取消关注</a> */}
</div>
</div>
</div>
</div>
{TPMRightSectionData&&TPMRightSectionData.complete_count!=null?<div className="edu-back-white padd252020px relative borderbottomf4">
<div className="font-16 mb5">
<span><i className={"iconfont icon-jilu1 audit_situationactive font-14"}></i> </span>
<span className={"sortinxdirection space-between fr"}>
<span className="color888hezuo font-12">已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count} / {TPMRightSectionData&&TPMRightSectionData.challenge_count} </span>
</span>
</div>
<Progress percent={Progresssum} showInfo={false} status="active" strokeColor={{
'0%': '#29BD8B',
'100%': '#29BD8B',
}} />
</div>:""}
{
TPMRightSectionData === undefined ? "" : TPMRightSectionData.tags === undefined ? "" : TPMRightSectionData.tags.length === 0 ? "" :
<div className="edu-back-white padd252020px mb10 relative">
<p className="font-16 mb20">
<span><i className={"iconfont icon-biaoqian2 audit_situationactive font-14"}></i> </span>
<span className={"sortinxdirection space-between fr"}>
<span className="color888hezuo font-12">已获得 {TPMRightSectionData&&TPMRightSectionData.user_tag_count} / {TPMRightSectionData&&TPMRightSectionData.tag_count} </span>
</span>
</p>
<div className={TPMRightSection === false ? "newedbox newedboxheight" : "newedbox newminheight"}>
<div className="clearfix" id="boxheight">
{TPMRightSectionData.tags.map((item, key) => {
return (
<span className={item.status === false ? "newedu-filter-btn fl" : "edu-filter-btn29BD8B fl"}
style={{display: item.tag_name === " " || item.tag_name === "" ? "none" : ""}}
key={key}>{item.tag_name}</span>
)
})
}
</div>
</div>
<div
className={TPMRightSectionData.tags.length > 15 && clickNewsubscripttype === false ? "textcenter color-grey-9 mt20 rightjinengs" : "none"}
onClick={() => this.clickNewsubscript(0)}>
<span className="mr8">
<div>
<p className={"font-12"}>展开全部</p>
<p className={"font-12"}><i className={"iconfont icon-jiantou9 font-12"}></i></p>
</div>
</span>
</div>
<div className={clickNewsubscripttype === false ? "none" : "textcenter mt20 color-grey-9 rightjinengs"}
onClick={() => this.clickNewsubscript(1)}>
<span className="mr8">
<div>
<p className={"font-12"}><i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-12"}></i></p>
<p className={"font-12"}>收起全部</p>
</div>
</span>
</div>
</div>
}
<div className="padding20 edu-back-white mb10 mt10" style={{
display: TPMRightSectionData === undefined ? "none" : TPMRightSectionData.paths === undefined ? "" : TPMRightSectionData.paths.length === 0 ? "none" : "block"
}}>
<p className="mb20 font-16 clearfix"><i className={"iconfont icon-shu1 audit_situationactive font-14"}></i> </p>
<div className="recommend-list">
{
TPMRightSectionData === undefined ? "" : TPMRightSectionData.paths === undefined ? "" : TPMRightSectionData.paths.map((i, k) => {
return (
<div className="recomments clearfix df" key={k}>
<a href={"/paths/" + i.id} height="96" width="128" target="_blank">
<img alt="实训" height="96" src={"/" + i.image_url} width="128"/>
</a>
<div className="ml10 flex1">
<a href={"/paths/" + i.id} target="_blank" data-tip-down={i.name}
className="color-grey-6 task-hide mb12 recomment-name">{i.name}</a>
<p className="clearfix mt8 font-12 color-grey-B4">
<Tooltip placement="bottom" title={"章节"}>
<span className="mr10 fl squareIconSpan"><i
className="iconfont icon-shixun fl mr3"></i>{i.stages_count}</span>
</Tooltip>
{/*<Tooltip placement="bottom" title={"经验值"}>*/}
{/*<span className="mr10 fl squareIconSpan"><i className="iconfont icon-jingyan fl mr3"></i>{i.score_count}</span>*/}
{/*</Tooltip>*/}
<Tooltip placement="bottom" title={"学习人数"}>
<span className="mr10 fl squareIconSpan"><i
className="iconfont icon-chengyuan fl mr3"></i>{i.members_count}</span>
</Tooltip>
</p>
</div>
</div>
)
})
}
</div>
</div>
{TPMRightSectionData === undefined ? "" : TPMRightSectionData.paths === undefined ? "" : TPMRightSectionData.paths.length === 0 ? "" :
this.props.user && this.props.user.main_site === true ? <div className="padding20 edu-back-white"
style={{
display:
TPMRightSectionData === undefined ? "none" : TPMRightSectionData.recommands === undefined ? "none" : TPMRightSectionData.recommands.length === 0 ? "none" : "block"
}}
>
<p className="mb20 font-16 clearfix"><i className={"iconfont icon-tuijian audit_situationactive font-14"}></i> </p>
<div className="recommend-list">
{
TPMRightSectionData === undefined ? "" : TPMRightSectionData.recommands === undefined ? "" : TPMRightSectionData.recommands.map((item, key) => {
return (
<div className="recomments clearfix df" key={key}>
<a href={"/shixuns/" + item.identifier + "/challenges"} target="_blank">
<img alt="69?1526971094" height="96" src={"/" + item.pic} width="128"/>
</a>
<div className="ml10 flex1">
<Tooltip placement="bottom" title={item.name}>
<a href={"/shixuns/" + item.identifier + "/challenges"} target="_blank"
className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a>
</Tooltip>
<p className="clearfix mt8 font-12 color-grey-B4">
{item.stu_num} 人学习
</p>
<p className="edu-txt-right color-orange pr10">{item.level}</p>
</div>
</div>
)
})
}
</div>
</div> : ""
}
</div>
}
</div>
)
}
}
export default TPMRightSection;

@ -1,5 +1,5 @@
/*bæ°æ ‡ç­¾*/
.newedu-filter-btn{
.newedu-filter-btn {
display: block;
float: left;
padding: 0 9px;
@ -11,24 +11,28 @@
margin-right: 10px;
margin-bottom: 9px;
}
.newedbox{
.newedbox {
/*flex-wrap: wrap;*/
/*display: -webkit-flex; !* Safari *!*/
/*display: flex;*/
width: 360px;
position:relative;
position: relative;
overflow: hidden;
}
.newsubscript{
.newsubscript {
position: absolute;
right: 23px;
bottom: 16px;
cursor: pointer;
}
.newsubscript:hover{
color:deepskyblue;
.newsubscript:hover {
color: deepskyblue;
}
.edu-filter-btn29BD8B{
.edu-filter-btn29BD8B {
display: block;
float: left;
padding: 0 9px;
@ -40,40 +44,86 @@
margin-right: 10px;
margin-bottom: 9px;
}
.relative{
position:relative;
.relative {
position: relative;
}
.newedboxheight{
.newedboxheight {
max-height: 177px;
overflow-y: hidden;
}
.newminheight{
.newminheight {
/*max-height: 670px;*/
max-height: 300px;
overflow-y: auto;
}
.delSubentry{
font-size:7px;
font-family:MicrosoftYaHei;
font-weight:400;
color:rgba(76,172,255,1);
line-height:9px;
.delSubentry {
font-size: 7px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(76, 172, 255, 1);
line-height: 9px;
cursor: pointer;
}
.operationalter .delSubentry{
font-size:15px !important;
.operationalter .delSubentry {
font-size: 15px !important;
line-height: 25px;
}
/*临时的tpi关闭按é®æ ·å¼*/
.headerRight a {
color: #1a3f5f;
}
/*实训做成弹窗a标签样式调整*/
.-task-list-title a:link, .-task-list-title a:visited {color: #bcc6cd;}
.-task-list-title a:hover{
.-task-list-title a:link, .-task-list-title a:visited {
color: #bcc6cd;
}
.-task-list-title a:hover {
color: #459be5;
}
.headerLeft .-header-right{
.headerLeft .-header-right {
height: 32px;
}
.creatorname {
font-size: 16px;
color: rgba(51, 51, 51, 1);
}
.creatornamelist {
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.width80center {
width: 80px;
text-align: center;
}
.pd302020zuoze {
padding: 30px 20px 20px;
}
.textcenter{
text-align: center;
}
.padd252020px{
padding: 25px 20px 15px;
}
.rightjinengs{
height: 35px;
margin-top: 20px;
}
.borderbottomf4{
border-bottom:1px solid #F4F4F4;
}

@ -1,24 +1,18 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import { Link } from "react-router-dom";
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { getImageUrl ,markdownToHTML, configShareForCustom} from 'educoder'
import { getImageUrl ,markdownToHTML, configShareForCustom} from 'educoder';
import { CircularProgress } from 'material-ui/Progress';
import { Modal, Spin, Tooltip ,message,Icon} from 'antd';
import { Modal, Spin, Tooltip ,message,Icon,Button,Divider} from 'antd';
import axios from 'axios';
import 'antd/lib/pagination/style/index.css';
import '../shixunchildCss/Challenges.css'
import axios from 'axios';
import '../shixunchildCss/Challenges.css';
import AccountProfile from"../../../user/AccountProfile";
@ -39,6 +33,8 @@ class Challenges extends Component {
hidestartshixunsreplacevalue:"",
operationstrue:false,
isSpin:false,
boxoffsetHeigh:0,
opentitletype:true
}
}
@ -64,9 +60,32 @@ class Challenges extends Component {
}
componentDidMount() {
setTimeout(this.ChallengesList(), 1000);
this.ChallengesList()
}
componentDidUpdate = (prevProps,prevState) => {
//防止陷入无限循环
if(prevState.ChallengesDataList!=this.state.ChallengesDataList){
let boxoffsetHeigh;
let box=document.getElementById("shixunchallengesid");
if(box){
boxoffsetHeigh=box.offsetHeight
if(boxoffsetHeigh<260){
this.setState({
opentitletype:false,
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
boxoffsetHeigh:boxoffsetHeigh
})
}
}
}
}
updatamakedown = (id) => {
setTimeout(() => {
var shixunDescr = window.editormd.markdownToHTML(id, {
@ -301,6 +320,12 @@ class Challenges extends Component {
})
}
opentitle=()=>{
this.setState({
opentitletype:!this.state.opentitletype
})
}
render() {
let { ChallengesDataList, startbtns, sumidtype ,startshixunCombattype,shixunsreplace,shixunsmessage,hidestartshixunsreplacevalue,operationstrue,AccountProfiletype} = this.state;
let { loadingContent } = this.props;
@ -325,164 +350,224 @@ class Challenges extends Component {
display: 'block'
}} /> :
<div className="mt30 pl20 pr20">
<p className="clearfix mb20">
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/new"}
className="white-btn edu-greenline-btn fr addshixuns"
// data-tip-down="新增代码编辑类型任务"
>
<Tooltip placement="bottom" title={"新增代码编辑类型任务"}>
<img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt6" />
实践任务
</Tooltip>
</Link> : ""
}
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/newquestion"}
className="white-btn edu-greenline-btn fr mr20 addshixuns"
// data-tip-down="新增选择题类型任务"
>
<Tooltip placement="bottom" title={"新增选择题类型任务"}>
<img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt5" />
选择题任务
</Tooltip>
</Link> : ""
}
</p>
<p className="clearfix mb20">
<span className="font-16 fl">简介</span>
<Tooltip placement="bottom" title={"编辑"}>
<a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
</a>
</Tooltip>
<div>
{/*<p className="clearfix mb20">*/}
{/* {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?*/}
{/* <Link to={"/shixuns/" + id + "/challenges/new"}*/}
{/* className="white-btn edu-greenline-btn fr addshixuns"*/}
{/* // data-tip-down="新增代码编辑类型任务"*/}
{/* >*/}
{/* <Tooltip placement="bottom" title={"新增代码编辑类型任务"}>*/}
{/* <img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}*/}
{/* className="fl mr5 mt6" />*/}
{/* 实践任务*/}
{/* </Tooltip>*/}
{/* </Link> : ""*/}
{/* }*/}
{/* {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?*/}
{/* <Link to={"/shixuns/" + id + "/challenges/newquestion"}*/}
{/* className="white-btn edu-greenline-btn fr mr20 addshixuns"*/}
{/* // data-tip-down="新增选择题类型任务"*/}
{/* >*/}
{/* <Tooltip placement="bottom" title={"新增选择题类型任务"}>*/}
{/* <img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}*/}
{/* className="fl mr5 mt5" />*/}
{/* 选择题任务*/}
{/* </Tooltip>*/}
{/* </Link> : ""*/}
{/* }*/}
{/*</p>*/}
<style>
{
`
.task-item{
margin-bottom: 20px;
padding-bottom: 20px;
margin-top: 10px;
}
`
}
</style>
<p className="clearfix mb20 edu-back-white">
<div className={"shixunjianjie"}>
<span className="font-16 fl">简介</span>
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ?
<Link to={"/shixuns/" + id + "/settings"} className="fr color-blue font-14">
{/*<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />*/}
编辑
</Link>:""}
{this.props.user && this.props.user.main_site === true ?
this.props.identity < 5?<a className="fr font-14 color-blue mr20" href="/forums/2943"
target="_blank">实训制作指南</a> : "":""}
</div>
{this.state.opentitletype===true?<style>
{
`
#shixunchallengesid{
max-height: 260px;
overflow: hidden;
}
`
}
</style>:""}
<div>
<div className={"pd20"} id={"shixunchallengesid"}>
<style>
{
`
.editormd-html-preview, .editormd-preview-container {
width: 100% !important;
}
`
}
</style>
<div className="justify break_full_word new_li "
id="challenge_editorMd_description">
<p id="ReactMarkdown" style={{overflow:'hidden'}}>
{ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"":
<div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML(ChallengesDataList.description).replace(/▁/g,"▁▁▁")}}></div>
}
</p>
</div>
</div>
{this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a>
</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>收起全文 <i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-14"}></i></a>
</Divider>}
</div>
</p>
<div className="justify break_full_word new_li "
id="challenge_editorMd_description">
<p id="ReactMarkdown" style={{overflow:'hidden'}}>
{ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"":
<div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML(ChallengesDataList.description).replace(/▁/g,"▁▁▁")}}></div>
<div className={"shixunjianjiecballenges edu-back-white"}>
<span className="font-16 fl">全部任务</span>
<span className="fr mt5">
{/* <img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt6" />*/}
{/*<Tooltip placement="bottom" title={"新增代码编辑类型任务"}>*/}
{/* </Tooltip>*/}
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/new"}
className="fr"
// data-tip-down="新增代码编辑类型任务"
>
<Button type="primary"
className="edu-default-btn edu-greenback-btn"
>新增实践任务</Button>
</Link> : ""
}
</p>
{/*
<span className="markdown-body" dangerouslySetInnerHTML={{__html: markdownToHTML(question_title)}}
style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px' }}></span>
*/}
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/newquestion"}
className="fr mr20"
// data-tip-down="新增选择题类型任务"
>
<Button type="primary"
className="edu-default-btn edu-greenback-btn"
>新增选择题任务</Button>
</Link> : ""
}
{/*<Tooltip placement="bottom" title={"新增选择题类型任务"}>*/}
{/* </Tooltip>*/}
{/* <img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt5" />*/}
</span>
</div>
<p className="clearfix mb10 mt20">
<span className="font-16 fl">全部任务</span>
{/*{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?*/}
{/*<Link to={"/shixuns/" + id + "/challenges/new"}*/}
{/*className="white-btn edu-greenline-btn fr addshixuns"*/}
{/*// data-tip-down="新增代码编辑类型任务"*/}
{/*>*/}
{/*<Tooltip placement="bottom" title={"新增代码编辑类型任务"}>*/}
{/*<img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}*/}
{/*className="fl mr5 mt6" />*/}
{/*实践任务*/}
{/*</Tooltip>*/}
{/*</Link> : ""*/}
{/*}*/}
{/*{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?*/}
{/*<Link to={"/shixuns/" + id + "/challenges/newquestion"}*/}
{/*className="white-btn edu-greenline-btn fr mr20 addshixuns"*/}
{/*// data-tip-down="新增选择题类型任务"*/}
{/*>*/}
{/*<Tooltip placement="bottom" title={"新增选择题类型任务"}>*/}
{/*<img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}*/}
{/*className="fl mr5 mt5" />*/}
{/*选择题任务*/}
{/*</Tooltip>*/}
{/*</Link> : ""*/}
{/*}*/}
</p>
<div className="alltask edu-back-white padding1020pxshixun">
<div className="alltask">
{ChallengesDataList === undefined ? <div className="alltask">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p>
{this.props.identity < 5?<img className="newedu-nodata-img mb20"
src={getImageUrl("images/educoder/shixunnodata.png")} />:<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />}
<p className="edu-nodata-p mb80">暂时还没有相关数据哦</p>
</div>
</div> : ChallengesDataList.challenge_list === undefined ?
<div className="alltask">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p>
{this.props.identity < 5?<img className="newedu-nodata-img mb20"
src={getImageUrl("images/educoder/shixunnodata.png")} />:<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />}
<p className="edu-nodata-p mb80">暂时还没有相关数据哦</p>
</div>
</div>
: ChallengesDataList.challenge_list.length === 0 ?
<div className="alltask">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p>
{this.props.identity < 5?<img className="newedu-nodata-img mb20"
src={getImageUrl("images/educoder/shixunnodata.png")} />:<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />}
<p className="edu-nodata-p mb80">暂时还没有相关数据哦</p>
</div>
</div>
: ChallengesDataList.challenge_list.map((item, key) => {
let newstatus = 2;
if(ChallengesDataList.challenge_list[key - 1]!=undefined){
newstatus=ChallengesDataList.challenge_list[key - 1].status;
}
return (
<div className="task-item" key={key} id={"shixun_index_" + item.position}>
<div className="clearfix mb5">
<div className="mr15 font-16 fl shixunstartbutton666666">{key+1}{item.st === 0 ?"实践题":"选择题"}
{/*<a className={"edu-default-btn edu-blueline-btn fr Finish_button mtf3"}*/}
{/* onClick={()=>this.startshixunCombat(false,undefined, item.challenge_id)}*/}
{/* // onClick={() => this.startshixunCombat(false)}*/}
{/* title={"查看挑战关卡"}*/}
{/*>已完成</a>*/}
{/*判断比较复杂 有排第一不能是灰色按钮*/}
{item.status === 2 ?
<Button type="primary" shape="round" size={"small"} className={"ml30 shixunstartbutton33BD8C"}>已完成</Button>
: ""
}
<div className="clearfix mb20">
<span className="fl ring-blue mr10 mt8">
{item.st === 0 ?
<Tooltip placement="bottom" title={"实训任务"}>
<img src={getImageUrl("images/educoder/icon/code.svg")} className="fl mt2 ml2" />
</Tooltip>
:
<Tooltip placement="bottom" title={"选择题任务"}>
<img src={getImageUrl("images/educoder/icon/choose.svg")} className="fl mt2 ml3" />
</Tooltip>
}
</span>
<span className="mr15 font-16 fl">{key+1}</span>
{/* <a className={"edu-default-btn edu-blueback-btn fr Finish_button"}
title={"直接挑战"}
style={{marginTop: '-2px'}}
onClick={()=>this.startshixunCombat(false,undefined, item.challenge_id)}
// onClick={() => this.startshixunCombat(false)}
>直接挑战</a> */}
{
ChallengesDataList.allow_skip === true && item.status === 1?
<Button type="primary" shape="round" size={"small"} className={"ml30 shixunstartbuttonFF6601"}>未完成</Button>
: ""
}
{this.props.identity<5?
item.st === 1 ?
<a onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editquestion")}
className="font-16 color05101a">{item.name}</a>
:
<a onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editcheckpoint")}
className="font-16 color05101a">{item.name}</a>:<span
// onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
className="font-16 color05101a">{item.name}</span>
}
{/* <Tooltip placement="bottom" title={""}>
<a className={"edu-default-btn edu-blueback-btn fr Finish_button"}
onClick={()=>this.startshixunCombat(false,undefined, item.challenge_id)}
style={{marginTop: '-2px'}}>直接挑战</a>
</Tooltip>
*/}
{
ChallengesDataList.allow_skip === false ? item.status === 1?
<Button type="primary" shape="round" size={"small"} className={"ml30 shixunstartbuttonFF6601"}>未完成</Button>
:"":""
<Modal
keyboard={false}
visible={startbtns}
closable={false}
footer={null}
className="startbtnModal"
>
<Spin size="large" />
</Modal>
<span className="fr mt8">
}
{/*<Tooltip placement="bottom" title={"请先完成前序关卡"}>*/}
{/* <a className={"edu-default-btn edu-greyback-btn fr Finish_button"}*/}
{/* // onClick={this.props.identity<5&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.challenge_id):""}*/}
{/* style={{marginTop: '-2px'}}>直接挑战</a>*/}
{/*</Tooltip>*/}
{
item.status === 0 ?
<Button type="primary" shape="round" size={"small"} className={"ml30 shixunstartbuttonFF6601"}>未完成</Button>
:""
}
</div>
<span className="fr">
{item.delete_url != undefined &&
<Tooltip placement="bottom" title={"删除"}>
<a onClick={() => this.delOperations(item.challenge_id)}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/close.svg")}
className="fl mt5 ml5" />
className="fl mr25">
{/*<img src={getImageUrl("images/educoder/icon/close.svg")}*/}
{/* className="fl mt5 ml5" />*/}
<i className={"iconfont icon-shanchu_Hover"}></i>
</a>
</Tooltip>
}
@ -492,9 +577,10 @@ class Challenges extends Component {
<Tooltip placement="bottom" title={"向上移动"}>
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "up")}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/moveup.svg")}
className="fl mt2 ml4" />
className="fl mr25">
{/*<img src={getImageUrl("images/educoder/icon/moveup.svg")}*/}
{/* className="fl mt2 ml4" />*/}
<i className={"iconfont icon-shangyi_Hover"}></i>
</a>
</Tooltip>
}
@ -502,8 +588,9 @@ class Challenges extends Component {
<Tooltip placement="bottom" title={"向下移动"}>
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "down")}
style={{ display: this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }}
className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4" />
className="fl mr25">
{/*<img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4" />*/}
<i className={"iconfont icon-xiayi_Hover"}></i>
</a>
</Tooltip>
@ -512,78 +599,68 @@ class Challenges extends Component {
{
item.st === 1 ?
<Tooltip placement="bottom" title={"编辑"}>
<a
<Link
style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status< 3 ? "block" : 'none' }}
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editquestion"}
className="fl ring-green">
<img src={getImageUrl("images/educoder/icon/edit.svg")}
className="fl mt3 ml2" />
</a>
to={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editquestion"}
className="fl">
{/*<img src={getImageUrl("images/educoder/icon/edit.svg")}*/}
{/* className="fl mt3 ml2" />*/}
<i className={"iconfont icon-bianji_Hover"}></i>
</Link>
</Tooltip>
:
<Tooltip placement="bottom" title={"编辑"}>
<a
<Link
style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editcheckpoint"}
className="fl ring-green">
<img src={getImageUrl("images/educoder/icon/edit.svg")}
className="fl mt3 ml2" />
</a>
to={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editcheckpoint"}
className="fl">
{/*<img src={getImageUrl("images/educoder/icon/edit.svg")}*/}
{/* className="fl mt3 ml2" />*/}
<i className={"iconfont icon-bianji_Hover"}></i>
</Link>
</Tooltip>
}
</span>
</div>
<div className="clearfix pl28">
<span className="task-colspan"><span className={"color-orange"}>{item.passed_count}</span>&nbsp;</span>
<span
className="task-colspan"><span className={"color-orange"}>{item.playing_count}</span>&nbsp;</span>
<span className="task-colspan"><span>完成挑战可获得经验值&nbsp;<span className={"color-orange"}>{item.score}</span></span></span>
{/*判断比较复杂 有排第一不能是灰色按钮*/}
{item.status === 2 ?
<a className={"edu-default-btn edu-blueline-btn fr Finish_button mtf3"}
onClick={()=>this.startshixunCombat(false,undefined, item.challenge_id)}
// onClick={() => this.startshixunCombat(false)}
title={"查看挑战关卡"}
>已完成</a> : ""
}
{
ChallengesDataList.allow_skip === true && item.status === 1?
<a className={"edu-default-btn edu-blueback-btn fr Finish_button"}
title={"直接挑战"}
style={{marginTop: '-2px'}}
onClick={()=>this.startshixunCombat(false,undefined, item.challenge_id)}
// onClick={() => this.startshixunCombat(false)}
>直接挑战</a> : ""
}
{
ChallengesDataList.allow_skip === false ? item.status === 1?
<Tooltip placement="bottom" title={"直接挑战"}>
<a className={"edu-default-btn edu-blueback-btn fr Finish_button"}
onClick={()=>this.startshixunCombat(false,undefined, item.challenge_id)}
style={{marginTop: '-2px'}}>直接挑战</a>
</Tooltip>:"":""
}
{
item.status === 0 ?
<Tooltip placement="bottom" title={"请先完成前序关卡"}>
<a className={"edu-default-btn edu-greyback-btn fr Finish_button"}
// onClick={this.props.identity<5&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.challenge_id):""}
style={{marginTop: '-2px'}}>直接挑战</a>
</Tooltip>:""
<div className="clearfix mb5">
{/*onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editquestion")}*/}
{this.props.identity<5?
item.st === 1 ?
<div className="font-16 color05101a fonthiddens">{item.name}</div>
:
<div className="font-16 color05101a fonthiddens">{item.name}</div>:<div
// onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
className="font-16 color05101a fonthiddens">{item.name}</div>
}
{/* onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editcheckpoint")}*/}
<Modal
keyboard={false}
visible={startbtns}
closable={false}
footer={null}
className="startbtnModal"
>
<Spin size="large" />
</Modal>
</div>
<div className="clearfix">
<style>
{
`
.task-colspan {
min-width: 20% !important;
}
`
}
</style>
<span className="task-colspan"><span className={"shixunbingbaocun12"}>正在挑战 </span><span className={"shixunbingbaocun33312"}>{item.playing_count}</span></span>
<span className="task-colspan"><span className={"shixunbingbaocun12"}>完成挑战 </span><span className={"shixunbingbaocun33312"}>{item.passed_count}</span></span>
<span className="task-colspan"><span className={"shixunbingbaocun12"}>可获经验 </span><span className={"shixunbingbaocun33312"}>{item.score}</span></span>
</div>
</div>

@ -1,25 +1,11 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { getImageUrl ,markdownToHTML, configShareForCustom} from 'educoder'
import { CircularProgress } from 'material-ui/Progress';
import { Modal, Spin, Tooltip ,message,Icon} from 'antd';
import { Link } from "react-router-dom";
import { markdownToHTML, configShareForCustom} from 'educoder'
import { Divider, Tooltip } from 'antd';
import LoadingSpin from '../../../../common/LoadingSpin';
import 'antd/lib/pagination/style/index.css';
import '../shixunchildCss/Challenges.css'
import ReactDOM from 'react-dom';
import '../shixunchildCss/Challenges.css';
import axios from 'axios';
import AccountProfile from"../../../user/AccountProfile";
const $ = window.$;
@ -36,6 +22,8 @@ class Challengesjupyter extends Component {
username:"",
booljupyterurls:false,
loading:false,
boxoffsetHeigh:0,
opentitletype:true
}
}
@ -59,7 +47,29 @@ class Challengesjupyter extends Component {
//console.log(error)
});
}
componentDidUpdate = (prevProps,prevState) => {
//防止陷入无限循环
if(prevState.ChallengesDataList!=this.state.ChallengesDataList){
let boxoffsetHeigh;
let box=document.getElementById("shixunchallengesid");
if(box){
boxoffsetHeigh=box.offsetHeight
if(boxoffsetHeigh<260){
this.setState({
opentitletype:false,
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
boxoffsetHeigh:boxoffsetHeigh
})
}
}
}
}
componentDidMount() {
setTimeout(this.ChallengesList(), 1000);
let id = this.props.match.params.shixunId;
@ -178,6 +188,11 @@ class Challengesjupyter extends Component {
})
}
opentitle=()=>{
this.setState({
opentitletype:!this.state.opentitletype
})
}
render() {
@ -199,42 +214,62 @@ class Challengesjupyter extends Component {
return (
<React.Fragment>
<div className="mt30 pl20 pr20" >
<p className="clearfix mb20">
<span className="font-16 fl">简介</span>
<Tooltip placement="bottom" title={"编辑"}>
<a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
</a>
</Tooltip>
</p>
<div className="justify break_full_word new_li "
id="challenge_editorMd_description">
<p id="ReactMarkdown" style={{overflow:'hidden'}}>
{ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"":
<div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML(ChallengesDataList.description).replace(/▁/g,"▁▁▁")}}></div>
<div className="">
<p className="clearfix mb20 edu-back-white">
<div className={"shixunjianjie"}>
<span className="font-16 fl">简介</span>
<Tooltip placement="bottom" title={"编辑"}>
<Link style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
to={"/shixuns/" + id + "/settings?edit=1"} className="fr color-blue font-14">
编辑
</Link>
</Tooltip>
</div>
{this.state.opentitletype===true?<style>
{
`
#shixunchallengesid{
max-height: 260px;
overflow: hidden;
}
`
}
</p>
{
booljupyterurls===true?
(
this.state.jupyter_url === null?
<div className="mt50 intermediatecenter juplbool">
<span className="icon iconfontysl icon-jiazaishibai1"></span>
<p className="intermediatecenter sortinxdirection mt5 juplboolp"><p className="colorbluetest">加载实训失败</p><p className="colorbluetwo" onClick={()=>this.updatamakedowns()}></p></p>
</div>
</style>:""}
<div>
<div className={"pd20"} id={"shixunchallengesid"}>
<p id="ReactMarkdown" style={{overflow:'hidden'}}>
{ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"":
<div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML(ChallengesDataList.description).replace(/▁/g,"▁▁▁")}}></div>
}
</p>
{
booljupyterurls===true?
(
this.state.jupyter_url === null?
<div className="mt50 intermediatecenter juplbool">
<span className="icon iconfontysl icon-jiazaishibai1"></span>
<p className="intermediatecenter sortinxdirection mt5 juplboolp"><p className="colorbluetest">加载实训失败</p><p className="colorbluetwo" onClick={()=>this.updatamakedowns()}></p></p>
</div>
:""
)
:""
)
:""
}
}
</div>
{this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a>
</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>收起全文 <i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-14"}></i></a>
</Divider>}
</div>
</p>
<div className="justify break_full_word new_li edu-back-white"
id="challenge_editorMd_description">
<style>
{
`
@ -265,7 +300,7 @@ class Challengesjupyter extends Component {
:
(
admin===true||business===true||mysidentity===true?
<div className="sortinxdirection mt60">
<div className={"shixunjianjiecballenges edu-back-white sortinxdirection mt20"}>
<div className="renwuxiangssi sortinxdirection">
<div><p className="renwuxiangqdiv">任务详情</p></div>
<div><p className="renwuxiangqdivtest ml1 shixunbingbaocun">请将实训题目写在下方并保存</p></div>
@ -308,7 +343,7 @@ class Challengesjupyter extends Component {
</style>
{
admin===true||business===true||mysidentity===true?
<div className="mt35">
<div>
<div className="pb47">
{
this.state.jupyter_url===null || this.state.jupyter_url===undefined?

@ -134,3 +134,54 @@
border-right: 1px solid #eeeeee;
border-bottom: 1px solid #eeeeee;
}
.space-between{
justify-content:space-between
}
.heighthezuo34{
height:34px;
line-height: 34px;
}
.hezuozhe630{
width: 630px;
}
.hezuozhe634{
width: 634px;
}
.color333hezuo{
color:#333333;
}
.color888hezuo{
color:#888888;
}
.newyslusercjz{
display: inline-block;
position: absolute;
bottom: 0px;
left: -18px;
width: 44px;
height: 18px;
border-radius: 13px;
background: #F38B03;
color: #fff;
}
.newyslusercjztest{
width: 45px;
height: 29px;
font-size: 10px;
color: #fff;
line-height: 18px;
text-align: center;
}
.fontnewreds{
color: rgb(255, 85, 85);
}
.fontneweees {
color: #BBBBBB;
}

@ -79,15 +79,27 @@ class Propaedeutics extends Component {
<React.Fragment>
<p className="clearfix mb10 pl20 pr20" style={{display:this.props.identity<5&&this.props.status<3?"block":'none'}} >
<Tooltip placement="bottom" title={"编辑"}>
<a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a>
<Link to={"/shixuns/"+shixunId +"/update_propaedeutics"} className="fr audit_situationactive mt20" id="edit_propaedeutics">
{/*<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />*/}
编辑
</Link>
</Tooltip>
</p>
<style>
{
`
.editormd-html-preview, .editormd-preview-container {
width:100% !important;
}
`
}
</style>
{
loadingContent ?
<CircularProgress size={40} thickness={3}
style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '200px', display: 'block' }}/> :
<div className="pl20" id="collaborators_list_info" style={{display: 'none',minHeight: '640px',padding:'10px'}}>
<div id="collaborators_list_info" style={{display: 'none',minHeight: '640px',padding:'20px 30px 30px 30px'}}>
{PropaedeuticsListcontent===undefined?"":
<p id="ReactMarkdown">

@ -135,6 +135,9 @@ class RepositoryAddFile extends Component {
.breadcrumb .ant-breadcrumb-separator{
margin:0px 2px;
}
.backgroudwhite{
display:none;
}
/*.filecode .CodeMirror.cm-s-railscasts{
border:1px solid #E5E5E5;
}

@ -103,3 +103,86 @@
position: absolute;
bottom: 21px;
}
.shixunjianjie{
height: 76px;
line-height: 35px;
padding: 20px;
border-bottom: 1px solid #eeee;
/*margin-bottom: 10px;*/
}
.pd20{
padding:20px;
}
.shixunbingbaocun12{
font-size:12px;
color:#888888;
}
.shixunbingbaocun33312{
font-size:12px;
color:#333333
}
.shixunjianjiecballenges{
height: 76px;
line-height: 35px;
padding: 20px;
border-bottom: 1px solid #eeee;
}
.padding1020pxshixun{
padding: 10px 20px 0px 20px;
}
.shixunstartbutton33BD8C{
background: #33BD8C !important;
border: #33BD8C !important;
}
.shixunstartbuttonFF6601{
background: #FF6601 !important;
border: #FF6601 !important;
}
.shixunstartbutton666666{
font-size:14px;
color:#666666;
}
.newedu-nodata-img{
width: 300px;
margin: 50px 0px;
display: block;
margin-left: 41%;
}
.fonthiddens{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.icon-bianji_Hover,.icon-xiayi_Hover,.icon-shangyi_Hover,.icon-shanchu_Hover{
color:#BBBBBB !important;
}
.icon-bianji_Hover:hover{
color: rgb(80, 145, 255) !important;
}
.icon-xiayi_Hover:hover{
color: rgb(51, 189, 140) !important;
}
.icon-shangyi_Hover:hover{
color: rgb(51, 189, 140) !important;
}
.icon-shanchu_Hover:hover{
color:rgb(255, 85, 85) !important;
}

@ -79,9 +79,18 @@ class ShixunCard extends Component {
</div>:""}
<div className="mt10 mb20 clearfix"
<div className="mb20 clearfix"
// style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "none" : "block"}}
>
<style>
{
`
.square-list{
margin-top:5px;
}
`
}
</style>
<div className="shixun_list_content">
<div className="square-list clearfix">
{middleshixundata === undefined || middleshixundata.length === 0?" ":middleshixundata.map((item,key)=>{

@ -160,8 +160,42 @@ class ShixunCardList extends Component {
this.props.Shixunsupcircles("asc")
}
}
//头部获取是否已经登录了
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!==""){
window.location.href = url;
}
}
render(){
let {mine,InputValue,upcircle}=this.state;
// console.log("NewHeadermygetHelmetapi123123123123");
let shixuntype=false;
if(this.props&&this.props.mygetHelmetapi!=null){
let shixun="/shixuns";
let paths="/paths";
let courses="/courses";
this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link);
if(shixun.match(reg)){
if(item.hidden===true){
shixuntype=true
}
}
})
}
return (
<div className="educontent mt20">
<div className="clearfix">
@ -184,7 +218,7 @@ class ShixunCardList extends Component {
id="hot"
onClick={(e)=>this.latestHot(e,3)}>最热
</div>
{shixuntype===true?"":<span className={ "fl font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/shixuns/new")}>+新建实训项目</span>}
{/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
{/*style={{display:upcircle===true?"block":"none"}}*/}

@ -394,6 +394,8 @@ class ShixunsIndex extends Component {
parsedid={parsedid}
newtag_level={newtag_level}
newpalce={newpalce}
{...this.props}
{...this.state}
/>
<ShixunCardList
@ -401,6 +403,7 @@ class ShixunsIndex extends Component {
ShixunsSwitch={this.ShixunsSwitch.bind(this)}
Shixunsupcircles={this.Shixunsupcircles.bind(this)}
allUpdatashixunlist={this.allUpdatashixunlist}
{...this.props}
{...this.state}
OnSearchInput={this.OnSearchInput.bind(this)}
/>

@ -157,3 +157,6 @@ a:active{text-decoration:none;}
color: #ffffff !important;
}
.forkNumst{display: block;float: left;width: 36px;text-align: center;border-left: 1px solid #ffffff !important;color: #ffffff!important; }
.mlbanner36{
margin-left: 36px;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -75,6 +75,13 @@
"unicode": "e6bc",
"unicode_decimal": 59068
},
{
"icon_id": "496400",
"name": "禁止",
"font_class": "jinzhi",
"unicode": "e6d4",
"unicode_decimal": 59092
},
{
"icon_id": "562997",
"name": "vs",
@ -180,6 +187,13 @@
"unicode": "e609",
"unicode_decimal": 58889
},
{
"icon_id": "978358",
"name": "浏览",
"font_class": "liulan",
"unicode": "e6c7",
"unicode_decimal": 59079
},
{
"icon_id": "986702",
"name": "路由",
@ -208,6 +222,13 @@
"unicode": "e66d",
"unicode_decimal": 58989
},
{
"icon_id": "1110411",
"name": "下箭头",
"font_class": "jiantou9",
"unicode": "e700",
"unicode_decimal": 59136
},
{
"icon_id": "1113422",
"name": "三角形-up",
@ -495,6 +516,13 @@
"unicode": "e694",
"unicode_decimal": 59028
},
{
"icon_id": "3315084",
"name": "博客园",
"font_class": "bokeyuan",
"unicode": "e6c6",
"unicode_decimal": 59078
},
{
"icon_id": "3330922",
"name": "base",
@ -579,6 +607,13 @@
"unicode": "e67d",
"unicode_decimal": 59005
},
{
"icon_id": "3911796",
"name": "SDK问题",
"font_class": "wenti",
"unicode": "e7dc",
"unicode_decimal": 59356
},
{
"icon_id": "4019861",
"name": "银行卡",
@ -1377,6 +1412,13 @@
"unicode": "e68c",
"unicode_decimal": 59020
},
{
"icon_id": "7501072",
"name": "评论",
"font_class": "pinglun",
"unicode": "e6c8",
"unicode_decimal": 59080
},
{
"icon_id": "7587940",
"name": "工程",
@ -1398,6 +1440,13 @@
"unicode": "e604",
"unicode_decimal": 58884
},
{
"icon_id": "8349119",
"name": "上箭头-填充",
"font_class": "shangjiantou-tianchong",
"unicode": "e733",
"unicode_decimal": 59187
},
{
"icon_id": "8361866",
"name": "主页",
@ -1447,6 +1496,13 @@
"unicode": "e6a1",
"unicode_decimal": 59041
},
{
"icon_id": "9974429",
"name": "省略号",
"font_class": "shenglvehao",
"unicode": "e708",
"unicode_decimal": 59144
},
{
"icon_id": "9977539",
"name": "排序",
@ -1552,6 +1608,13 @@
"unicode": "e6b7",
"unicode_decimal": 59063
},
{
"icon_id": "10809887",
"name": "向上 箭头",
"font_class": "changyongtubiao-xianxingdaochu-zhuanqu-",
"unicode": "e74c",
"unicode_decimal": 59212
},
{
"icon_id": "11222372",
"name": "healthmode",
@ -1593,6 +1656,370 @@
"font_class": "projectx",
"unicode": "e6c4",
"unicode_decimal": 59076
},
{
"icon_id": "11965901",
"name": "绑定手机号",
"font_class": "bangdingshoujihao",
"unicode": "e6ca",
"unicode_decimal": 59082
},
{
"icon_id": "12028723",
"name": "标签",
"font_class": "biaoqian1",
"unicode": "e6ce",
"unicode_decimal": 59086
},
{
"icon_id": "12028724",
"name": "记录",
"font_class": "jilu",
"unicode": "e6cf",
"unicode_decimal": 59087
},
{
"icon_id": "12028725",
"name": "书",
"font_class": "shu",
"unicode": "e6d0",
"unicode_decimal": 59088
},
{
"icon_id": "12028726",
"name": "推荐",
"font_class": "tuijian",
"unicode": "e6d1",
"unicode_decimal": 59089
},
{
"icon_id": "12028727",
"name": "创建者",
"font_class": "chuangjianzhe",
"unicode": "e6d2",
"unicode_decimal": 59090
},
{
"icon_id": "12029022",
"name": "创建者",
"font_class": "chuangjianzhe1",
"unicode": "e6da",
"unicode_decimal": 59098
},
{
"icon_id": "12029023",
"name": "书",
"font_class": "shu1",
"unicode": "e6dc",
"unicode_decimal": 59100
},
{
"icon_id": "12029024",
"name": "标签",
"font_class": "biaoqian2",
"unicode": "e6dd",
"unicode_decimal": 59101
},
{
"icon_id": "12029025",
"name": "记录",
"font_class": "jilu1",
"unicode": "e6de",
"unicode_decimal": 59102
},
{
"icon_id": "12029026",
"name": "推荐",
"font_class": "tuijian1",
"unicode": "e6df",
"unicode_decimal": 59103
},
{
"icon_id": "12031268",
"name": "警告",
"font_class": "jinggao1",
"unicode": "e6e0",
"unicode_decimal": 59104
},
{
"icon_id": "12031648",
"name": "点赞",
"font_class": "dianzan2",
"unicode": "e6e1",
"unicode_decimal": 59105
},
{
"icon_id": "12031742",
"name": "评论",
"font_class": "pinglun1",
"unicode": "e6e2",
"unicode_decimal": 59106
},
{
"icon_id": "12033031",
"name": "对勾",
"font_class": "duigou",
"unicode": "e6e3",
"unicode_decimal": 59107
},
{
"icon_id": "12039315",
"name": "提示",
"font_class": "tishi2",
"unicode": "e6e4",
"unicode_decimal": 59108
},
{
"icon_id": "12039523",
"name": "编辑_Hover",
"font_class": "bianji_Hover",
"unicode": "e6e5",
"unicode_decimal": 59109
},
{
"icon_id": "12039524",
"name": "上移_Hover",
"font_class": "shangyi_Hover",
"unicode": "e6e6",
"unicode_decimal": 59110
},
{
"icon_id": "12039525",
"name": "删除_默认",
"font_class": "shanchu_moren",
"unicode": "e6e7",
"unicode_decimal": 59111
},
{
"icon_id": "12039526",
"name": "下移_Hover",
"font_class": "xiayi_Hover",
"unicode": "e6e8",
"unicode_decimal": 59112
},
{
"icon_id": "12039527",
"name": "删除_Hover",
"font_class": "shanchu_Hover",
"unicode": "e6e9",
"unicode_decimal": 59113
},
{
"icon_id": "12039528",
"name": "下移_默认",
"font_class": "xiayi_moren",
"unicode": "e6ea",
"unicode_decimal": 59114
},
{
"icon_id": "12039529",
"name": "编辑_默认",
"font_class": "bianji_moren",
"unicode": "e6eb",
"unicode_decimal": 59115
},
{
"icon_id": "12040163",
"name": "恢复初始代码",
"font_class": "huifuchushidaima",
"unicode": "e6ec",
"unicode_decimal": 59116
},
{
"icon_id": "12040164",
"name": "再次载入",
"font_class": "zaicizairu",
"unicode": "e6ed",
"unicode_decimal": 59117
},
{
"icon_id": "12040165",
"name": "开关",
"font_class": "kaiguan",
"unicode": "e6ef",
"unicode_decimal": 59119
},
{
"icon_id": "12040167",
"name": "目录",
"font_class": "mulu",
"unicode": "e6f0",
"unicode_decimal": 59120
},
{
"icon_id": "12040168",
"name": "缩小",
"font_class": "suoxiao1",
"unicode": "e6f2",
"unicode_decimal": 59122
},
{
"icon_id": "12040169",
"name": "扩大",
"font_class": "kuoda",
"unicode": "e6f3",
"unicode_decimal": 59123
},
{
"icon_id": "12040170",
"name": "设置",
"font_class": "shezhi3",
"unicode": "e6f4",
"unicode_decimal": 59124
},
{
"icon_id": "12053135",
"name": "隐藏",
"font_class": "yincang2",
"unicode": "e6f5",
"unicode_decimal": 59125
},
{
"icon_id": "12074711",
"name": "消息",
"font_class": "xiaoxi11",
"unicode": "e6f6",
"unicode_decimal": 59126
},
{
"icon_id": "12098941",
"name": "金币",
"font_class": "bianzu1",
"unicode": "e6f7",
"unicode_decimal": 59127
},
{
"icon_id": "12107631",
"name": "显示密码",
"font_class": "xianshimima",
"unicode": "e6f9",
"unicode_decimal": 59129
},
{
"icon_id": "12107632",
"name": "隐藏密码",
"font_class": "yincangmima",
"unicode": "e6fa",
"unicode_decimal": 59130
},
{
"icon_id": "12107887",
"name": "复制",
"font_class": "fuzhi2",
"unicode": "e6fb",
"unicode_decimal": 59131
},
{
"icon_id": "12108608",
"name": "文件",
"font_class": "xingzhuangjiehe",
"unicode": "e6fc",
"unicode_decimal": 59132
},
{
"icon_id": "12108609",
"name": "文件夹",
"font_class": "xingzhuangjiehebeifen",
"unicode": "e6fd",
"unicode_decimal": 59133
},
{
"icon_id": "12108648",
"name": "上传",
"font_class": "shangchuan",
"unicode": "e6fe",
"unicode_decimal": 59134
},
{
"icon_id": "12126798",
"name": "挑战",
"font_class": "tiaozhan",
"unicode": "e6ff",
"unicode_decimal": 59135
},
{
"icon_id": "12126824",
"name": "完成",
"font_class": "wancheng1",
"unicode": "e6cb",
"unicode_decimal": 59083
},
{
"icon_id": "12300755",
"name": "企业账号",
"font_class": "qiyezhanghao",
"unicode": "e6cc",
"unicode_decimal": 59084
},
{
"icon_id": "12300756",
"name": "个人账号",
"font_class": "gerenzhanghao",
"unicode": "e6cd",
"unicode_decimal": 59085
},
{
"icon_id": "12300795",
"name": "右滑",
"font_class": "youhua",
"unicode": "e702",
"unicode_decimal": 59138
},
{
"icon_id": "12300843",
"name": "解锁",
"font_class": "jiesuo",
"unicode": "e703",
"unicode_decimal": 59139
},
{
"icon_id": "12300844",
"name": "锁",
"font_class": "suo1",
"unicode": "e704",
"unicode_decimal": 59140
},
{
"icon_id": "12301512",
"name": "加载失败",
"font_class": "jiazaishibai1",
"unicode": "e6d6",
"unicode_decimal": 59094
},
{
"icon_id": "12319671",
"name": "搜索",
"font_class": "bianzu11",
"unicode": "e706",
"unicode_decimal": 59142
},
{
"icon_id": "12345165",
"name": "类型",
"font_class": "leixing",
"unicode": "e6d5",
"unicode_decimal": 59093
},
{
"icon_id": "12345541",
"name": "标签尖头",
"font_class": "biaoqianjiantou",
"unicode": "e6d7",
"unicode_decimal": 59095
},
{
"icon_id": "12364938",
"name": "笔记",
"font_class": "biji",
"unicode": "e70a",
"unicode_decimal": 59146
},
{
"icon_id": "12371179",
"name": "置顶",
"font_class": "zhiding",
"unicode": "e6d9",
"unicode_decimal": 59097
}
]
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 362 KiB

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe CurriculumDirection, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe Curriculum, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe ItemAnalysis, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe ItemBank, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe ItemBasket, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe ItemChoice, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe KnowledgePointContainer, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe KnowledgePoint, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end
Loading…
Cancel
Save