This commit is contained in:
sw 2015-05-23 11:24:24 +08:00
parent 95a48b7da0
commit c289af2e7c
3 changed files with 12 additions and 3 deletions

View File

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

View File

View File

@ -93,7 +93,7 @@ RedmineApp::Application.routes.draw do
resources :student_work do resources :student_work do
member do member do
post 'add_score'
end end
collection do collection do