|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
class StudentWorkController < ApplicationController
|
|
|
|
|
layout "base_courses"
|
|
|
|
|
before_filter :find_homework, :only => [:new, :index, :create]
|
|
|
|
|
before_filter :find_work, :only => [:edit, :update, :show, :destroy]
|
|
|
|
|
before_filter :member_of_course, :only => [:index, :new, :create, :show]
|
|
|
|
|
before_filter :find_work, :only => [:edit, :update, :show, :destroy, :add_score]
|
|
|
|
|
before_filter :member_of_course, :only => [:index, :new, :create, :show, :add_score]
|
|
|
|
|
before_filter :author_of_work, :only => [:edit, :update, :destroy]
|
|
|
|
|
|
|
|
|
|
def index
|
|
|
|
@ -72,7 +72,16 @@ class StudentWorkController < ApplicationController
|
|
|
|
|
|
|
|
|
|
#评分
|
|
|
|
|
def add_score
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.js
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#评分的回复
|
|
|
|
|
def add_score_reply
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.js
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|