Merge branch 'dev_aliyun' into dev_hjm_a

dev_unstable
hjm 6 years ago
commit 27991c8fe1

@ -1,5 +1,6 @@
class Users::VideosController < Users::BaseController
before_action :private_user_resources!, :check_account, :require_auth_teacher!
before_action :private_user_resources!, :check_account
before_action :require_auth_teacher!, except: [:index, :review]
helper_method :current_video

@ -21,7 +21,7 @@ if @type == "image"
elsif @type == "html"
json.iframe_src File.read("#{@user_path}/#{@user_picture[0]}")&.html_safe
elsif @type == "txt"
json.contents @contents.html_safe
json.contents @contents.to_s
elsif @type =="qrcode"
json.qrcode_str @qrcode_str
elsif @type == "mp3" || @type == "mp4"

@ -1,7 +1,6 @@
json.partial! "homework_commons/homework_public_navigation", locals: {homework: @homework, course: @course, user: @current_user}
json.work_id @work.id
json.description @work.description
json.
json.attachments @work.attachments do |atta|
json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: @work.delete_atta(atta)}

@ -10,6 +10,7 @@ json.tidding_count 0
json.user_phone_binded @user.phone.present?
json.phone @user.phone
json.profile_completed @user.profile_completed?
json.professional_certification @user.professional_certification
if @course
json.course_identity @course_identity
json.course_name @course.name

@ -45,8 +45,8 @@ namespace :excellent_course_exercise do
end
if exercise_user && exercise_user.commit_status == 0
exercise_question_ids = exercise_question_ids.sample(rand_num)
questions = exercise.exercise_questions.where(id: exercise_question_ids)
question_ids = exercise_question_ids.sample(rand_num)
questions = exercise.exercise_questions.where(id: question_ids)
create_exercise_answer questions, member.user_id
total_score = calculate_student_score(exercise, member.user)

@ -69,7 +69,7 @@ class CommonWorkPost extends Component{
status: 'done'
}
})
const _memebers = response.data.members.slice(0);
const _memebers = response.data.members ? response.data.members.slice(0) : [];
this._edit_init_memebers = _memebers
delete response.data.members;
this.setState({

Loading…
Cancel
Save