作业设置

problem_set
cxt 5 years ago
parent 5e59a95969
commit 37eaf51663

@ -439,6 +439,7 @@ class HomeworkCommonsController < ApplicationController
def settings def settings
@user = current_user @user = current_user
@work = @homework.user_work(current_user.id) if @user_course_identity == Course::STUDENT @work = @homework.user_work(current_user.id) if @user_course_identity == Course::STUDENT
@course_groups = @course.course_groups.where(id: @course.charge_group_ids(@current_user))
end end
def update_settings def update_settings

@ -7,7 +7,7 @@ json.partial! "student_btn_check", locals: {identity: @user_course_identity, hom
json.(@homework, :unified_setting, :publish_time, :end_time, :late_penalty, :allow_late, :late_time, :work_public, json.(@homework, :unified_setting, :publish_time, :end_time, :late_penalty, :allow_late, :late_time, :work_public,
:score_open, :answer_public) :score_open, :answer_public)
json.group_settings @course.course_groups do |group| json.group_settings @course_groups do |group|
json.group_id group.id json.group_id group.id
json.group_name group.name json.group_name group.name
json.publish_time group_homework_setting(@homework, group.id).try(:publish_time) json.publish_time group_homework_setting(@homework, group.id).try(:publish_time)

Loading…
Cancel
Save