This commit is contained in:
parent
95a48b7da0
commit
c289af2e7c
|
@ -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
|
||||
|
|
|
@ -93,7 +93,7 @@ RedmineApp::Application.routes.draw do
|
|||
|
||||
resources :student_work do
|
||||
member do
|
||||
|
||||
post 'add_score'
|
||||
end
|
||||
collection do
|
||||
|
||||
|
|
Loading…
Reference in New Issue