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

dev_ec
cxt 6 years ago
commit b1b9063256

@ -148,7 +148,7 @@ module ExercisesHelper
:choice_position => c.choice_position, :choice_position => c.choice_position,
:choice_text => c.choice_text, :choice_text => c.choice_text,
:choice_users_count => answer_users_count, :choice_users_count => answer_users_count,
:choice_percent => answer_percent.round(1).to_s, :choice_percent => answer_percent.round(2).to_s,
:right_answer => right_answer :right_answer => right_answer
} }
question_answer_infos.push(answer_option) question_answer_infos.push(answer_option)
@ -174,7 +174,7 @@ module ExercisesHelper
:choice_position => index+1, :choice_position => index+1,
:choice_text => s_choice_text, :choice_text => s_choice_text,
:choice_users_count => user_count, :choice_users_count => user_count,
:choice_percent => answer_percent.round(1).to_s, :choice_percent => answer_percent.round(2).to_s,
:right_answer => true :right_answer => true
} }
question_answer_infos.push(answer_option) question_answer_infos.push(answer_option)
@ -194,7 +194,7 @@ module ExercisesHelper
:choice_position => (standard_answer_count + 1), :choice_position => (standard_answer_count + 1),
:choice_text => "wrong", :choice_text => "wrong",
:choice_users_count => user_wrong_count, :choice_users_count => user_wrong_count,
:choice_percent => wrong_percent.round(1).to_s, :choice_percent => wrong_percent.round(2).to_s,
:right_answer => false :right_answer => false
} }
question_answer_infos.push(wrong_answer_position) question_answer_infos.push(wrong_answer_position)
@ -220,7 +220,7 @@ module ExercisesHelper
:choice_position => index+1, :choice_position => index+1,
:choice_text => index+1, :choice_text => index+1,
:choice_users_count => s, :choice_users_count => s,
:choice_percent => score_percent.round(1).to_s, :choice_percent => score_percent.round(2).to_s,
:right_answer => right_answer :right_answer => right_answer
} }
question_answer_infos.push(answer_option) question_answer_infos.push(answer_option)
@ -246,7 +246,7 @@ module ExercisesHelper
:choice_position => index+1, :choice_position => index+1,
:choice_text => index+1, :choice_text => index+1,
:choice_users_count => s, :choice_users_count => s,
:choice_percent => score_percent.round(1).to_s, :choice_percent => score_percent.round(2).to_s,
:right_answer => right_answer :right_answer => right_answer
} }
shixun_chas.push(answer_option) shixun_chas.push(answer_option)
@ -256,7 +256,7 @@ module ExercisesHelper
:cha_name => c.challenge.subject, :cha_name => c.challenge.subject,
:cha_position => c.position, :cha_position => c.position,
:cha_details => shixun_chas, :cha_details => shixun_chas,
:cha_percent => game_percent.round(1).to_s :cha_percent => game_percent.round(2).to_s
} }
question_answer_infos.push(shixun_new_chas) question_answer_infos.push(shixun_new_chas)
end end
@ -266,7 +266,7 @@ module ExercisesHelper
:ques_less_title => ques_less_title, #副标题,仅实训题才有 :ques_less_title => ques_less_title, #副标题,仅实训题才有
:type => ex.question_type, :type => ex.question_type,
:position => ex.question_number, :position => ex.question_number,
:percent => percent.round(1).to_s, :percent => percent.round(2).to_s,
:ques_effictive_counts => effictive_users_count, :ques_effictive_counts => effictive_users_count,
:ques_details => question_answer_infos :ques_details => question_answer_infos
} }

@ -0,0 +1,22 @@
class ChangeUserP02389416Exercise < ActiveRecord::Migration[5.2]
def change
puts "====> start_to_create user exercise_answer"
#分别为第811141516,20,21,26
# 分数分别为2分2分5分2分2分2分2分2分 合计19分
question_ids = [37411,37414,37417,37418,37419,37423,37424,37429]
choice_ids = [117788,117797,117806,117809,117811,117816,117818,117828]
question_ids.each_with_index do |q, index|
ExerciseAnswer.create(user_id: 45442, exercise_question_id: q, exercise_choice_id: choice_ids[index])
end
ex_user = ExerciseUser.where(user_id: 45442, exercise_id: 2561)&.first
if ex_user.present?
obj_score = ex_user.objective_score.to_i + 19
total_score = ex_user.score.to_i + 19
ex_user.update_attributes(score: total_score, objective_score: obj_score)
end
puts "====> end_to_create user exercise_answer"
end
end

@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map", // devtool: "cheap-module-eval-source-map",
// 开启调试 // 开启调试
// devtool: "eval-source-map", // 开启调试 devtool: "source-map", // 开启调试
// These are the "entry points" to our application. // These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle. // This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS. // The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -164,16 +164,16 @@ function buildColumns(that) {
}, },
}) })
} }
// if(isAdminOrTeacher && hasGraduationModule) { if(isAdminOrTeacher && hasGraduationModule) {
// columns.unshift({ columns.unshift({
// title: '', title: '',
// dataIndex: 'course_member_id', dataIndex: 'course_member_id',
// key: 'course_member_id', key: 'course_member_id',
// render: (content, item, index) => { render: (content, item, index) => {
// return content ? <Checkbox value={content}></Checkbox> : '' return content ? <Checkbox value={content}></Checkbox> : ''
// } }
// }) })
// } }
return columns return columns
} }
@ -688,6 +688,10 @@ class studentsList extends Component{
line-height:30px!important; line-height:30px!important;
flex: 0 0 30px; flex: 0 0 30px;
} }
.teacher_table .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 16px 10px;
}
`}</style> `}</style>
<div className="mt20 edu-back-white padding20 teacherList"> <div className="mt20 edu-back-white padding20 teacherList">
@ -741,7 +745,7 @@ class studentsList extends Component{
</div> } </div> }
</div>} </div>}
<Spin size="large" spinning={this.state.isSpin}> <Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table"> <div className="clearfix stu_table teacher_table">
{combineArray.length ? {combineArray.length ?
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}> <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{/* pagination={{ current: page, total: total_count, pageSize:20, onChange: this.onPageChange }} */} {/* pagination={{ current: page, total: total_count, pageSize:20, onChange: this.onPageChange }} */}

Loading…
Cancel
Save