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

dev_unstable
hjm 5 years ago
commit 2d039ae549

@ -328,7 +328,11 @@ class HomeworksService
work.late_penalty = work.work_status == 2 ? homework.late_penalty : 0
work.commit_time = myshixun.created_at > setting_time.publish_time ? setting_time.publish_time : myshixun.created_at
work.myshixun_id = myshixun.id
work.update_time = myshixun.updated_at
work.update_time = if myshixun_endtime.present?
myshixun_endtime > homework_end_or_late_time ? homework_end_or_late_time : myshixun_endtime
else
myshixun.updated_at > homework_end_or_late_time ? homework_end_or_late_time : myshixun.updated_at
end
work.final_score = final_score
score = work.final_score + work.eff_score - work.late_penalty

@ -42,7 +42,7 @@ namespace :public_course do
begin
CourseMember.create!(course_id: course_id, user_id: user_id, role: 4)
rescue Exception => e
Rails.logger()
Rails.logger(e.message)
end
end
end
@ -68,12 +68,15 @@ namespace :public_course do
case type.to_i
when 1
# 讨论区
created_on = random_time start_time, end_time
puts created_on
messages = Message.where(board_id: course.boards)
messages.each do |message|
created_on = random_time start_time, end_time
puts created_on
message.update_columns(created_on: created_on, updated_on: created_on)
MessageDetail.where(message_id: message.id).update_all(created_at: created_on, updated_at: created_on)
MessageDetail.where(message_id: message.id).each do |detail|
rand_created_on = random_time start_time, end_time
detail.update_columns(created_at: rand_created_on, updated_at: rand_created_on)
end
end
when 2
# 作业
@ -134,5 +137,4 @@ namespace :public_course do
end
large_time
end
end
end

@ -306,7 +306,7 @@ class App extends Component {
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
<Addcourses {...this.props} {...this.state}/>
<AccountProfile {...this.props} {...this.state}/>
{/*<Certifiedprofessional {...this.props} {...this.state}/>*/}
<Certifiedprofessional {...this.props} {...this.state}/>
<Router>
<Switch>

@ -2369,7 +2369,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page,this.state.limit)
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page,this.state.limit);
}
if (e === "score") {
@ -2387,7 +2387,7 @@ class Studentshavecompletedthelist extends Component {
}
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null)
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page,this.state.limit);
}
if (e === "student_id") {
@ -2404,7 +2404,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null)
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page,this.state.limit);
}
}
setExerciseReviewAndAnswer = () => {

Loading…
Cancel
Save