试卷、问卷、作业列表增加老师姓名的展示

dev_aliyun_beta
cxt 6 years ago
parent a6baf21c2c
commit 90afe491b4

@ -7,6 +7,7 @@ if @exercises_count > 0
second_left = get_exercise_left_time(exercise,@current_user_)
json.time second_left.present? ? (second_left / 60) : nil
end
json.author exercise.user.real_name
ex_index = exercise_index_show(exercise,@course,@is_teacher_or,@current_user_)
json.exercise_status ex_index[:ex_status]
json.lock_status ex_index[:lock_icon]

@ -17,6 +17,7 @@ json.homeworks @homework_commons.each do |homework|
json.status_time curr_status[:time]
json.time_status curr_status[:time_status]
json.allow_late homework.allow_late
json.author homework.user.real_name
# 只有在主目录才显示
json.upper_category_name homework.course_second_category&.name unless params[:category]

@ -5,6 +5,7 @@ if @polls_count > 0
json.array! @polls do |poll|
poll_index_array = poll_index_show(poll,@course,@is_teacher_or,@current_user_)
json.extract! poll, :id, :polls_name,:is_public,:created_at
json.author poll.user.real_name
json.polls_status poll_index_array[:polls_status]
json.lock_status poll_index_array[:lock_icon]
json.publish_time poll_index_array[:publish_time] # 问卷的发布时间

Loading…
Cancel
Save