修改学生提交作业界面的layout
This commit is contained in:
parent
7970bd6df0
commit
c4cd61c71b
|
@ -452,9 +452,7 @@ class BidsController < ApplicationController
|
||||||
def show_courseEx
|
def show_courseEx
|
||||||
|
|
||||||
if (User.current.logged? && (User.current.member_of_course?(@bid.courses.first) || User.current.admin?))
|
if (User.current.logged? && (User.current.member_of_course?(@bid.courses.first) || User.current.admin?))
|
||||||
# flash[:notice] = ""
|
|
||||||
@membership = User.current.coursememberships.all(:conditions => Course.visible_condition(User.current))
|
@membership = User.current.coursememberships.all(:conditions => Course.visible_condition(User.current))
|
||||||
|
|
||||||
@user = @bid.author
|
@user = @bid.author
|
||||||
@bidding_project = @bid.biding_projects.all
|
@bidding_project = @bid.biding_projects.all
|
||||||
|
|
||||||
|
@ -526,7 +524,7 @@ class BidsController < ApplicationController
|
||||||
if @bid.reward_type == 3
|
if @bid.reward_type == 3
|
||||||
format.html {
|
format.html {
|
||||||
html_title(l(:label_homework_info))
|
html_title(l(:label_homework_info))
|
||||||
render :layout => 'base_homework'
|
render :layout => 'base_courses'
|
||||||
}
|
}
|
||||||
elsif @bid.reward_type == 1
|
elsif @bid.reward_type == 1
|
||||||
format.html {
|
format.html {
|
||||||
|
@ -1063,6 +1061,7 @@ class BidsController < ApplicationController
|
||||||
if params[:id]
|
if params[:id]
|
||||||
@bid = Bid.find(params[:id], :include => [{:homeworks => :user}])
|
@bid = Bid.find(params[:id], :include => [{:homeworks => :user}])
|
||||||
@user = @bid.author
|
@user = @bid.author
|
||||||
|
@course = @bid.courses.first
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
render_404
|
render_404
|
||||||
|
|
Loading…
Reference in New Issue