diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index 324e5bde3..d1357d43f 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -125,8 +125,8 @@ class AccountsController < ApplicationController
set_autologin_cookie(user)
UserAction.create(:action_id => user.try(:id), :action_type => "Login", :user_id => user.try(:id), :ip => request.remote_ip)
- # 注册完成后有一天的试用申请
- UserDayCertification.create(user_id: user.id, status: 1)
+ # 注册完成后有一天的试用申请(先去掉)
+ # UserDayCertification.create(user_id: user.id, status: 1)
end
def set_autologin_cookie(user)
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index bf8a0651e..f01ad4b6b 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -185,21 +185,29 @@ class ApplicationController < ActionController::Base
render :json => { status: status, message: message }
end
- # 系统全局认证
- def check_auth
- day_cer = UserDayCertification.find_by(user_id: current_user.id)
- # 如果注册超过24小时则需要完善资料及授权
- if (Time.now.to_i - day_cer.try(:created_at).to_i) > 86400
- if !current_user.profile_completed?
- info_url = '/account/profile'
- tip_exception(402, info_url)
- elsif current_user.certification != 1
- if current_user.apply_actions.exists?(container_type: 'TrialAuthorization', status: 0)
- tip_exception(408, "您的试用申请正在审核中,请耐心等待")
- end
- tip_exception(407, "系统未授权")
- end
+ # 资料是否完善
+ def check_account
+ if !current_user.profile_completed?
+ info_url = '/account/profile'
+ tip_exception(402, info_url)
end
+ end
+
+ # 系统全局认证(暂时隐藏试用申请的判断)
+ def check_auth
+ # day_cer = UserDayCertification.find_by(user_id: current_user.id)
+ # # 如果注册超过24小时则需要完善资料及授权
+ # if (Time.now.to_i - day_cer.try(:created_at).to_i) > 86400
+ # if !current_user.profile_completed?
+ # info_url = '/account/profile'
+ # tip_exception(402, info_url)
+ # elsif current_user.certification != 1
+ # if current_user.apply_actions.exists?(container_type: 'TrialAuthorization', status: 0)
+ # tip_exception(408, "您的试用申请正在审核中,请耐心等待")
+ # end
+ # tip_exception(407, "系统未授权")
+ # end
+ # end
# if current_user.certification != 1 && current_user.apply_actions.exists?(container_type: 'TrialAuthorization', status: 0)
@@ -434,12 +442,18 @@ class ApplicationController < ActionController::Base
shixun.shixun_service_configs.each do |config|
mirror = config.mirror_repository
if mirror.name.present?
+ # 资源限制没有就传默认值。
+ cpu_limit = config.cpu_limit.presence || 1
+ cpu_request = config.lower_cpu_limit.presence || 0.1
+ memory_limit = config.memory_limit.presence || 1024
+ request_limit = config.resource_limit.presence || 10
+ resource_limit = config.resource_limit.presence || 10000
container << {:image => mirror.name,
- :cpuLimit => config.cpu_limit,
- :cpuRequest => config.lower_cpu_limit,
- :memoryLimit => "#{config.memory_limit}M",
- :memoryRequest => "#{config.request_limit}M",
- :resourceLimit => "#{config.resource_limit}K",
+ :cpuLimit => cpu_limit,
+ :cpuRequest => cpu_request,
+ :memoryLimit => "#{memory_limit}M",
+ :memoryRequest => "#{request_limit}M",
+ :resourceLimit => "#{resource_limit}K",
:type => mirror.try(:main_type) == "1" ? "main" : "sub"}
end
end
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index faad02173..bdb367111 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -13,6 +13,7 @@ class CoursesController < ApplicationController
before_action :require_login, except: [:index, :show, :students, :teachers, :board_list, :mine, :all_course_groups,
:left_banner, :top_banner]
+ before_action :check_account, only: [:new, :create, :apply_to_join_course]
before_action :check_auth, except: [:index, :show, :students, :teachers, :board_list, :mine, :all_course_groups,
:left_banner, :top_banner, :apply_to_join_course, :exit_course]
before_action :set_course, :user_course_identity, only: [:show, :update, :destroy, :settings, :set_invite_code_halt,
@@ -116,6 +117,7 @@ class CoursesController < ApplicationController
# GET /courses/new
def new
@course = Course.new
+ normal_status("成功")
end
# Get /courses/:id/settings
@@ -926,12 +928,12 @@ class CoursesController < ApplicationController
role = course_message.content == 2 ? '7' : '9' # 7:助教 9:教师
ApplyTeacherRoleJoinCourseNotifyJob.perform_later(current_user.id, course.id, role)
- teacher_role = 1
message = "#{course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核"
else
message = "#{existing_course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核"
end
end
+ teacher_role = 1
end
if teacher_role && current_user.student_of_course?(course)
@@ -1219,7 +1221,7 @@ class CoursesController < ApplicationController
@user_activity_level = []
course_user_level = []
course_activity_title = "课堂活跃度统计"
- user_cell_head = %w(排名 真实姓名 登录名 邮箱 学号 分班 作业完成数(*10) 试卷完成数(*10) 问卷完成数(*7) 资源发布数(*5) 帖子发布数(*2) 帖子回复数(*1) 作业回复数(*1) 活跃度)
+ user_cell_head = %w(排名 真实姓名 登录名 邮箱 学号 学校 分班 作业完成数(*10) 试卷完成数(*10) 问卷完成数(*7) 资源发布数(*5) 帖子发布数(*2) 帖子回复数(*1) 作业回复数(*1) 活跃度)
all_members.each do |u|
#用户的基本信息
user = u.user
@@ -1227,8 +1229,9 @@ class CoursesController < ApplicationController
user_name = user.real_name
user_mail = user.mail
user_stu_id = u.student_id.present? ? (u.student_id.to_s + "\t") : "--"
+ user_school = user.school_name
user_course_group = u.course_group_name
- user_info_array = [user_login,user_name,user_mail,user_stu_id,user_course_group] #用户的信息集合
+ user_info_array = [user_login,user_name,user_mail,user_stu_id,user_school,user_course_group] #用户的信息集合
user_work_scores = []
#课堂活跃度统计
@@ -1252,15 +1255,16 @@ class CoursesController < ApplicationController
u_2: user_login,
u_2_1: user_mail,
u_3: user_stu_id,
- u_4: user_course_group,
- u_5: c_works_num,
- u_6: c_exercise_num,
- u_7: c_poll_num,
- u_8: c_file_num,
- u_9: c_message_num,
- u_10: c_reply_num,
- u_11: user_work_reply_num,
- u_12: user_activity_levels
+ u_4: user_school,
+ u_5: user_course_group,
+ u_6: c_works_num,
+ u_7: c_exercise_num,
+ u_8: c_poll_num,
+ u_9: c_file_num,
+ u_10: c_message_num,
+ u_11: c_reply_num,
+ u_12: user_work_reply_num,
+ u_13: user_activity_levels
}
course_user_level.push(user_ac_level)
@@ -1370,7 +1374,7 @@ class CoursesController < ApplicationController
course_user_score_title = "学生总成绩"
score_title_cells = shixun_titles + common_titles + group_titles + task_titles + exercise_titles
score_title_counts = [shixun_titles.count,common_titles.count,group_titles.count,task_titles.count,exercise_titles.count]
- score_cell_head = %w(序号 真实姓名 登录名 邮箱 学号 分班) + score_title_cells + ["个人总成绩"]
+ score_cell_head = %w(序号 真实姓名 登录名 邮箱 学号 学校 分班) + score_title_cells + ["个人总成绩"]
@course_user_scores = [course_user_score_title,score_cell_head,score_title_counts,total_user_score_array]
#作业的全部集合
diff --git a/app/controllers/edu_settings_controller.rb b/app/controllers/edu_settings_controller.rb
index 0d80cbf3d..6baf38e5b 100644
--- a/app/controllers/edu_settings_controller.rb
+++ b/app/controllers/edu_settings_controller.rb
@@ -1,5 +1,5 @@
class EduSettingsController < ApplicationController
- # before_action :require_admin
+ before_action :require_admin
before_action :set_edu_setting, only: [:show, :edit, :update, :destroy]
# GET /edu_settings
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb
index a51dccb6f..b2de6dcad 100644
--- a/app/controllers/games_controller.rb
+++ b/app/controllers/games_controller.rb
@@ -37,7 +37,8 @@ class GamesController < ApplicationController
# 上一关、下一关
prev_game = @game.prev_of_current_game(@shixun.id, @game.myshixun_id, game_challenge.position)
- next_game = @game.next_of_current_game(@shixun.id, @game.myshixun_id, game_challenge.position)
+ #next_game = @game.next_of_current_game(@shixun.id, @game.myshixun_id, game_challenge.position)
+ next_game = user_next_game(@shixun, game_challenge, @game, @identity)
# 关卡点赞数, praise_or_tread = 1则表示赞过
praise_count = game_challenge.praises_count
@@ -962,4 +963,14 @@ class GamesController < ApplicationController
@identity = current_user.game_identity(@game)
raise Educoder::TipException.new(403, "..") if @identity > User::EDU_GAME_MANAGER
end
+ # identity用户身份
+ def user_next_game(shixun, challenge, game, identity)
+ next_game = game.next_of_current_game(shixun.id, game.myshixun_id, challenge.position)
+ # 实训允许跳关 、 当前关卡已经通关、 用户是已认证的老师以上权限的人,允许跳关
+ if shixun.task_pass || game.status == 2 || identity <= User::EDU_CERTIFICATION_TEACHER
+ next_game
+ else
+ nil
+ end
+ end
end
diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb
index f92ed8e2e..29f270a34 100644
--- a/app/controllers/homework_commons_controller.rb
+++ b/app/controllers/homework_commons_controller.rb
@@ -113,6 +113,15 @@ class HomeworkCommonsController < ApplicationController
else
if @user_course_identity == Course::STUDENT
@work = @homework.user_work(current_user.id)
+ # 学生访问列表时计算个人成绩
+ if @homework.homework_type == "practice"
+ myshixun = Myshixun.find_by(shixun_id: @shixun.id, user_id: current_user.id)
+ if @work && myshixun
+ challenge_settings = @homework.homework_challenge_settings
+ games = myshixun.games.where(challenge_id: challenge_settings.pluck(:challenge_id))
+ HomeworksService.new.update_myshixun_work_score @work, myshixun, games, @homework, challenge_settings
+ end
+ end
# 学生已提交作品且补交(提交)已截止、作品公开、非匿评阶段
if @work&.work_status.to_i > 0 && (@homework.work_public || @homework.score_open) &&
diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb
index cdeca4871..fa47fd7f6 100644
--- a/app/controllers/myshixuns_controller.rb
+++ b/app/controllers/myshixuns_controller.rb
@@ -7,9 +7,9 @@ class MyshixunsController < ApplicationController
## TPI关卡列表
def challenges
# @challenges = Challenge.where(shixun_id: params[:shixun_id])
-
- @shixun_status = @myshixun.shixun.status
+ @shixun = @myshixun.shixun
@games = @myshixun.games.includes(:challenge).reorder("challenges.position")
+ @identity = current_user.game_identity(@games.first)
end
@@ -42,7 +42,7 @@ class MyshixunsController < ApplicationController
if e.message != "ActiveRecord::RecordInvalid"
logger.error("######delete_repository_error:#{e.message}")
end
- raise ActiveRecord::Rollback
+ raise "delete_repository_error:#{e.message}"
end
end
diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb
index f5003a0c7..4348b3bfc 100644
--- a/app/controllers/polls_controller.rb
+++ b/app/controllers/polls_controller.rb
@@ -896,13 +896,31 @@ class PollsController < ApplicationController
def commit_poll
ActiveRecord::Base.transaction do
begin
- poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first
- poll_user_params = {
- :commit_status => 1,
- :end_at => Time.now
- }
- poll_user_current.update_attributes(poll_user_params)
- normal_status(0, "问卷提交成功!")
+ @poll_multi_questions = @poll.poll_questions.where(question_type:2).select(:id,:max_choices,:min_choices,:question_number)
+ error_question = []
+ @poll_multi_questions.each do |q|
+ poll_user_votes = current_user.poll_votes.where(poll_question_id:q.id)&.size
+ if q.max_choices.present? && (poll_user_votes > q.max_choices)
+ error_messages = "第#{q.question_number}题:超过最大选项限制"
+ elsif q.min_choices.present? && (poll_user_votes < q.min_choices)
+ error_messages = "第#{q.question_number}题:不得少于最小选项限制"
+ else
+ error_messages = nil
+ end
+ error_question.push(error_messages)
+ end
+ error_question = error_question.reject(&:blank?)
+ if error_question.reject(&:blank?).length > 0
+ normal_status(-1, "#{error_question.join(";")}")
+ else
+ poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first
+ poll_user_params = {
+ :commit_status => 1,
+ :end_at => Time.now
+ }
+ poll_user_current.update_attributes(poll_user_params)
+ normal_status(0, "问卷提交成功!")
+ end
## 需添加发送消息的接口,稍后添加
rescue Exception => e
uid_logger_error(e.message)
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index 99cee4185..1c272e02d 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -3,6 +3,8 @@ class ShixunsController < ApplicationController
include ApplicationHelper
before_action :require_login, :check_auth, except: [:download_file, :index, :menus]
+ before_action :check_account, only: [:new, :create, :shixun_exec]
+
before_action :check_auth, except: [:download_file, :index, :menus]
before_action :find_shixun, :shixun_access_allowed, except: [:index, :new, :create, :menus, :get_recommend_shixuns,
@@ -716,7 +718,7 @@ class ShixunsController < ApplicationController
logger.error("##########project_fork error #{e.message}")
@current_task.destroy!
end
- raise ActiveRecord::Rollback
+ raise "实训云平台繁忙(繁忙等级:81)"
end
end
end
diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb
index 5cbb2a462..bc5b0a607 100644
--- a/app/controllers/subjects_controller.rb
+++ b/app/controllers/subjects_controller.rb
@@ -1,6 +1,7 @@
class SubjectsController < ApplicationController
before_action :require_login, :check_auth, except: [:index]
# before_action :check_auth, except: [:index]
+ before_action :check_account, only: [:new, :create]
before_action :find_subject, except: [:index, :create, :new, :append_to_stage]
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish,
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report,
diff --git a/app/helpers/myshixuns_helper.rb b/app/helpers/myshixuns_helper.rb
index 650f32f40..2a487e361 100644
--- a/app/helpers/myshixuns_helper.rb
+++ b/app/helpers/myshixuns_helper.rb
@@ -1,2 +1,14 @@
module MyshixunsHelper
+
+ # 获取tpi的identifier,
+ # identity表示用户关卡的身份
+ # task_pass: 实训是否允许跳关
+ def get_game_identifier task_pass, game, game_identity
+ # 允许跳关、 关卡已经开启、 用户是已认证老师以上的身份
+ if task_pass || game.status != 3 || game_identity <= User::EDU_CERTIFICATION_TEACHER
+ game.identifier
+ else
+ nil
+ end
+ end
end
diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb
index ac64b92c1..9aa4a8fe1 100644
--- a/app/models/homework_common.rb
+++ b/app/models/homework_common.rb
@@ -35,7 +35,7 @@ class HomeworkCommon < ApplicationRecord
has_many :homework_review_results, :dependent => :destroy
validates :name, length: { maximum: 60 }
- validates :description, length: { maximum: 5000 }
+ validates :description, length: { maximum: 15000 }
validates :reference_answer, length: { maximum: 5000 }
# after_update :update_activity
diff --git a/app/models/shixun.rb b/app/models/shixun.rb
index e35f9f1a6..82f689e3f 100644
--- a/app/models/shixun.rb
+++ b/app/models/shixun.rb
@@ -4,6 +4,7 @@ class Shixun < ApplicationRecord
# status: 0:编辑 1:申请发布 2:正式发布 3:关闭 -1:软删除
# hide_code: 隐藏代码窗口
# code_hidden: 隐藏代码目录
+ # task_pass: 跳关
has_many :challenges, dependent: :destroy
has_many :challenge_tags, through: :challenges
has_many :myshixuns, :dependent => :destroy
diff --git a/app/views/courses/export_member_scores_excel.xlsx.axlsx b/app/views/courses/export_member_scores_excel.xlsx.axlsx
index 5b226a09c..db4f06ab1 100644
--- a/app/views/courses/export_member_scores_excel.xlsx.axlsx
+++ b/app/views/courses/export_member_scores_excel.xlsx.axlsx
@@ -59,18 +59,19 @@ wb.styles do |s|
sheet.merge_cells("D1:D2")
sheet.merge_cells("E1:E2")
sheet.merge_cells("F1:F2")
+ sheet.merge_cells("G1:G2")
sheet.merge_cells (Axlsx::cell_r(sheet_length-1,0) + ':' + Axlsx::cell_r(sheet_length-1,1)) #最后一行的合并
sheet_first = sheet.rows.first #第一行
sheet_second = sheet.rows.second #第二行
work_head_title = %w(实训作业 普通作业 分组作业 毕设任务 试卷)
(0..(sheet_length-1)).each do |i|
- if i <= 5 || i == sheet_length-1
+ if i <= 6 || i == sheet_length-1
sheet_first.cells[i].value = sheet_title[i]
else
sheet_second.cells[i].value = sheet_title[i]
end
end
- st_col = 6
+ st_col = 7
sheet_title_counts.each_with_index do |c,index|
end_col = (st_col + c - 1)
sheet.merge_cells sheet_first.cells[(st_col..end_col)]
diff --git a/app/views/courses/search_users.json.jbuilder b/app/views/courses/search_users.json.jbuilder
index d735de970..ac826fdf2 100644
--- a/app/views/courses/search_users.json.jbuilder
+++ b/app/views/courses/search_users.json.jbuilder
@@ -2,8 +2,8 @@ json.users do
json.array! @users do |user|
json.id user.id
json.name user.real_name
- json.student_id user.user_extension.try(:student_id)
- json.school_name user.user_extension.school.name
+ json.student_id user&.student_id
+ json.school_name user&.school_name
json.added @course.course_member?(user.id, 4)
end
end
diff --git a/app/views/myshixuns/challenges.json.jbuilder b/app/views/myshixuns/challenges.json.jbuilder
index 802c2b561..0be94d9fd 100644
--- a/app/views/myshixuns/challenges.json.jbuilder
+++ b/app/views/myshixuns/challenges.json.jbuilder
@@ -3,7 +3,7 @@ json.array! @games do |game|
json.partial! 'challenges/challenge', locals: { challenge: challenge }
json.status game.status
json.star game.star
- json.identifier game.identifier
- json.get_gold game.user_get_gold_and_experience(@shixun_status, challenge)[0]
- json.get_experience game.user_get_gold_and_experience(@shixun_status, challenge)[1]
+ json.identifier get_game_identifier(@shixun.task_pass, game, @identity)
+ json.get_gold game.user_get_gold_and_experience(@shixun.status, challenge)[0]
+ json.get_experience game.user_get_gold_and_experience(@shixun.status, challenge)[1]
end
\ No newline at end of file
diff --git a/app/views/users/get_user_info.json.jbuilder b/app/views/users/get_user_info.json.jbuilder
index 164c943d0..d9eb736ad 100644
--- a/app/views/users/get_user_info.json.jbuilder
+++ b/app/views/users/get_user_info.json.jbuilder
@@ -7,6 +7,7 @@ json.is_teacher @user.user_extension&.teacher?
json.user_identity @user.identity
json.tidding_count 0
json.user_phone_binded @user.phone.present?
+json.profile_completed @user.profile_completed?
if @course
json.course_identity @course_identity
json.course_name @course.name
diff --git a/db/migrate/20190726082937_add_is_md_for_homeworks.rb b/db/migrate/20190726082937_add_is_md_for_homeworks.rb
new file mode 100644
index 000000000..0b25dde97
--- /dev/null
+++ b/db/migrate/20190726082937_add_is_md_for_homeworks.rb
@@ -0,0 +1,12 @@
+class AddIsMdForHomeworks < ActiveRecord::Migration[5.2]
+ def change
+ # add_column :homework_commons, :is_md, :boolean, :default => true
+ # add_column :homework_banks, :is_md, :boolean, :default => true
+ #
+ #
+ # add_column :exercise_questions,:is_md, :boolean, :default => true
+ # add_column :poll_questions,:is_md, :boolean, :default => true
+ #
+ # add_column :exercise_bank_questions, :is_md, :boolean, :default => true
+ end
+end
diff --git a/db/migrate/20190726083814_migrate_course_is_md.rb b/db/migrate/20190726083814_migrate_course_is_md.rb
new file mode 100644
index 000000000..6988db14a
--- /dev/null
+++ b/db/migrate/20190726083814_migrate_course_is_md.rb
@@ -0,0 +1,14 @@
+class MigrateCourseIsMd < ActiveRecord::Migration[5.2]
+ def change
+ # HomeworkCommon.where(homework_type: [1, 3]).where("created_at < '2019-07-21 00:00:00'").update_all(is_md: false)
+ # HomeworkBank.where(homework_type: [1, 3]).where("created_at < '2019-07-21 00:00:00'").update_all(is_md: false)
+ #
+ # HomeworkCommon.where(homework_type: [1, 3]).where("created_at >= '2019-07-21 00:00:00' and homework_bank_id is not null").each do |homework|
+ #
+ # end
+ #
+ # ExerciseQuestion.where("created_at < '2019-07-21 00:00:00'").update_all(is_md: false)
+ # PollQuestion.where("created_at < '2019-07-21 00:00:00'").update_all(is_md: false)
+ # ExerciseBankQuestion.where("created_at < '2019-07-21 00:00:00'").update_all(is_md: false)
+ end
+end
diff --git a/public/react/src/App.js b/public/react/src/App.js
index 191b0f0c8..49dac07cd 100644
--- a/public/react/src/App.js
+++ b/public/react/src/App.js
@@ -18,6 +18,9 @@ import Notcompletedysl from './modules/user/Notcompletedysl';
import Trialapplicationysl from './modules/login/Trialapplicationysl';
import Trialapplicationreview from './modules/user/Trialapplicationreview';
import Addcourses from "./modules/courses/coursesPublic/Addcourses";
+import AccountProfile from"./modules/user/AccountProfile";
+
+
import Trialapplication from './modules/login/Trialapplication'
import NotFoundPage from './NotFoundPage'
@@ -278,6 +281,7 @@ class App extends Component {
{ + if (this.props.delay == true) { + (function(content, selector) { + // console.log('selector: ', selector) + setTimeout(() => { + markdownToHTML(content, selector) + }, 600) + })(content, selector) + } else { + markdownToHTML(content, selector) + } + } componentDidUpdate = (prevProps) => { if (this.props.content) { if ( prevProps.content != this.props.content ) { - markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`) + this._markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`) } } } componentDidMount () { - this.props.content && markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`) + this.props.content && this._markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`) } render(){ - + const { style, className } = this.props return( -
-
{topicId==undefined?"新建":"编辑"}毕设选题
- this.props.history.goBack()} className="color-grey-6 fr font-16">返回 -
+
{topicId==undefined?"新建":"编辑"}毕设选题
+ this.props.history.goBack()} className="color-grey-6 fr font-16">返回 +
-
-
+
{item.question.question_number}、{map[item.question.question_type]}
{ item.question.is_necessary==1 ? 必答:选答 }
- { item.question.question_type == 2 && item.question.min_choices && item.question.max_choice ?
+ { item.question.question_type == 2 && item.question.min_choices && item.question.max_choices ?
{
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
@@ -89,8 +89,8 @@ class PollDetailTabThird extends Component{
item.question.answers.map((index,k)=>{
return(
-